Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 Yesterday 14:06:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,152
Website GitHub

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

Offline

#50 Yesterday 14:10:13

etc
Developer
Registered: 2010-11-11
Posts: 5,593
Website GitHub

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

#51 Yesterday 14:14:37

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,152
Website GitHub

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 maybe try ... 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

Offline

#52 Yesterday 14:20:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,152
Website GitHub

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

Offline

#53 Yesterday 16:19:58

etc
Developer
Registered: 2010-11-11
Posts: 5,593
Website GitHub

Re: Automatic thumbnails for Textpattern

Seems to behave now, though I’m mostly blind-coding here.

Offline

#54 Yesterday 18:42:26

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,152
Website GitHub

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

Offline

#55 Yesterday 19:40:18

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

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

#56 Yesterday 22:01:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,152
Website GitHub

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

Offline

#57 Yesterday 23:39:09

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

Re: Automatic thumbnails for Textpattern

Thank-you!


…. texted postive

Offline

#58 Today 02:16:50

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,561
Website

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

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,152
Website GitHub

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

Offline

#60 Today 08:49:28

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,152
Website GitHub

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

Offline

Board footer

Powered by FluxBB