Hello, all This extension places a simple file field on the publish page and allows the user to upload images/documents to the field. It uses the existing upload directories defined and takes their settings, so file type and size restrictions should be valid. Currently there is not an error system, because of the way EE runs it’s output, but i’ll look into something soon. Also you should know that the extension requires JS if you want to remove an image. Without JS it can not be done.
Finally. The “icons” folder goes in your default “images” folder next to the “uploads” directory.
UPDATE: - I’ve got a 3.x version going on my site, please try that before downgrading to the 2.x branch. Find it here: http://docs.markhuot.com/ee/extensions/file/
Thanks a lot! I understood.
It works now.
But 2 notes:
CP Home › Publish › New Entry:
Notice: Undefined variable: display in /usr/home/***/system/extensions/ext.file.php on line 296
(PHP5; EE Core)
And a font size problem: 2 screenshots attached, w/ file field, and w/o file field. (FF/WinXP)
There’s a serious(?) bug in the extension. Today I have published an article in a weblog that did NOT use the file extension (latest version):
Problems after publishing, but it was published.
I repeated the bug by Edit/Quick Save:
Warning: Invalid argument supplied for foreach() in /usr/home/***/system/extensions/ext.file.php on line 324 Warning: Cannot modify header information - headers already sent by (output started at /usr/home/***/system/extensions/ext.file.php:324) in /usr/home/***/system/core/core.functions.php on line 707
PHP5; the weblog doesn’t use the file field. And I see the font size in the blog in this blog (w/o file field)
I created a test entry. Result:
Warning: Invalid argument supplied for foreach() in /usr/home/***/system/extensions/ext.file.php on line 324 Warning: Cannot modify header information - headers already sent by (output started at /usr/home/***/system/extensions/ext.file.php:324) in /usr/home/***/system/core/core.functions.php on line 707 Warning: Cannot modify header information - headers already sent by (output started at /usr/home/***/system/extensions/ext.file.php:324) in /usr/home/***/system/core/core.functions.php on line 293
The entry was published. (This weblog/weblog publish page doesn’t use the file field)
But I don’t see the font size bug now.
Exellent extension Mark, great idea 😉
It does need a little bit more work though.
I get the same warnings when I use more than one File field.
Also, Formatting for the File field is set to ‘Xhtml’ by default but should be ‘None’ (you can work around this by creating a text field first, set formatting to ‘None’ and then change field type to ‘File’)
Cheers
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.