Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Using TimThumb.php with article_image
While after three hours of various markup i finally got TimThumb image resizing to work!!
Final clue was offered by what
GugUser wrote #278181:
I added this to my Form home_static
<txp:if_article_image>
<p><txp:images auto_detect="article" break="" form="home_image" /></p>
</txp:if_article_image>
and then in my form home_image i have :
<img src="<txp:site_url />scripts/timthumb.php?src=<txp:image_url />&h=138&w=320&" alt="<txp:image_info type='alt'/> "/>
I thought i would post it here as I couldn’t find such an example. And to make sure I have done it correctly and efficiently.
PS one glitch i didn’t overcome was to get the PNG transparency to work. i am developing locally and maybe don’t have the correct version of the GD library.
…. texted postive
Offline
Re: Using TimThumb.php with article_image
Giovanni, I know Textgarden uses TimThumb – it might be worth you getting in touch with Stuart to share tips.
Offline
Re: Using TimThumb.php with article_image
The documentation already has mention of using TimThumb in the txp:images tag reference.
However, I have now also added an example of use in the txp:if_article_image tag reference.
Hope that helps in future.
Offline
#4 2014-02-11 12:44:42
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: Using TimThumb.php with article_image
An other way is with the smd_thumbnail plugin.
Offline
Re: Using TimThumb.php with article_image
GugUser wrote #278814:
An other way is with the smd_thumbnail plugin.
Right. I have a hard time finding plugins. I have heard talk about having a more up-to-date place to find/search for plugins.
I find this site to be suspect as i think it hasn’t been weeded of old outdated stuff. Maybe it’s only my impression.
Last edited by bici (2014-02-12 05:49:05)
…. texted postive
Offline
#6 2014-02-12 06:48:01
- milosevic
- Member
- From: Madrid, Spain
- Registered: 2005-09-19
- Posts: 390
Re: Using TimThumb.php with article_image
If you like timthumb give a try also to SLIR.
<txp:rocks/>
Offline
Re: Using TimThumb.php with article_image
…. texted postive
Offline
Re: Using TimThumb.php with article_image
GugUser wrote #278814:
An other way is with the smd_thumbnail plugin.
I think TimThumb.php nolonger works on newer versions of PHP. I pointing it to another server for it to work. In any event i am happy to move on and try smd_thumbnail plugin
Before i do, one of the features i like about TimThumb is that that it can create a circular image from a sq one. Will i be be able to do this with smd_thumbnail
? I checked the docs but not sure i saw that option.
…. texted postive
Offline
Re: Using TimThumb.php with article_image
No, smd_thumbnail won’t do that but you can achieve the same using CSS by putting border-radius: 50%
on the img tag or the container around the image.
EDIT: Some more information here and object-position if you’re looking to shift the point of focus to the centre of the circle.
TXP Builders – finely-crafted code, design and txp
Offline
Re: Using TimThumb.php with article_image
jakob wrote #334442:
No, smd_thumbnail won’t do that but you can achieve the same using CSS by putting
border-radius: 50%
on the image tag or the container around the image.
kaboom!. thanks
…. texted postive
Offline
Pages: 1