We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

File

Development and Programming

Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

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/

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

I installed File (v.1.0.0) in EE Core, but I see no file field in the form:

CP Home › Publish › New Entry

Where to look for it?

Thanks.

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

You’ll have to add it as a field the same way you would add a new text field or date field under Admin > Weblog Administration > Custom Fields > Field Group > Add New Custom Field

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

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)

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

I updated it. The fix should fix both the notice and the font size. Upload it up top.

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

Excellent! Thanks a lot!

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

There was an issue with one of my regular expressions which has now been updated. please download again from the first post.

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

The archive (zip) is broken.

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

fixed! it was 0k now it’s 88k, so that should be good.

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

I’ve updated the ext again to output the full file url when called from the template. Get it at the top.

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

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)

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork

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.

       
Cocoaholic's avatar
Cocoaholic
445 posts
18 years ago
Cocoaholic's avatar Cocoaholic

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

       
Mark Huot's avatar
Mark Huot
587 posts
18 years ago
Mark Huot's avatar Mark Huot

Thanks for the replies guys. Those bugs should all be fixed now! Get it again at the top.

       
sigork's avatar
sigork
155 posts
18 years ago
sigork's avatar sigork
File Size: 0KB
       
1 2 3 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.