Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 Today 11:01:49

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

Re: Automatic thumbnails for Textpattern

jakob wrote #341522:

Here too 👍 👍. Thanks.

My instinct is to shift it up alongside the ID to save space, but that’s easily done in a custom theme (css) with float:left and margin-inline-end on the id block in css.

Bloke wrote #341524:

Mine too. Amendments / PRs welcome if it improves things (though an ‘ID’ heading that also includes dimensions might be less intuitive to assistive tech).

I was thinking more like this: dev.l-c-n.com/txp-4.9/secondary/content-image_edit.html although the horizontal spacing need some attention.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#38 Today 11:06:18

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

Re: Automatic thumbnails for Textpattern

Bloke wrote #341525:

This needs possible attention. I uploaded a handful and the thumbs all automatically appeared, but there may be situations where this doesn’t happen that we need to ferret out.

I am not sure what the last action was, possibly viewing an image that had a custom thumb type. And not all images of my batch uploaded (too big, that install was set to default max-size ) and a warning was triggered.

I‘ll test more tomorrow while taking note of my exact steps.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#39 Today 11:28:32

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,088
Website GitHub

Re: Automatic thumbnails for Textpattern

I think the markup is okay and correct. Maybe each does what they prefer in their own admin theme (or custom.css file).

  • Philippe’s keeps each in a row of its own but places the value to the right of the label. Looks okay. With grid you could make the indent more consistent, but then labels in different languages vary in length.
  • My earlier quick-fire experiment put the stacked label + field of each next to each other.
  • For myself, I’d probably put them all in one row and hide the “Dimensions” label using .txp-accessibility and place a middot between them. More like the ID information on the write tab.

EDIT: But the dropdown above the thumb could do with some margin-bottom like .image-replace has for the main image, e.g.:

 .txp-thumb-type {
    margin-block-end: 1em;
}

TXP Builders – finely-crafted code, design and txp

Offline

#40 Today 12:16:30

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

Re: Automatic thumbnails for Textpattern

Is there any existing semantically applicable class I can add to the thumb type wrapper to apply that bottom margin? I’m conscious that I don’t have write access to Phil’s admin side repo, and even if I did I’d need to install SASS/SCSS and figure out how to rebuild the minified source properly.

As for the id+dimensions, I’m easy, though it does take up possibly unnecessary vertical space as it stands. I like the inline version best, but the two blocks stacked side by side also works for me.

Are either / both achievable with core classes and markup patterns? If not, would it be helpful to add one?

Last edited by Bloke (Today 13:35:09)


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

#41 Today 12:57:52

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

Re: Automatic thumbnails for Textpattern

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).

Offline

#42 Today 13:07:07

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

Re: Automatic thumbnails for Textpattern

For the thumb type wrapper, use a <p>. automatically you get a margin-block-end as needed.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#43 Today 13:14:30

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

Re: Automatic thumbnails for Textpattern

etc wrote #341531:

Function imagedestroy() is deprecated since 8.5, as it has no effect since PHP 8.0...

Bah. Better now?


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

#44 Today 13:21:45

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

Re: Automatic thumbnails for Textpattern

Different.

Non-canonical cast (integer) is deprecated, use the (int) cast instead on line 670

Offline

#45 Today 13:22:23

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

Re: Automatic thumbnails for Textpattern

phiw13 wrote #341532:

For the thumb type wrapper, use a <p>. automatically you get a margin-block-end as needed.

If only everything was so easy

Thank you.


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

#46 Today 13:23:02

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

Re: Automatic thumbnails for Textpattern

etc wrote #341534:

Different.

Non-canonical cast (integer) is deprecated, use the (int) cast instead on line 670...

Ah yeah, I’ll need to check (boolean) and stuff too. Will fix, thanks.

EDIT: Fixed

Last edited by Bloke (Today 13:27:25)


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

#47 Today 13:44:16

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

Re: Automatic thumbnails for Textpattern

Still no joy, but this might be os-dependent:

symlink(): Permission denied on line 1170

Offline

#48 Today 14:02:45

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

Re: Automatic thumbnails for Textpattern

etc wrote #341538:

Still no joy, but this might be os-dependent: symlink(): Permission denied on line 1170...

Drat. It is. It symlinks from /cache/request to /cache/rendered. I’ll neeed to (somehow) test if symlink capability is available and, if not, duplicate the file in the library.

This hack makes me nervous so I might DIY this and do some physical file creation if the symlink() call fails. At least that way, the current unlink() should work on Windows. Otherise we’d need to also detect if that fails and do rmdir() instead.


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