hmmm. I followed the instructions, but when I click on an arrow to move a file up the list, it acts like an anchor link and jumps me up to the top of the page without moving the file.
did you add the onclick events? it wouldnt go in the code tag for some reason
hrm… some reason the inline javascript don’t get posted, add these to the links onclick=“swapFiles(this, \‘up\’); return false;” onclick=“swapFiles(this, \‘down\’); return false;”
those would go inside the links found in the code snippet
$r.= '<a href="#">'.PATH_CP_IMG.</a> '; $r.= '<a href="#">'.PATH_CP_IMG.</a>';
ahaha it’s always the little things that get right by.
the code i’m working on kept breaking all over the place because I forgot a “+1”. >_<
im glad to hear it’s working though. let me know if you run into any problems in usage. i had some problems with regex and newlines but that should be taken care of.
figured i should link this here
how to add width/height variables courtesy Chris Newton http://ellislab.com/forums/viewthread/103527/#526454 (might want to put an ‘@’ before getimagesize as Mark Huot did to suppress potential errors)
one thing that would make some scripting easier for me is to know which dimension is greater ahead of time so i added a variable for that, too
,
'file_gd' => ( $mh_file_width > $mh_file_height ) ? 'width' : 'height'
havent tried it yet but i dont see why it wouldnt work
Just a heads up to people that are finding the quality of their images greatly reduced using Mark’s file uploader. It’s not the uploader as it’s using all of the correct methods to optimize the image resampling, it’s the actual image. The best way to preserve quality is to first optimize the image in Photoshop (or whatever you use to optimize jpg’s) and then upload it. I was uploading some raw images, possibly with strange color profiles (client is a photographer) and they would always look like crap. Once I optimized them and saved them at 100% jpeg quality and uploaded them, HUGE difference…
STAND ALONE ENTRY FORM CHOKES IF FILE ALREADY EXISTS ON SERVER
I notice that when using the stand alone entry form to upload a file with Mark Huot’s File extension, the upload chokes if the file already exists in the upload destination.
In the control panel I get a nice error message:
Attached Files – The file ‘LATIN_861723.pdf’ already exists, please rename your file before uploading it to the server. ( Automagically rename this file the next time it’s uploaded?)
But the stand alone entry form just dies out to a blank screen. Anybody else run into this issue?
Hi all -
Quick question - for some reason the {count} variable is getting mixed up with the weblog:entries {count} variable, and returning the number of weblog entries, and not the number of images found. Does this make sense? Here’s the code I’m using below. Instead of counting the images returned, it just repeats “1” for the number of weblog entries found.
[code] {exp:weblog:entries weblog="projects" limit="1"}
<ul>
{project-lightbox-images}
<li>
{file_url}
</li>
{/project-lightbox-images}
</ul>
{/exp:weblog:entries}[/code]
Note: I answered my own question. I just set the Resize Images dropdown to Auto. Thanks.
Hey,
Is there a way to anchor both the height and the width for the resized version?
I’ve anchored the width by editing the File Upload Preferences and it works great, but I want to be able to anchor the height to the same value at the same time.
Thank you.
just found one bug. The {count} variable doesn’t increment right. It was switching between 1 and 2.
<
blockquote author=”sagebrown” date=”1261875290”>Hi all - Quick question - for some reason the {count} variable is getting mixed up with the weblog:entries {count} variable, and returning the number of weblog entries, and not the number of images found. Does this make sense? Here’s the code I’m using below. Instead of counting the images returned, it just repeats “1” for the number of weblog entries found.
[code] {exp:weblog:entries weblog="projects" limit="1"}
<ul>
{project-lightbox-images}
<li>
{file_url}
</li>
{/project-lightbox-images}
</ul>
{/exp:weblog:entries}[/code][/quote]
I’m using 3.1.1 of Mark Houts file extension and the count variable doesn’t increment. After investigating this is because he’s using array_flip as part of the variable setup code, which has the effect of losing the count variable on the last file returned from a multiple file list. This is because array_flip will remove duplicate entries.
To fix it I changed lines 1234 to 1236 from
$var = array_flip($var);
$var = array_map(create_function('$x', 'return LD.$x.RD;'), $var);
$var = array_flip($var);
to
$var_keys = array_keys($var);
$var_keys = array_map(create_function('$x', 'return LD.$x.RD;'), $var_keys);
$var = array_combine($var_keys,$var);
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.