My Modified Version

Permalink Browser Info Environment
First off, Thanks Tony for this killer add-on.

I had been trying to write this out. I actually had a working version, but as a single_page and not quite in attribute type form.

Anyways, I modified your version just slightly (specifically form.php) to make it use the file form as well, with add and remove buttons.

Check it out. :D

1 Attachment

Type: Discussion
Status: New
ijessup
View Replies:
Tony replied on at Permalink Reply
Tony
I just tried this out, but it didn't seem to work. when I click the new add file button, the AJAX request get's a page not found, trying to load this address:
http://concreteaddons:8888/index.php/tools/packages/tony_multi_file...
ijessup replied on at Permalink Reply
ijessup
Shoot. I forgot to put the add_file.php tool in the package directory.

Basically the AJAX renders a new input area based on the add_file tool. All the JS is preloaded thanks to the attribute.

I'm out of town at the moment, but I'll upload the fixed version tomorrow.

- IJ
ijessup replied on at Permalink Reply
ijessup
Not sure why its not working for you. The add_file.php file is in the package. :/

And I just tried it on a fresh install of c5, and it works.
melat0nin replied on at Permalink Reply
melat0nin
I know this is an ancient post, but I thought I should say -- I have a similar problem to Tony -- the problem is on line 16 of form.php - the jQuery $.get() function should include the DIR_REL constant for scenarios where the site isn't installed on the root of the server:

$.get("<?=DIR_REL?>/index.php/tools/packages/tony_multi_file_attribute/add_file?akID=<?php echo $this->attributeKey->getAttributeKeyID(); ?>&id="+id,
ijessup replied on at Permalink Reply
ijessup
Oh man! I completely for got about this!

Thanks for the bump and fix!

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.