We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

plugin: Image Sizer

Development and Programming

lumis's avatar
lumis
119 posts
17 years ago
lumis's avatar lumis

Dabbledoo make sure the user that is running the host for domain A has proper read wright permissions to the directory on host B also check that you can view the images in your browser not sure the below example is how you have it pathed

http://uw714doc.sco.com/en/FD_files/Getting_to_a_file.html#Creating_a_link_to_a_directory

if none of that works try turning on template debugging in the control panel or i could add in some output so we can see what is going on

       
dlw's avatar
dlw
17 posts
17 years ago
dlw's avatar dlw

I was wandering if anybody could help. I have a feeling that my error is because we are hosting on a windows server:

Notice: Undefined index: DOCUMENT_ROOT in D:\Domains\pfh.org.uk\wwwroot\admin\plugins\pi.imgsizer.php on line 129

I believe that DOCUMENT_ROOT might not be supported. Sorry if this is a newbie question to still getting to grips with php and EE.

My code look like the following:

{exp:imgsizer:size src="{available_properties_image}" width="90" alt="{title}"}

Cheers, Darren

       
dlw's avatar
dlw
17 posts
17 years ago
dlw's avatar dlw

As suspected the DOCUMENT_ROOT on IIS isn’t supported but if you create a seperate php.ini file and set the doc_root.

; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues.  The alternate is to use the
; cgi.force_redirect configuration below
doc_root = "D:\Domains\pfh.org.uk\wwwroot"
       
mmjaeger's avatar
mmjaeger
78 posts
17 years ago
mmjaeger's avatar mmjaeger
Erin yes you can control the height with 1.5 the width is scaled proportionally. about your additional request for square sizes. i plan on doing this soon where it would resize depending on the width or height then chop off the additional “top and bottom” or “right and left” depending. very similar to how flickr does there “square size”

any news on square images (zoom crop) - that feature would certainly be very helpful.

thanks for a nice plugin.

       
Henrik Eklund's avatar
Henrik Eklund
34 posts
17 years ago
Henrik Eklund's avatar Henrik Eklund

Excellent plugin, but… I get following errormessage:

Notice: Undefined index: extension in /hsphere/local/home/felicia/expressionengine.aomedia.se/svante/plugins/pi.imgsizer.php on line 128.

The strange thing is that it resizes my image ok, but leaves the errormessage. Any clues?

Heres my code that I’m using:

{exp:imgsizer:size src="/images/uploads{exp:extract_url_plus show="i;lename.x;tension"}{bild_1} height="154" alt="{title}" parse="inward"}

See http://expressionengine.aomedia.se/

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

I have found a bug (I think).

I am trying to call ImageSizer where I get the URL from some PHP code I have.

The following does not work, even though the image most definately exists:

{exp:imgsizer:size src="<?php echo "http://thedalzells.org/photos/September/IMG_2758.JPG" ?>" width="{img_size}" alt="{title}" justcheck="yes" debug="1"}

EDIT: OK, still an issue…it seems that this plugin doesn’t handle PHP properly.

       
lumis's avatar
lumis
119 posts
17 years ago
lumis's avatar lumis

echo “”; parsing input/output

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell
echo “”; parsing input/output

huh?

       
lumis's avatar
lumis
119 posts
17 years ago
lumis's avatar lumis

the php parsing stage would have to be set to input instead of output

       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

It is.

       
lumis's avatar
lumis
119 posts
17 years ago
lumis's avatar lumis

if you put just the image url in with no php does it work?

i just tried it with php as the src= param and it worked fine. do you have 1.5.2?

{exp:imgsizer:size src="<?php echo "http://www.lumis.com/media/images/336425407_efe2c8a5c7_m.jpg" ?>" height="100" width="100" debug="1"}
       
Erin Dalzell's avatar
Erin Dalzell
790 posts
17 years ago
Erin Dalzell's avatar Erin Dalzell

Hmmm…it works with a hard-coded URL string, just not my variable. OK..not the plugin’s fault.

Thanks for looking into it.

       
eclectiv's avatar
eclectiv
133 posts
17 years ago
eclectiv's avatar eclectiv

I’m using the Image Sizer plugin to display an index of my entries, and all works great when all the images are there. However, when an entry does not have a image, I get the following error:

Notice: Undefined index: extension in …/plugins/pi.imgsizer.php on line 128

Is there a way to not have this error show up when there’s no image? I would like just nothing to show up. Here’s the code I’m using:

{exp:imgsizer:size src="/images/uploads/event_images{exp:extract_url_plus show="i;lename.x;tension"}{event_image} width="170" alt="{title}" parse="inward"}

I’ve tried putting in a conditional like this, but this doesn’t work either.

{if event_image != ""}
{exp:imgsizer:size src="/images/uploads/event_images{exp:extract_url_plus show="i;lename.x;tension"}{event_image} width="170" alt="{title}" parse="inward"}
{/if}

Also, strangely, the error only shows up in Firefox (Mac). Safari and Camino doesn’t show the error.

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
17 years ago
Lisa Wess's avatar Lisa Wess

eclectiv - I don’t use this plugin, but have you considered using the search: parameter to limit that list to entries with an image? Or is that not appropriate in this case?

       
eclectiv's avatar
eclectiv
133 posts
17 years ago
eclectiv's avatar eclectiv

I’m not familiar with the search parameter, but I need to show all entries (in my case, individuals on a directory page), regardless of whether there’s a member image or not. I have a condition set so that if there’s no image, it’ll just show a default silhouette image.

       
First 3 4 5 6 7 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.