Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2025-06-26 14:21:53

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,352
Website GitHub Mastodon

Re: wet_quickopen: Open recent (and not so recent) articles quickly

wet_quickopen v1.6 is ready for Textpattern 4.9. Due to changes in the core’s admin-side markup, it probably won’t support any prior Textpattern version.

Offline

#26 2025-07-03 23:39:45

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

Re: wet_quickopen: Open recent (and not so recent) articles quickly

wet wrote #339922:

wet_quickopen v1.6 is ready for Textpattern 4.9. Due to changes in the core’s admin-side markup, it probably won’t support any prior Textpattern version.

Works fine and fast. One thing you do to improve: add a <label for=""> before the search field. Everyone benefits, and that makes the HTML valid. You can visually hide the label, making it only “visible” to AT tools (screen readers, etc)

<label for="wet_quickopen_search" class="txp-accessibility">Search recent articles</label>
<input id="wet_quickopen_search" type="search" ………>

The .txp-accessibility class does the job of visually hiding the label


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

Offline

#27 2025-07-04 09:28:29

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,352
Website GitHub Mastodon

Re: wet_quickopen: Open recent (and not so recent) articles quickly

Thanks for the report, Phil. This issue has been fixed.

Offline

#28 2025-07-05 05:23:37

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

Re: wet_quickopen: Open recent (and not so recent) articles quickly

Good and nice thank you. This makes a recent articles block much more useful.

I am always amazed at the speed of search in the Textpattern admin side.

Next step, when you have some energy left, perhaps you can make the plugin CSP aware, following the steps Jakob outlined in this thread. (other example, smd_thumbnails).

PS – As this plugin is Textpattern 4.9 only, you don’t need the if{} else{}

Last edited by phiw13 (2025-07-05 05:26:35)


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

Offline

#29 2025-07-05 06:03:37

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,352
Website GitHub Mastodon

Re: wet_quickopen: Open recent (and not so recent) articles quickly

Will do, thanks for the pointers.

Phew, lots have happened since I made a living from webdev. lmddgtfm.

Offline

#30 2025-07-05 07:44:44

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

Re: wet_quickopen: Open recent (and not so recent) articles quickly

DDG search string: MDN CSP (for things web, the MDN prefix followed by $search term always returns the Moz. Developer site for me. Same for Brave search)

good start: developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP


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

Offline

#31 Yesterday 04:55:25

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,352
Website GitHub Mastodon

Re: wet_quickopen: Open recent (and not so recent) articles quickly

phiw13 wrote #339983:

PS – As this plugin is Textpattern 4.9 only, you don’t need the if{} else{}

This sentence is a subtle riddle which I fail to solve ;)

Mind helping me with a cheat pointing at the lines you suggest removing, e.g.?

Offline

#32 Yesterday 05:53:46

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

Re: wet_quickopen: Open recent (and not so recent) articles quickly

wet wrote #339987:

This sentence is a subtle riddle which I fail to solve ;)

Yeah, maybe a little cryptic… I was talking about another if{}/else{} actually.

If you look a Jakobs example (bot_wtc.php) the code for loading the styles/scripts is called this way:

if (class_exists('\Textpattern\UI\Style')) {
        echo Txp::get('\Textpattern\UI\Style')->setContent($styles);
    } else {
        echo '<style>' . $styles . '</style>';
    }

the first if{} detects Textpattern 4.9, then the else part is the “old fashioned” way for older versions of Textpattern. If the plugin only supports Textpattern 4.9, that detection switch is not needed.

–^–

Textpattern 4.9 has a builtin method to use a strictish, nonce based CSP, activated through config.php, sample here. When included, Textpattern send the appropriate CSP header and applies a nonce to all scripts and style blocks on the admin side. See also how conforming admin themes load their script and style resources, e.g. theme Hive.


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

Offline

#33 Yesterday 11:35:53

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,352
Website GitHub Mastodon

Re: wet_quickopen: Open recent (and not so recent) articles quickly

phiw13 wrote #339983:

…perhaps you can make the plugin CSP aware, following the steps Jakob outlined in this thread. (other example, smd_thumbnails).

There you have it.

Thanks for the guidance! It gave us wet_quickopen v1.7.0.

Offline

#34 Yesterday 21:08:17

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,936
Website GitHub

Re: wet_quickopen: Open recent (and not so recent) articles quickly

I was stupid enough to load the plugin without wet_peex and was rewarded with a series of error messages when using PHP 8.4. It would seem that the old way of passing an error message is deprecated in PHP 8.4. It doesn’t seem to be related to your plugin, rather to Textpattern’s error handling. I filed an issue to this effect.

With wet_peex it, of course, works just fine.


TXP Builders – finely-crafted code, design and txp

Offline

#35 Today 02:30:18

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

Re: wet_quickopen: Open recent (and not so recent) articles quickly

wet wrote #339989:

There you have it.

Thanks for the guidance! It gave us wet_quickopen v1.7.0.

Works lovely on this (strict-)CSP protected site. Thank you.

jakob wrote #339990:

I was stupid enough to load the plugin without wet_peex and was rewarded with a series of error messages when using PHP 8.4. (…)

Despite having seen the GH issue report and read your quoted post I of course forgot it all the moment I wanted to test the plugin and forgot to enable wet_peex… I’ll blame the weather gods.


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

Offline

Board footer

Powered by FluxBB