15 of 17
15
plugin: Image Sizer
Posted: 31 July 2008 10:54 AM   [ Ignore ]   [ # 253 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  717
Joined  07-02-2007
stinhambo - 31 July 2008 10:34 AM

I assume that if I use the custom fields from my template and utilise your example I get -

{exp:extract_url:precise}
    {field}
    {exp
:html_strip keep="img"}{artists_works_piece}{/exp:html_strip}
    {
/field}
    {exp
:imgsizer:size src="{artists_works_piece}" width="140" alt=""}
{
/exp:extract_url:precise}

What is the {field}{/field} tag pair?

Here is an updated version with the undocumented feature.

File Attachments
pi.extract_url.zip  (File Size: 1KB - Downloads: 52)
 Signature 

Truly ExpressionEngine


Fielder Module ( Mass Custom Fields )
Super Cache (Cache heavy tag output)
reCAPTCHA Extension
Rewrite Module


See all my EE Addons (8)

Profile
 
 
Posted: 04 August 2008 04:41 PM   [ Ignore ]   [ # 254 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1593
Joined  01-05-2007

This didn’t work I’m afraid.

Here is the code I used -

{exp:extract_url:precise}
        {field}
            {exp
:html_strip keep="img"}{artists_works_piece}{/exp:html_strip}
       {
/field}
    {exp
:imgsizer:size src="{eu_url}" width="140" alt=""}
{
/exp:extract_url:precise}

Anything I’m doing wrong here?

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 06 August 2008 05:47 AM   [ Ignore ]   [ # 255 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1593
Joined  01-05-2007

Is there no way for these to work together?

I just get a big blank space in the rendered HTML.

 Signature 

 
Steven Hambleton | ExpressionEngine Development for Web & Graphic Design Agencies

Profile
 
 
Posted: 24 August 2008 04:45 PM   [ Ignore ]   [ # 256 ]  
Grad Student
Avatar
Rank
Total Posts:  56
Joined  04-14-2006

@ lumis I love this plugin and have used it lots & lots. It’s amazing.

I’m currently tryin to use it on my own site but it isnt working, see http://www.paulcripps.com/index_ee.php

This doesnt work {fav_img_url} is a custom filed containing {filedir_2}test.jpg… the tag is as follows:
{exp:imgsizer:size src=”{fav_img_url}” width=“445” alt=”{title}” debug=“1”} 

I hard code the url it works fine:
{exp:imgsizer:size src=“http://www.paulcripps.com/images/uploads/favs/test.jpg” width=“120” alt=”{title}” }

So it looks like its a server thing, any thoughts on the errors and how to fix?

Profile
 
 
Posted: 25 August 2008 01:59 AM   [ Ignore ]   [ # 257 ]  
Lab Assistant
RankRank
Total Posts:  276
Joined  07-04-2007

what does {fav_img_url} output if you put it in the template outside of the image sizer plugin?

Profile
 
 
Posted: 25 August 2008 07:50 AM   [ Ignore ]   [ # 258 ]  
Lab Assistant
RankRank
Total Posts:  276
Joined  07-04-2007

Hmm rather strangely I appear to have run into the same problem as Paul!

None of these work:
{exp:imgsizer:size src=“images/site/project-blank.png” width=“270” height=“100” alt=“test”}
{exp:imgsizer:size src=”/images/site/project-blank.png” width=“270” height=“100” alt=“test”}
{exp:imgsizer:size src=”{site_url}images/site/project-blank.png” width=“270” height=“100” alt=“test”}
{exp:imgsizer:size src=”{site_url}/images/site/project-blank.png” width=“270” height=“100” alt=“test”}

This works:
{exp:imgsizer:size src=“http://example.com/v2/images/site/project-blank.png” width=“270” height=“100” alt=“test”}

{site_url} outputs “http://example.com/v2/”

Any Idea what is up?

What is strange is I also more hosting on the the same shared server and it’s working fine on that other site, only difference is that I have a htaccess rule to remove the www part of the url.

*edit* here is some debug info:

src = images/site/project-blank.png
    img_base
= images/site
    img_basename
= project-blank.png
    img_extension
= png
    img_filename
= project-blank
    img_rootstep
= /home/user/public_html/images/site
    img_rootpath
= /home/user/public_html/images/site
    img_fromroot
= /home/user/public_html/images/site/project-blank.png


The above misses out the fact it is in a sub directory called V2…

src = http://example.org/v2//images/site/project-blank.png
    
img_base = http://example.org/v2//images/site
    
img_basename = project-blank.png
    img_extension
= png
    img_filename
= project-blank
    img_rootstep
= /home/user/public_html/http://example.org/v2//images/site
    
img_rootpath =
    
img_fromroot = /project-blank.png


This add a double slash to the rootstep, and im not sure if the domain should be their either

Profile
 
 
Posted: 25 August 2008 11:14 AM   [ Ignore ]   [ # 259 ]  
Grad Student
Avatar
Rank
Total Posts:  56
Joined  04-14-2006
Joobs - 25 August 2008 01:59 AM

what does {fav_img_url} output if you put it in the template outside of the image sizer plugin?

The output is, as you would expect: /images/uploads/favs/test.jpg
In admin I set the URL of Upload Directory to both

1 - /images/uploads/favs/
2 - http://www.paulcripps.com//images/uploads/favs/


The output error I get from image sizer plugin is :

src = //www.paulcripps.com/images/uploads/favs/test.jpg
    
img_base = //www.paulcripps.com/images/uploads/favs/test.jpg <
    
img_basename = p>
    
img_extension =
    
img_filename = p
    img_rootstep
= /content/DesignerPlus/p/a/www.paulcripps.com/web///www.paulcripps.com/images/uploads/favs/test.jpg <
    
img_rootpath =
    
img_fromroot = /p.

/
p. is not readable

You can see it here: http://www.paulcripps.com/index_ee.php/Home/image-resizer/

Any ideas, Im not great with servers php so sorry if its obvious?!!

Profile
 
 
Posted: 26 August 2008 03:46 AM   [ Ignore ]   [ # 260 ]  
Grad Student
Avatar
Rank
Total Posts:  56
Joined  04-14-2006

Lumus,

As previous posts my de-bug info can be seen here: http://www.paulcripps.com/index_ee.php/Home/image-resizer/

Excuse my ignorance here but here a few thoughts. Could we pass the parameter to the path where the folder is?
Only reason I say this is my custom field works fine, the image is uploaded and I can view it. So the problem is a server based path problem surely passing the exact path would work (as I say excuse my ignorance).

So:

{exp:imgsizer:size src="{my_custom_field_with_image_name_in}" width="140" img_root="http://www.paulcripps.com//images/uploads/favs/"}

I installed the EE gallery last night and that works fine giving me the desired result as you can see here: Though I would prefer to use the plugin: Image Sizer to give me a little more flexibility.

Profile
 
 
Posted: 26 August 2008 01:15 PM   [ Ignore ]   [ # 261 ]  
Grad Student
Avatar
Rank
Total Posts:  56
Joined  04-14-2006

er… ok, having done another test from scratch it was down to user error.

When I set up the custom field I selected Xhtml…

Published a test entry then realised the custom field was xhtlm.

Edited the custom field back to none.

BUT… DIDNT select update all entries (it was late honest).

Could we have a feature request for idiots like me so that we get a big pop up javascript ALERT aksing are you sure you DONT want to update all entries (joking)...

iMuppet

Profile
 
 
Posted: 28 August 2008 05:03 PM   [ Ignore ]   [ # 262 ]  
Grad Student
Rank
Total Posts:  64
Joined  01-14-2008

Lumis, thanks tons for this extension. smile Is there any chance we could get a new parameter in the plugin to control whether the image gets upscaled if the dimension specified is larger than that dimension on the original? It would basically emulate a kind of max-width setting. Something like this (assuming original image dimensions of 200 wide by 100 high):

{exp:imgsizer:size src=”/images/profile-photos/200x100/johndoe.jpg” width=“150” upscale=“no”} - would resize image to 150x75

{exp:imgsizer:size src=”/images/profile-photos/200x100/johndoe.jpg” height=“150” upscale=“no”} - would not resize image, but would display original image and dimensions

{exp:imgsizer:size src=”/images/profile-photos/200x100/johndoe.jpg” auto=“150” upscale=“no”} - would resize image to 150x75

Any chance of this? smile

Profile
 
 
Posted: 08 September 2008 01:42 PM   [ Ignore ]   [ # 263 ]  
Grad Student
Rank
Total Posts:  90
Joined  10-26-2007

Hi,
Anyone know if one can do conditionals inside the Image Sizer plugin? Something like this:

{exp:imgsizer:size src="{image}" width="540"}
    {if width
>= 540}
        
<p><img src="{sized}" width="{width}" height="{height}" class="corners iborder4 icolorffffff" alt="{image}" /></p>
    
{if:else}
        
<img src="{sized}" width="{width}" height="{height}" class="fright rpad corners iborder4 icolorffffff" alt="{image}" />
    
{/if}
{
/exp:imgsizer:size}

J

Profile
 
 
Posted: 08 September 2008 02:22 PM   [ Ignore ]   [ # 264 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  347
Joined  04-23-2008

I’ve recently switched over to Phpthumb due to some problems I was experiencing with Image Sizer that have gone unfixed for a long period. It’s a free plugin - and I love it to bits, but I had some weird problems resizing images over 500 pixels in width and some issues with using Image Sizer inside variable tag pairs as well as with resizing avatars.

With all that said, if Lumis would ever consider updating this plugin - I’d be quite interested in pledging a donation for it as I’ve always suggested. It’s so close to being production ready in almost all circumstances.

Keep it up man! Thanks again!

 Signature 

Danny, your poor-man’s EE designer for hire/help.

Profile
 
 
Posted: 30 September 2008 12:38 PM   [ Ignore ]   [ # 265 ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  02-16-2005
mr_dimsum - 08 September 2008 02:22 PM

I’ve recently switched over to Phpthumb due to some problems I was experiencing with Image Sizer that have gone unfixed for a long period.

Try Smart Image Resizer. Same idea as phpThumb but I’m finding it more lightweight and a bit faster.

Note to those who have used the lumis.com Image Sizer but not phpThumb:

Smart Image Resizer and phpThumb are PHP scripts; they have nothing to do with EE in particular. With either, you put their server path in front of an image’s src attribute (or an anchor’s href attribute) and the script takes it from there. Their docs explain it.

While I’m here: does anybody know how to get the Image Sizer plugin syntax to work as the href attribute of an anchor? I’d like to compare its performance to this Smart Image Resizer script. I can get Image Sizer to work fine as an image src, but not as an href.

Profile
 
 
Posted: 02 October 2008 03:59 AM   [ Ignore ]   [ # 266 ]  
Grad Student
Rank
Total Posts:  64
Joined  01-14-2008
spacewalk - 30 September 2008 12:38 PM

While I’m here: does anybody know how to get the Image Sizer plugin syntax to work as the href attribute of an anchor? I’d like to compare its performance to this Smart Image Resizer script. I can get Image Sizer to work fine as an image src, but not as an href.

Have you tried using it as a Tag Pair instead of a standalone tag? The output is pretty much completely customizable then.

Profile
 
 
Posted: 04 October 2008 09:05 AM   [ Ignore ]   [ # 267 ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  02-16-2005
KKCJ - 02 October 2008 03:59 AM
spacewalk - 30 September 2008 12:38 PM

While I’m here: does anybody know how to get the Image Sizer plugin syntax to work as the href attribute of an anchor? I’d like to compare its performance to this Smart Image Resizer script. I can get Image Sizer to work fine as an image src, but not as an href.

Have you tried using it as a Tag Pair instead of a standalone tag? The output is pretty much completely customizable then.

My problem is the fact that the href attribute of an HTML anchor tag needs to be inside quotes. I can’t make the ImgSizer tag work that way. I’ve tried surrounding it with the normal straight double quotes, with the html entity for a straight double quote, and with single quotes, but the plugin simply fails to function.

When you’re using the ImgSizer tag in place of an HTML img tag, it doesn’t need to be in quotes and it works fine.

Anyone?

Profile
 
 
Posted: 07 October 2008 12:45 PM   [ Ignore ]   [ # 268 ]  
Grad Student
Avatar
Rank
Total Posts:  75
Joined  02-16-2005
KKCJ - 02 October 2008 03:59 AM

Have you tried using it as a Tag Pair instead of a standalone tag? The output is pretty much completely customizable then.

Can I see an example of code that successfully uses Image Sizer to generate an href? Thanks.

Profile
 
 
Posted: 14 October 2008 10:29 AM   [ Ignore ]   [ # 269 ]  
Summer Student
Total Posts:  18
Joined  08-23-2007

was there ever a solution for this error?

Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\vhosts\innua.com\httpdocs\cms\controlpanel\plugins\pi.imgsizer.php on line 143

Profile
 
 
Posted: 17 October 2008 10:36 AM   [ Ignore ]   [ # 270 ]  
Summer Student
Total Posts:  14
Joined  03-18-2007

Has anyone managed to get this working with Extract_url or something like it?

I’ve tried Victors suggestions to no avail.

This is an awesome plugin and it’d be great if my users could just upload an image to a custom field, and I could programatically strip out the html of the img tag ready for use with the resizer.

Any help much appreciated!

Profile
 
 
   
15 of 17
15
 
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 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65026 Total Logged-in Users: 42
Total Topics: 82116 Total Anonymous Users: 19
Total Replies: 441305 Total Guests: 189
Total Posts: 523421    
Members ( View Memberlist )
Newest Members:  meenoiYang.JianuoioitsukiNathan HammondalexcigadamstaneckiLucas Mayscybermilltstitt