10 of 10
10
Solution for on the fly image resizing… almost.
Posted: 26 September 2007 01:42 PM   [ Ignore ]   [ # 163 ]  
Lab Assistant
RankRank
Total Posts:  293
Joined  09-06-2006

getting closer I tried the exact url plus and now at least I get an error

<img src="http://domain.ca/phpThumb/phpThumb.php?src=/hart/images/uploads/{exp:extract_url_plus show="& filename. % extension"}{main-pic}{/exp:extract_url_plus}&w=50" />

brings up the phpthumb error

“/home/user/public_html/hart/images/uploads/ No URL Found” does not exist


if I try to use just {main-pic} in my template I get this output when I view my page:

http://domain.ca/hart/images/uploads/42crawford.jpg

Profile
 
 
Posted: 26 September 2007 01:53 PM   [ Ignore ]   [ # 164 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6243
Joined  08-04-2002

Hmmm…the only time I’ve ever gotten an error is if one of my paths has been wrong. I’ve had to play with them at times.
Make sure the permissions on the directories are all right too… my image directory is 777, the utilities/phpThumb/cache directories are 755

(Presuming you added spaces like me to the ExtractURL-Plus parameters.)

Profile
 
 
Posted: 26 September 2007 03:55 PM   [ Ignore ]   [ # 165 ]  
Lab Assistant
RankRank
Total Posts:  293
Joined  09-06-2006

even if I try something like this

{exp:extract_url_plus show="% fullfilename"}{main-image}{/exp:extract_url_plus}

I get a “No URL found” error

so it appears to me it has something to do with my plugin

all those directories have the correct permissions.

(space added after the %

it has to be the extract_url-plus plugin becasue this works if I hard code it

<img src="http://domain.ca/phpThumb/phpThumb.php?src=/hart/images/uploads/42crawford.jpg&w=50" />
Profile
 
 
Posted: 23 February 2008 07:45 AM   [ Ignore ]   [ # 166 ]  
Grad Student
Rank
Total Posts:  67
Joined  03-04-2005

Hi folks!
As I understood, this link

<img src="http://mydomain.com/phpThumb.php?src={exp:extract_url}{main-pic}{/exp:extract_url}&w=50&h=50" />

can resize only one image in field {main-pic}???
What sould to do I I have more than one image, for example

<img src="{filedir_1}add_pic3.gif" style="border: 0;" alt="image"/>
<
img src="{filedir_1}pic123.gif" style="border: 0;" alt="image"/>
Profile
 
 
Posted: 23 February 2008 01:31 PM   [ Ignore ]   [ # 167 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  502
Joined  07-12-2005
Qrat - 23 February 2008 07:45 AM

Hi folks!
As I understood, this link

<img src="http://mydomain.com/phpThumb.php?src={exp:extract_url}{main-pic}{/exp:extract_url}&w=50&h=50" />

can resize only one image in field {main-pic}???
What sould to do I I have more than one image, for example

<img src="{filedir_1}add_pic3.gif" style="border: 0;" alt="image"/>
<
img src="{filedir_1}pic123.gif" style="border: 0;" alt="image"/>

I’m really unclear what you’re asking, unless it’s as obvious as:

<img src="/phpThumb.php?src=/hardcode/this/directory/add_pic3.gif&w=50&h=50" style="border: 0;" alt="image"/>
<
img src="/phpThumb.php?src=/hardcode/this/directory/pic123.gif&w=50&h=50" style="border: 0;" alt="image"/>

What do you have for {main-pic}? A series of images or an array or something?

 Signature 

Technology Consulting
Jobs, apartments, working and moving to Spain.

Profile
 
 
Posted: 23 February 2008 03:20 PM   [ Ignore ]   [ # 168 ]  
Grad Student
Rank
Total Posts:  67
Joined  03-04-2005

Ok I shoult try to explain my problem.
I have custom fields and {main-pic} (in my case {screen})
In this custom field I place images, so I get code after paste

<img src="{filedir_1}add_pic3.gif" style="border: 0;" alt="image"/>
<
img src="{filedir_1}pic123.gif" style="border: 0;" alt="image"/>

Template has

<img src="http://somesite.com/phpThumb/phpThumb.php?src={exp:zm_extract_url_plus show="file_path"}{screen}{/exp:zm_extract_url_plus}&amp;h=200" border="0" alt="{title}" />

At the output I get only one resized image add_pic3.gif

<img  src="http://somesite.com/phpThumb/phpThumb.php?src=/images/uploads/add_pic3.gif&amp;h=200" alt="title" border="0">
Profile
 
 
Posted: 23 February 2008 04:12 PM   [ Ignore ]   [ # 169 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6243
Joined  08-04-2002

In this custom field I place images

So, you have two images in one field? If so, you’re going to have to resort to some kind of PHP or something to get at them individually. Or have more than one image field.

Profile
 
 
Posted: 23 February 2008 04:14 PM   [ Ignore ]   [ # 170 ]  
Lab Assistant
RankRank
Total Posts:  293
Joined  09-06-2006

r u using the file extension that allows multiple files?

Profile
 
 
Posted: 24 February 2008 02:15 AM   [ Ignore ]   [ # 171 ]  
Grad Student
Rank
Total Posts:  67
Joined  03-04-2005

No, I just using “File Upload” twice and place images in one field twice.

you’re going to have to resort to some kind of PHP

unfortunately, don’t know some kind of PHP

Or have more than one image field.

It’s not a panacea to me (

Profile
 
 
Posted: 24 February 2008 08:43 AM   [ Ignore ]   [ # 172 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6243
Joined  08-04-2002

I’m not great at PHP so for me the solution, panacea or not, would be two fields. It offers the most forward flexibility also.

Profile
 
 
Posted: 15 March 2008 03:07 PM   [ Ignore ]   [ # 173 ]  
Grad Student
Avatar
Rank
Total Posts:  72
Joined  06-21-2007

Thanks to everyone on this thread for taking the time to post your insight! I’ve been quietly reading from the sidelines, and this thread has solved a HUGE need for my clients: auto-generating square, cropped thumbnails for the photo gallery module independent of the full size images. Thanks Jesse for your initial post (ages ago), and for everyone’s contributions with phpThumb! Excuse the interruption, and please continue grin

 Signature 

Andy Johnson
Shaping the Page | Twitter | LinkedIn

Profile
 
 
Posted: 30 September 2008 10:20 AM   [ Ignore ]   [ # 174 ]  
Summer Student
Total Posts:  6
Joined  08-02-2008

thanks for everyone’s contributions on this thread. i have high hopes for this plug-in once i get it working!

this is the code i have in my template (i put a space in the img tag to get it to render properly in this post) :

< img src=“http://www.toocooltodie.com/utilities/phpThumb/phpThumb.php?src={exp:extract_url}{reviews_main}{/exp:extract_url}&w=150&h=150” />

and this is what appears in the img src tag when it’s rendered on the site

http://www.toocooltodie.com/utilities/phpThumb/phpThumb.php?src=http://www.toocooltodie.com/images/uploads/sleeve.jpg&w=150&h=150

and that image displays fine when using that url. however that url gives a broken image in the actual page!

http://www.toocooltodie.com/index.php?/tctd/reviews/test_review/

any thoughts on why?

thanks!!


[EDIT] ok durr i realized why..somehow curly quotes got in my img tag..thanks!

Profile
 
 
   
10 of 10
10
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1743, on December 02, 2009 03:47 PM
Total Registered Members: 120478 Total Logged-in Users: 56
Total Topics: 126553 Total Anonymous Users: 21
Total Replies: 665404 Total Guests: 301
Total Posts: 791957    
Members ( View Memberlist )