Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-02-11 00:29:10

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,075
Website Mastodon

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

#2 2014-02-11 11:29:29

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

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

#3 2014-02-11 11:54:53

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

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

#5 2014-02-12 05:48:41

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,075
Website Mastodon

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

#7 2014-02-12 07:11:55

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,075
Website Mastodon

Re: Using TimThumb.php with article_image

milosevic wrote #278829:

If you like timthumb give a try also to SLIR.

thanks! I have downloaded it


…. texted postive

Offline

#8 2023-01-02 18:15:16

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,075
Website Mastodon

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.

Happy New Year!

…. texted postive

Offline

#9 2023-01-02 18:50:30

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,596
Website

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

#10 2023-01-02 21:29:35

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,075
Website Mastodon

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

Board footer

Powered by FluxBB