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

eyevariety's avatar
eyevariety
158 posts
15 years ago
eyevariety's avatar eyevariety

@LukeMCR - @futurestudios is right- You may want to use one of the publish form tweak extensions that remove that button

@netlinkblueEE - why not try nGen File Field + FF Matrix - a bit more flexible and a lot of exciting development happening there.

       
DavidG's avatar
DavidG
46 posts
15 years ago
DavidG's avatar DavidG

I’ve got some odd problem that I can’t figure out. I’ve got an xml file I’m using with Slideshowpro. Everything is working great except for the album tn field. Trying to use a single tag to output one file’s url. It does output the url but not where I want it! Tried all sorts of variations but the url always gets put after all the other tag information.

Here’s my code:

<gallery>

{exp:weblog:entries orderby="date" sort="desc"  weblog="projects"  disable="pagination|categories|member_data|trackbacks" rdf="off" }
<album title="{title}" id="{title}" description="{project_desc}" tn="{exp:imgsizer:size src="{photos}" auto="185" justurl="yes"}" >
 
{photos}
    {exp:imgsizer:size src=
{/photos}    
</album>
{/exp:weblog:entries}    

</gallery>

outputs:

<gallery>
<album  title="Sample Project 2" id="Sample Project 2" description="Sample description" tn="" >

<img src="http://domain.com/images/uploads/slides2-1.jpg" alt=""  />
    
/images/uploads/cache/slides2-1-644x0.jpg 
    
/images/uploads/cache/slides2-3-644x0.jpg

</album>
</gallery>
       
Peter Lewis's avatar
Peter Lewis
280 posts
15 years ago
Peter Lewis's avatar Peter Lewis

I’ve had problems in the past mixing single and paired template tags. Change them all to be paired and it should solve the problem. By mixing it gets confused and will try to pair up the first single, which is why it’s probably appearing further into your code.

<album title="{title}" id="{title}" description="{project_desc}" tn="{exp:imgsizer:size src="{photos}{if count==1}{file_url}{/if}{/photos}" auto="185" justurl="yes"}" >

{photos}
    {exp:imgsizer:size src=
{/photos}    
</album>

But the problem you’re going to have is it’ll repeat the first tag pair, so add the count variable.

Edit: Problem is this won’t work because you can’t have the if inside the extension tag. do this instead:

tn="{photos}{if count==1}{exp:imgsizer:size src="{file_url}" auto="185" justurl="yes"}{/if}{/photos}"

Edit 2: Oddly the forum keeps removing the {file_url} tag from the first chunk of code - notice it’s missing from your pasted code as well!

       
mediafarm's avatar
mediafarm
9 posts
15 years ago
mediafarm's avatar mediafarm

I am using this extension ext.mh_file_ext.php and, it works fine with one exception. My uploaded files get unix permissions of 600 which gives folks a 403 error when trying to view.

I tried changing:

//  =============================================
                          //  Write Permissions
                          //  =============================================
                          @chmod($dst, 0777);

to:

//  =============================================
                          //  Write Permissions
                          //  =============================================
                          @chmod($dst, 0644);

This did not help. Thoughts anyone???

       
mediafarm's avatar
mediafarm
9 posts
15 years ago
mediafarm's avatar mediafarm

I am using this extension ext.mh_file_ext.php and, it works fine with one exception. My uploaded files get unix permissions of 600 which gives folks a 403 error when trying to view.

I tried changing:

//  =============================================
                          //  Write Permissions
                          //  =============================================
                          @chmod($dst, 0777);

to:

//  =============================================
                          //  Write Permissions
                          //  =============================================
                          @chmod($dst, 0644);

This did not help. Thoughts anyone???

OOPS, SORRY DOUBLE POST?

       
mhulse's avatar
mhulse
329 posts
15 years ago
mhulse's avatar mhulse

@mediafarm,

From my modification notes, this is what I changed in order to fix permission probs:

File: ext.mh_file_ext.php
 Changed: 
            foreach($file_tmp_names as $file_key=>$file_tmp_name)
            {
                if(@move_uploaded_file($file_tmp_name, $server_path.$file_names[$file_key]) === FALSE)
                {
                    $errors[] = str_replace(array('%{field}', '%{file}'), array($file_field['field_label'], $file_names[$file_key]), $LANG->line('error_transfer'));
                }
            }
 Line(s): #867 - #873
   Added: 
            foreach($file_tmp_names as $file_key=>$file_tmp_name)
            {
                if(@move_uploaded_file($file_tmp_name, $server_path.$file_names[$file_key]) === FALSE)
                {
                    $errors[] = str_replace(array('%{field}', '%{file}'), array($file_field['field_label'], $file_names[$file_key]), $LANG->line('error_transfer'));
                }
                // If all went well, set the permissions on the uploaded + moved file:
                else
                {
                    @chmod($server_path.$file_names[$file_key], 0644);
                }
            }
 Line(s): #874 - #885
    Info: http://ellislab.com/forums/viewthread/38997/P486/#389993

I found the fix in this thread.

       
mhulse's avatar
mhulse
329 posts
15 years ago
mhulse's avatar mhulse

Hello,

Just FYI to others, and a heads-up to Mark…

My “File” custom field was named:

image-01

I added another custom field (of the “input” type) named:

image-01-caption

And when I visited my template, all I got was this:

{image-01-caption}

When I changed the “File” custom field name to:

file-01

The other custom field variable output its entry contents.

Long story short, it looks like the FILE extension does not like other custom fields with similar variable names.

       
mhulse's avatar
mhulse
329 posts
15 years ago
mhulse's avatar mhulse

For anyone having parse_type() errors when publishing an entry with the File extension, there is a fix posted on this thread:

http://ellislab.com/forums/viewthread/96147/

       
awsadmin's avatar
awsadmin
127 posts
15 years ago
awsadmin's avatar awsadmin

Hello, I am having problems creating custom fields when this extension and Brandon Kelly’s Fieldframe extension are enabled. If the File extension is disabled then I can create custom fields fine. I am also using multiple site manager, and have 3 sites going. My main site won’t create custom fields when using both extensions, but my other 2 sites have no problem. I was wondering if anyone else was having this issue. It seems like it would be a simple fix that must be clashing with both enabled. Attached is what I get when trying to create a custom field in my main site in MSM with both extensions enabled:

       
Ben Debnam's avatar
Ben Debnam
22 posts
15 years ago
Ben Debnam's avatar Ben Debnam

Hey Mark & Folks,

I’ve just upgraded from 1.6.2 to 1.6.8 (phew, yes it has been a while)

I’m now receiving a big list of the same error, looping over and over again on the pages where output has images and thumbs generated by ext.mh_file_ext.php :

Heres the output I’m receiving:

Warning: is_file() [function.is-file]: Stat failed for /xxx/x/x/x/xxx/domain/html/uploads/group/images//filename_thumb.JPG (errno=40 - Too many levels of symbolic links) in /xxx/x/x/x/xxx/domain/html/system/extensions/ext.mh_file_ext.php on line 1215

Now I’ve obviously noticed that there is a double slash going on, and did have a look at the ext.mh_file_ext.php at 1215 and I’m seeing:

$thumb_url = is_file($thumb_path)?$FNS->remove_double_slashes($file_field['url'].'/'.$thumb):'';

I’ve checked my file upload paths and everything is fine, no double slashes there, just one trailing slash after both the server and the http path, as per EE defaults.

This worked absolutely fine in 1.6.2 with no errors, what can I do fix this in 1.6.8 please?

Thank you great people in advance,

Ben

       
Ben Debnam's avatar
Ben Debnam
22 posts
15 years ago
Ben Debnam's avatar Ben Debnam
Hey Mark & Folks, I’ve just upgraded from 1.6.2 to 1.6.8 (phew, yes it has been a while) I’m now receiving a big list of the same error, looping over and over again on the pages where output has images and thumbs generated by ext.mh_file_ext.php : Heres the output I’m receiving:
Warning: is_file() [function.is-file]: Stat failed for /xxx/x/x/x/xxx/domain/html/uploads/group/images//filename_thumb.JPG (errno=40 - Too many levels of symbolic links) in /xxx/x/x/x/xxx/domain/html/system/extensions/ext.mh_file_ext.php on line 1215
Now I’ve obviously noticed that there is a double slash going on, and did have a look at the ext.mh_file_ext.php at 1215 and I’m seeing:
$thumb_url = is_file($thumb_path)?$FNS->remove_double_slashes($file_field['url'].'/'.$thumb):'';
I’ve checked my file upload paths and everything is fine, no double slashes there, just one trailing slash after both the server and the http path, as per EE defaults. This worked absolutely fine in 1.6.2 with no errors, what can I do fix this in 1.6.8 please? Thank you great people in advance, Ben

Okay, sorry folks! I’ve just realised I made a big typical school boy error. I forgot to update my server paths on the file upload pref’s. MediaTemple had recently updated some stuff and I didn’t think to check my server paths. Apparently (Thanks to this thread by eriklarsson), I have found out now that they have changed the segment names / numbers. What a big ol’ pain in the butt. Anyway, I’m now on the road to recovery and fixing up the site. Apologies for wasting any time by reading through the above! :)

Thanks, Ben.

       
Eric Snyder's avatar
Eric Snyder
202 posts
15 years ago
Eric Snyder's avatar Eric Snyder

I am having a problem changing preferences for a file upload detsination. I can change all the “File Upload Preferences” and “Member Groups” but I cannot change any “File Settings”. I get no error messages.

Anybody have any ideas why?

       
mhulse's avatar
mhulse
329 posts
15 years ago
mhulse's avatar mhulse

Hi Eric,

Anybody have any ideas why?

I think the same thing happens to me… Fortunately, FWIK, it is just a display thing.

I am pretty positive the settings you choose ARE set. 😊

To put your mind at rest, use PHPmyAdmin and look directly at your database.

       
Eric Snyder's avatar
Eric Snyder
202 posts
15 years ago
Eric Snyder's avatar Eric Snyder

I hear you. Unfortunately, it’s going to take some hoop jumping to get database access.

I have set it to multiple uploads and it does not take. When I go and edit a entry I only have single upload.

       
mhulse's avatar
mhulse
329 posts
15 years ago
mhulse's avatar mhulse
I have set it to multiple uploads and it does not take. When I go and edit a entry I only have single upload.

Hmmm, ok. Sorry if I wasted your time.

Are you on the latest version of EE?

Are you running the latest File version?

What PHP version you running?

Not sure if this will help, but if you crack open this file:

/system/index.php

And change the error reporting to something like this:

//error_reporting(0);
error_reporting(E_ALL);

Does that show you any PHP notices and/or errors when submitting the File Upload Preferences form?

Also, maybe uninstalling and installing the File ext. might help.

Anyone else got any tips?

M

       
First 59 60 61 62 63 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.