Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2020-08-17 01:33:10

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,145
Website

Re: rss_admin_db_manager: Database management in Textpattern

Bloke wrote #325402:

The markup’s ancient on the SQL results page.

Yeah, I thought so… and I didn’t’t imply otherwise

If anyone would like to suggest some more admin-theme friendly containers, please do so and I’ll implement it.

First pass

look for the <!-- demo code start here --> comment where the important stuff is.

that is based on the txp_user SQL table (was wide enough, enough columns and easy to clean up out of my local playground). most inline CSS is removed, with the exception of that red and blue text under the textarea. we don’t have core classes that matches exactly that meaning I think.

PS – the HTML structure is based on the Plugins panel.

Last edited by phiw13 (2020-08-17 01:35:55)


Where is that emoji for a solar powered submarine when you need it ?

Offline

#12 2020-08-17 08:48:04

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,789
Website

Re: rss_admin_db_manager: Database management in Textpattern

Thank you so much. I’ve grabbed the code and will fold the wrappers into the plugin.

Things do still go wonky when viewing some table content because they have Textile/HTML markup in them which gets rendered or matching style rules get executed. Not a lot we can do about that unfortunately. But hopefully constraining the content to a scrollable table will at least help.

Last edited by Bloke (2020-08-17 08:50:01)


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

#13 2020-08-17 08:51:57

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,789
Website

Re: rss_admin_db_manager: Database management in Textpattern

One thing I’d also like to do (somehow) is a pref to control how many rows are fetched by default when you click a table from the plugin’s list of tables panel. Currently it gets all rows, which for some tables means looooong execution times if there’s a tonne of data.

That does imply being able to paginate on the SQL panel though, which might be cumbersome. Will have to see what’s feasible.


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

#14 2020-08-17 09:32:17

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 2,145
Website

Re: rss_admin_db_manager: Database management in Textpattern

[…] because they have Textile/HTML markup in them which gets rendered or matching style rules get executed. Not a lot we can do about that unfortunately

Indeed that could be a problem made worse if the relevant cell contains invalid or partial HTML code. As you say, probably not much can be done about it, unless you know of a super secret sauce that will magically disable all those HTML tags. as far as I can remember, the current core HTML and CSS code, combined with the browser default recovery methods for borked HTML is robust enough to tolerate quite a bit without the page going completely pear-shaped.


Where is that emoji for a solar powered submarine when you need it ?

Offline

#15 2020-08-17 09:35:41

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,789
Website

Re: rss_admin_db_manager: Database management in Textpattern

phiw13 wrote #325423:

unless you know of a super secret sauce that will magically disable all those HTML tags.

The only thing I can think of is to strip tags wholesale, or htmlencode them. The latter is more ‘complete’ because at least you see the tags in the output. Arguably, we should be doing that anyway as it’s safer. In theory, at the moment, if you loaded the content of the Forms table and you had JavaScript in some of your Forms, it’d run.


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