More to generating thumb name than this?

Discussion corner for Developers of Serendipity.
Post Reply
FishNiX
Regular
Posts: 40
Joined: Sun Sep 02, 2007 6:32 pm

More to generating thumb name than this?

Post by FishNiX »

Will the thumbname always be

Code: Select all

$basename . "." . $serendipity['thumbSuffix'] . "." . $extension
ie.
If I have a foobar-someimagefile.jpg -- will the thumb always be foobar-someimagefile.$serendipity['thumbSuffix'].jpg or will there be truncation, etc?

I'm trying to determine the thumbnail name in a plugin.

Thanks!
FishNiX
Regular
Posts: 40
Joined: Sun Sep 02, 2007 6:32 pm

Re: More to generating thumb name than this?

Post by FishNiX »

I guess I should be more clear -- basename is the full name of the image assigned in the media upload without the extension passed in through eventData -- my plugin is working off of the backend_image_add event hook and I want to get the thumb name reliably. thx!
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: More to generating thumb name than this?

Post by Timbalu »

FishNiX wrote:Will the thumbname always be foobar-someimagefile.$serendipity['thumbSuffix'].jpg or will there be truncation, etc?
I would say yes, but this question has to wait for an answer by Garvin, to have higher trust.
But I know that $serendipity['thumbSuffix'] is not build in every case, just if there is a need, by size and/or if file is a picture.The Admin Panel / General settings / Image Conversion Settings does set the $serendipity['thumbSuffix'] name eg. picturename.serendipityThumb.jpg.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
FishNiX
Regular
Posts: 40
Joined: Sun Sep 02, 2007 6:32 pm

Re: More to generating thumb name than this?

Post by FishNiX »

Garvin confirmed that this should be all there is to generating a thumb name reliably. Thanks to both of you.
Post Reply