@ slapshotw Hey - thank you very much for the tip. This seems very promising. I took a look at the extension and it seems this function is called around line #917. What I can surmise from the info at us.php.net is that I just need to pass some additional parameters to enable the alpha channel.
So I tried the following
// =============================================
// Get SRC Image
// =============================================
if(($src_img = @imagecreatefromgif($server_path.$file_name)) !== FALSE) {}
else if(($src_img = @imagecreatefromjpeg($server_path.$file_name)) !== FALSE) {}
// original line #917
else if(($src_img = @imagecreatefrompng($server_path.$file_name)) !== FALSE) {}
// initial attempt
else if(($src_img = @imagecreatefrompng($server_path.$file_name); imageAlphaBlending($src_img, true); imageSaveAlpha($src_img, true);) !== FALSE) {}
// second attempt
else if(($src_img = @imagecreatefrompng($server_path.$file_name); imagealphablending($src_img, true); imagesavealpha($src_img, true);) !== FALSE) {}
My initial attempt simply locked up the CP. After uploading and then selecting a new tab in the cp nothing loaded - the requested section was reflected in the URL but all I got was a white page - not good.
My second attempt - though admittedly not much of a change, was to use all lowercase when applying the additional parameters because it seems that’s what Mark is doing.
Unfortunately, I got the same result.
I’d be curious to hear from Mark (or anyone else) is this is even possible or if he encountered the same issues?
Why can I not get the
file_thumb_url or file_url to work?
I am using this:
{exp:weblog:entries orderby="date" sort="desc" limit="4" weblog="photoweek" dynamic="no" disable="pagination|categories|member_data|trackbacks"}
{photoweek}
<div class="thumb"><a href="http://{file_url}">" title="{title}"]{file_thumb_url}</a> </div>
{/photoweek}
{/exp:weblog:entries}
And my output for the images is
href=""
Is it possible to have two fields set to be file uploads in the same weblog? I have set two fields as shown in the attached image, but when I go to submit it causes the browser to hang. If I remove one of the fields it works fine.
Alternatively, am I doing this wrong? Is there a better way to upload two versions of the same image? This is intended to show two sizes of a product image for use with the simple commerce module.
Cheers.
I would rather use only one file upload for uploading a product picture and then resizing it either by using the Image Sizer plugin or phpThumb.
That way you have total control of how the images are displayed and the user does not need to care about resizing images or uploading them properly sized.
I have attempted to wade through the hundreds of posts in this thread, but I have not been successful at finding a solution.
I had used this extension in the past and was running 3.1.0. I just needed it again and decided to update my version to 3.1.1. Now, when I attempt to publish or update an entry I get the following error:
Notice: Array to string conversion in /www/eh6627/public_html/eextreme/core/core.upload.php on line 95 The following errors were encountered * We were unable to upload your file. Make sure your upload directory has the correct permissions set. Return to Previous Page
The file is actually uploading and when I go back to edit the entry, the thumbnail is there and I can sucessfully remove it. But the same error (which is the default error in the upload module) is always there.
Any suggestions would be great.
I’m running 1.6.3 Build: 20080319
Thanks,
Rick
Will do, I had solspace checking why it wasn’t working, just found it bydisabling extensions one at a time. Thay may find a workaround, dunno. Will post if found.
I kept the Image extension 😉 It’s the extension for Images, not the entire module that causes a conflict, just disable either file or gallery extension, which adds the Image Tab in cp.
This thread is getting too chaotic to be useful
Can someone (maybe Mark Huot) organise all this feedback and create a proper changelog, release notes and FAQ?
I have used File on a number of projects and I really appreciate the work that has gone into it. However I think a large number of people are relying on it to work reliably out of the box, and version 3 seems no closer to this goal than version 1.
It seems like: The same problems are cropping up over again It seems like problems solved in one version then reappear later in another version.
It’s not clear what advantages the new versions have over the old ones Are there new features? Or just a different arrangement of the old ones? Using my own example, I got v1 and v2 to work quite easily but now find that v3.11 simply does not work, on the same server setup. This is odd - if it’s a nightly or untested build then it should be made clear.
It’s very difficult to find answers to common issues Forum threads, especially those as long as this, are a bad way to have to find answers to questions. A wiki, FAQ or other form of centralised knowledge base is a far better system. What about using Google code?
So again, I am sorry for having a moan, but I think a lot of people out there would get a lot of value out of fixing these issues - because it’s a great product and something that can potentially make a lot of people’s lives easier.
My apologize for continuing this thread further, but I wasn’t sure where to post my problem…
I was able to get this working perfectly fine with single image uploads, but when I got to try multiple uploads, it just spits out the same image, over and over. I’m using this code:
{photos}
(image tag){photos}(end image tag)
{/photos}
Any idea what’s going on? Could it be something that I’m not setting in a previous tag?
That worked great, thank you 😊
The last problem I’m running into is a bit more of a doozy. I’m setting up a lightbox by using the following:
{archive_photos}
{if {total_results} == 1}
{exp:imgsizer:size src="{file_url}" width="150" alt=""}
{/if}
{if {total_results} > 1}
{if {count} == 1}
{exp:imgsizer:size src="{file_url}" width="150" alt=""}
{/if}
{if {count} == 1}
<a >Browse photos of {title} »</a>
{if:elseif {count} != 1}
<a ></a>
{/if}
{/if}
{/archive_photos}
So basically what this is doing is displaying a solitary thumbnail if its by itself. If there’s more then one image, it’ll display the thumbnail again, but also add several links below it. The first link has to be different from the others in such that it has the link text (Browse photos of…). The other links supply information to the lightbox and tell it what to display in addition to the first link.
I’m running this through a reverse related tag, and it works great for every entry… except the first one. While most output looks like this:
<img >
<a >Browse photos</a>
<a ></a>
… the code that gets spit out for the very first entry looks like this…
<img >
<a >Browse photos</a>
<img >
<a >Browse photos</a>
I’m sure it has something to do with the {count} tag but I’m not sure how… any ideas?
blcarson– I’ve seen glitches with the count tag. What if you do the count using a PHP variable– does it work better?
evasion–I gave a method to do that on these two posts:
Post 1: http://ellislab.com/forums/viewthread/38997/P342/#334387 (the idea) Post 2: http://ellislab.com/forums/viewthread/38997/P342/#335189 (the code)
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.