Fork me on GitHub
Reply New Topic
2010/12/22 5:37:42
#21
Offline
Home away from home

Re: Smarty resized_image plugin: update

OK, updated again, but not perfect yet.

new version here:

http://www.isegura.es/blog/impresscms-can-resize-images-automatically-template

It will work properly on full URLs (http:// and all that), but I'm not sure it will work fine if the whole site is in a subfolder, such as "www.mysite.com/folder".

_________________
If you can't understand what I'm saying, you're not geek enough
ISegura.es

2012/8/20 4:20:19
#22
Offline
Webmaster

Re: Smarty resized_image plugin: update

This smarty plugin is very interesting. Would there be a way of having it standard in templates, to be used when an image is included somewhere?

For example, on the Wiki I want to be able include images. When the image is small enough, nothing is changed. When the image is too big to fit in the screen space allocated (the center column for example), a resized images is displayed, with a link (with or without colorbox) to the big original.

Is that possible, or would the plugin need to be changed?

_________________

Me on Ohloh


2012/8/20 10:01:28
#23
Offline
Home away from home

Re: Smarty resized_image plugin: update

can't answer your question David, but i can confirm the edits i made to the plugin in the 1.3.3 core allow this plugin to work if your site is in a sub folder.

_________________
Live as if you were to die tomorrow, Learn as if you were to live forever

The beauty of a living thing is not the atoms that go into it, but the way those atoms are put together!

2012/8/20 22:21:36
#24
Offline
Home away from home

Re: Smarty resized_image plugin: update

As it stands, the plugin resizes images to a specified size, whatever it may be. If you wanted to add conditions for resizing, you would need to add the logic to your code. However, the resized copies are cached, so there is not much overhead in the way it currently operates.

One way to get multiple resizing is to set up module preferences to handle display in different contexts (eg. centre, side column). Then you can specify which size you want the image to display at in your template, and change them module-wide by altering the value in your preferences. Most of the gone native modules work that way now.


2012/8/21 7:12:50
#25
Offline
Home away from home

Re: Smarty resized_image plugin: update

I think @Madfish is right and the latest revision for the next version (1.3.3) works very well.


2017/12/14 6:04:28
#26
Offline
Webmaster

Re: Smarty resized_image plugin: update

I'm resurrecting a very old post, but is there a good explanation on how to use this image resizer? I've tried it on a site, and I get blanks instead of an image URL...


_________________

Me on Ohloh


2017/12/19 0:22:12
#27
Offline
Just can not stay away

Re: Smarty resized_image plugin: update

fiammybe, I think it's related to PHP-GD lib. From the code what I see it's only possible to get empty response if resizing image or getting image info fails. Can it be that PHP-GD is missing on server? Also, it's possible that WideImage fails. idk, why there is methods in the code from GD lib and WideImage...


2017/12/26 20:41:07
#28
Offline
Home away from home

Re: Smarty resized_image plugin: update

It needs to write thumbnails to cache or templates_c, I forget which. So another possibility is if those aren't writable for some reason it will crash out.


Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.