Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Automatic thumbnails for Textpattern
Oleg: I’m going out now, but if you want to squint through the /lencioni class and find instances of symlink() in SLIR.php, you could try hacking it. There’s only one to fix, afaik.
Alternatively, look in SLIRConfigDefaults.php. There’s a symlink pref there which is set to true. Maybe set it false if ISWIN is set, which will automatically bypass the request cache? Might be simpler.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: Automatic thumbnails for Textpattern
As I get it, symlink() function exists on windows, just has no sufficient rights. The thumbnail is created anyway, so maybe try ... catch?
Offline
Re: Automatic thumbnails for Textpattern
etc wrote #341543:
As I get it,
symlink()function exists on windows, just has no sufficient rights. The thumbnail is created anyway, so maybetry ... catch?
By all means give it a go. I can’t test on Windows unfortunately.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: Automatic thumbnails for Textpattern
The lencioni code is abandonware so treat it as if it is core code, and hack anything that can improve it. I’ve turned off composer updates so it should never request new stuff from the upstream project.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Offline
Re: Automatic thumbnails for Textpattern
etc wrote #341548:
Seems to behave now
That looks perfectly reasonable, thank you.
I’m mostly blind-coding here.
Ha! Welcome to my world the last few weeks.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: Automatic thumbnails for Textpattern
I just clued in that I may be clueless on the role of thumbnails in the Images panel of the Admin. Are they to offer a visual clue to what an image is as otherwise we only have text/id information? Or are they used to place a thumbnail image on the public facing website? Or Both? (colour me slow)
…. texted postive
Offline
Re: Automatic thumbnails for Textpattern
Both. They show up on the images panel to help you find the one you’re working on, and then you can use the image and/or thumbnail tags to display them on the website. Out of the box, Txp only offered a single thumb.
Using my old plugin you could extend that to multiple thumbnails but you had to make a bunch of “profiles” in advance at varying sizes, and render the smaller versions before they could be used on the front-end.
This latest change means you don’t have to create a slew of thumbnails in advance to show on the website. You just specify what size images you want in your templates (width and height attributes) and Textpattern will create them for you on the fly, natively in core.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: Automatic thumbnails for Textpattern
Thank-you!
…. texted postive
Offline
#58 Today 02:16:50
Re: Automatic thumbnails for Textpattern
etc wrote #341531:
First report:
Function imagedestroy() is deprecated since 8.5, as it has no effect since PHP 8.0...This prevents thumbnails from being displayed on the first load after their creation (PHP 8.5+ only).
That was it that prevented the thumbnail image from appearing immediately after upload!
Strange there was no PHP error messages shown, despite being in debugging mode.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#59 Today 08:46:48
Re: Automatic thumbnails for Textpattern
phiw13 wrote #341562:
That was it that prevented the thumbnail image from appearing immediately after upload!
Yay, another bug squished.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
#60 Today 08:49:28
Re: Automatic thumbnails for Textpattern
phiw13 wrote #341562:
Strange there was no PHP error messages shown, despite being in debugging mode.
Yes, this is an annoying feature of messing with the image headers. When we change the header, it effectively swallows any output. Not found a way round that, besides writing stuff to an error log file, which I might do at some point.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online