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

Hop Studios's avatar
Hop Studios
459 posts
17 years ago
Hop Studios's avatar Hop Studios

Mark,

Looks like the 2.1.0 download has a hidden .svn directory in the icons folder.

TTFN Travis

       
Adam George's avatar
Adam George
283 posts
17 years ago
Adam George's avatar Adam George
This extension is great. Just what I have been looking for! I’ve got a question though. How do you dynamically access a thumbnail of an uploaded image? As it is right now it just sticks in a URL to the original image, but I see no way to get it to output the URL to the thumb?
This is my quick/dirty approach for a single upload:
<?php
    $cust = '{article_image}'; // Name of custom field.
    # pathinfo might work better if using PHP 5.2.0
    # http://www.php.net/manual/en/function.pathinfo.php
    //$file_name = pathinfo($cust); echo $file_name['filename'];
    $path_to_files = dirname($cust); // Path to file.
    $parts = explode('.', basename($cust));
    # $parts[0]; // file_name
    # $parts[1]; // .ext
    echo $path_to_files.'/'.$parts[0].'_t.'.$parts[1];
    # Output:
    # <img src="http://www.site.com/images/articles/red-lilly_1_t.jpg" alt=""  />
?>

I was looking for how to do this too.

It seems that this works:

{[custom_field_short_name]_thumb}

(Just add ‘_thumb’)

       
silenz's avatar
silenz
1,648 posts
17 years ago
silenz's avatar silenz
A hcrap, I’m getting an error when uploading on a local server (wasn’t a problem with 1.5.2 on the same server). The error I am getting is - Warning: move_uploaded_file(C:/dev/manag/admin/C:/dev/manag/images/uploads/hambo.jpg) [function.move-uploaded-file]: failed to open stream: Invalid argument in C:\dev\manag\admin\extensions\ext.file.php on line 552 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move ‘C:\Program Files\xampp\tmp\php26C.tmp’ to ‘C:/dev/manag/admin/C:/dev/manag/images/uploads/hambo.jpg’ in C:\dev\manag\admin\extensions\ext.file.php on line 552

Same here.

       
Adam George's avatar
Adam George
283 posts
17 years ago
Adam George's avatar Adam George

How do you get the image height/width and the thumb image height/width using this extension?

       
Adam George's avatar
Adam George
283 posts
17 years ago
Adam George's avatar Adam George
How do you get the image height/width and the thumb image height/width using this extension?

Hmm, anyone?

       
mArzsmAn's avatar
mArzsmAn
45 posts
17 years ago
mArzsmAn's avatar mArzsmAn

For a project I need extra fields with the extension ie: a title and description of a the uploaded file. Is there any possibility that there will be an update of the extension to support more than one field?

       
Hop Studios's avatar
Hop Studios
459 posts
17 years ago
Hop Studios's avatar Hop Studios

Why do you need this extension to do that and instead of adding extra fields to that blog:

{blog_file1} (Type: File) {blog_file1_title} (Type: Text Input) {blog_file1_description} (Type: Text Area)

TTFN Travis

       
mArzsmAn's avatar
mArzsmAn
45 posts
17 years ago
mArzsmAn's avatar mArzsmAn

I’m using the option “Allow Multiple Files” with the file extension. So I don’t know how much files the client will add. If there is a way to create 2 textfields for every file field that would be great but I believe that’s not possible, or am I wrong?

Write know I have 2 extra fields where I store the file title and file description for each file separated by a line break. For adding files this is not a problem, I just add a string at the end of each field but removing a file is not that easy.

       
hothousegraphix's avatar
hothousegraphix
851 posts
17 years ago
hothousegraphix's avatar hothousegraphix

Hello,

I have just recently installed this extension and come across an oddity, not sure if this is a bug or if it’s something with my install.

After initially installing I went into my custom weblog fields to update in order to test. All went as one would expect - everything worked perfectly.

Today, I began editing the balance of the custom fields I needed to update to take advantage of this extension. I opened up one of my custom filed groups and selected the first custom field in that group which I’m associating with an image upload. I began editing the necessary items (field type / upload location) and then updated the field.

I received the following error:

“Notice: Undefined variable: field_type in …edited…/public_html/system/cp/cp.publish_ad.php on line 7214”.

So, I thought maybe I just missed something…I re-edited and got the same error message. Then, I deleted the field and created a new field to see if this had any effect. No.

I then un-installed the extension and re-installed. I still received this error message, but, to note, the changes I made the prior day were functioning properly.

After looking closely at the field that was taking the “file” filed type, the only difference was it’s order - it was not defined as the first field in the field group order.

I then went back to the custom field in question and re-ordered it in it group to anything other then the first field and…vwa la…it functions just fine.

It seems when I try to define the field type to “file” in the first custom field of a custom field group I get this error; if the field is not the first in the field group, the extension works properly.

Any ideas why this is occuring?

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

This is actually documented somewhere here on the forums - so it has happened to others. I wish I could point you to the right spot. I think the reason this happens is because EE doesn’t have this default file type listed in the core file, so it comes up as undefined.

       
hothousegraphix's avatar
hothousegraphix
851 posts
17 years ago
hothousegraphix's avatar hothousegraphix
This is actually documented somewhere here on the forums - so it has happened to others. I wish I could point you to the right spot. I think the reason this happens is because EE doesn’t have this default file type listed in the core file, so it comes up as undefined.

Hello, how are you?

Yeah, I looked thru this thread to see if I could spot a reference to this but didn’t see anything. In all honesty thought this was not an exhaustive search (only about the last 5/6 pages of this thread).

Thanks for the info. At least I now know this isn’t my install.

Regards!

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

here’s the first posting of this bug…http://ellislab.com/forums…

       
hothousegraphix's avatar
hothousegraphix
851 posts
17 years ago
hothousegraphix's avatar hothousegraphix

Thank you for the clarification.

One quick question, I’m assuming the addition of $field_Type = “”; is to me made to line 5388 of “cp.publish_ad.php”?

Thanks again.

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

yes, i’m not positive on the line number though, so make sure the surrounding code matches that posted in the thread.

       
hothousegraphix's avatar
hothousegraphix
851 posts
17 years ago
hothousegraphix's avatar hothousegraphix

Great, will do. Thank you!

       
First 12 13 14 15 16 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.