Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#121 Yesterday 17:34:13
Offline
#122 Yesterday 18:02:19
Re: Automatic thumbnails for Textpattern
etc wrote #341672:
Ah. Ok. Reverted it to
$un, which is the last chunk, please test.
Thank you. I’m trying to make the matches more robust now. Tricky…
Thumbnails seem to be generated now, but the deletion still fails. http://localhost/txp/images/thumb/w200-h100/674.jpg
Yes, for it to work your path should (I think) be:
http://localhost/txp/images/thumb/w200-h100/txp/images/674.jpg
I suspect the fact it’s ‘shifted’ across to the right by 1 array index becuase of your subdir isn’t helping here. I thought subdirs were handled but maybe not. Hmmmm.
It’d be nice if we didn’t have to specify the subdir in the final URL path.
Last edited by Bloke (Yesterday 18:11:16)
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
#123 Yesterday 18:16:16
Offline
#124 Yesterday 18:22:19
Re: Automatic thumbnails for Textpattern
I was wondering if we have an /images/ too many in the url? Isn’t the intention to have:
https://domain.com/images/thumb/w200-h100/674.jpg
in a standard (non-subdirectory) installation.
TXP Builders – finely-crafted code, design and txp
Offline
#125 Yesterday 18:33:10
Re: Automatic thumbnails for Textpattern
jakob wrote #341675:
I was wondering if we have an
/images/too many in the url?
Not as it stands. It’s required. But yes, I think I’ll hack SLIR to remove the reliance on the full path at the end, if I can. It’s seriously annoying.
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
#126 Today 09:21:59
Re: Automatic thumbnails for Textpattern
etc wrote #341674:
And it would be perfect if SLIR physically stored thumbnails in
//path/to/site/image_dir/thumb/w200-h100/674.jpg...
I’m getting there. After refactoring the way it worked last night I think I can hack out the md4 code and swap it for the physical path. If that works, we can just jump straight to your proposal of using the absence of thumb to trigger generation.
It makes garbage collection more tricky but I’ll disable that for now.
I’m also considering removing the secondary request cache. Doesn’t seem worth the hassle, especially with the symlink rubbish that doesn’t work cross-platform.
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
#127 Today 09:39:11
Re: Automatic thumbnails for Textpattern
Bloke wrote #341678:
I’m getting there. After refactoring the way it worked last night I think I can hack out the md4 code and swap it for the physical path. If that works, we can just jump straight to your proposal of using the absence of thumb to trigger generation.
Fwiw, you latest code changes (path) work pretty well here with the various test articles and my various shortcodes.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg
Offline
#128 Today 10:13:25
Offline
#129 Today 10:20:02
Re: Automatic thumbnails for Textpattern
phiw13 wrote #341679:
Fwiw, you latest code changes (path) work pretty well here with the various test articles and my various shortcodes.
Fabulous. That’s great to know.
If anybody does want to jump in, please be my guest. I won’t be able to look at this until late this afternoon/evening.
I think to change the paths to store as Oleg suggests means altering requestURL() and the function above it that makes the md4. Just remove the md4, and alter the URL function to grab the trailing path of he URL verbatim, after sanitisation.
Then create any w200-h300-c2x3 directory etc that doesn’t exist as part of the SLIR squishing, and disable garbage collection in defaultconfig.php.
After that, we should be good to get txplib_misc.php to create a thumb URL based on the passed params and add it to the src attribute directly.
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