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>
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!
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???
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?
@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.
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.
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:
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
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: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: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
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$thumb_url = is_file($thumb_path)?$FNS->remove_double_slashes($file_field['url'].'/'.$thumb):'';
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.
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
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.