Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2021-01-04 15:04:37

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

Re: Field test request - custom fields order on Write panel

jakob wrote #328021:

bot_wtc should continue to work because it just uses to jQuery to reposition the fields after they’ve been rendered.

Ah yes, that should be fine then.

It might have an effect on the output of the fields in glz_cf though because IIRC it does use the position field to determine the order in which they are output.

That’s what I thought and would likely be the main casualty of this ksort() approach. It’ll largely depend at what point the plugin hooks into the process. If it does it before Txp gets its mitts on things then the ksort() will likely override it. If, however, it’s a pluggable_ui() hook and just replaces the content at that point, we might be lucky as Txp should leave it alone.

Thanks in advance for testing.


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

Online

#22 2021-01-04 17:27:00

etc
Developer
Registered: 2010-11-11
Posts: 4,076
Website

Re: Field test request - custom fields order on Write panel

To test, but I’m pretty confident glz_cf does not alter get_prefs() function and goes the second way, via pluggable_ui().

Offline

#23 2021-01-05 12:45:53

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

Re: Field test request - custom fields order on Write panel

Bloke wrote #328020:

Anyone with access to bot_write_tab_customize and glz_custom_fields, please test the bleeding edge 4.8.5 to see if the custom fields order can still be customised, or if this changes stomps over it.Thank you.

Just tried glz_custom_fields and bot_wtc with the current dev version (#44f395df) and ordering and shifting fields around works in both plugins.

Some other things need tending to:

  • bot_wtc needs the removal of a line that still uses get_magic_quotes(). Am I right in assuming doSlash() is no longer required?
  • glz_custom_fields needs a function trimming (only produces a warning during installation) but it could now also store its js and css files in the plugin folder, obviating the need to upload those separately.

TXP Builders – finely-crafted code, design and txp

Offline

#24 2021-01-05 13:50:41

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

Re: Field test request - custom fields order on Write panel

jakob wrote #328041:

Just tried glz_custom_fields and bot_wtc… shifting fields around works in both plugins.

Thank you so much for testing. Great to hear it works.

bot_wtc needs the removal of a line that still uses get_magic_quotes(). Am I right in assuming doSlash() is no longer required?

Still vital (unfortunately, until we use parametric queries or move to PDO) if you have any user input or stuff that’s read from prefs or tables or, well, anything that has the potential to be tampered with. So that line should become:

$item = doSlash($item);

glz_custom_fields needs a function trimming but it could now also store its js and css files in the plugin folder

Yes that’d be brilliant! And in 4.9.0 these bundled assets will show up in the list of things to be installed.


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

Online

#25 2021-01-05 14:11:04

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

Re: Field test request - custom fields order on Write panel

Bloke wrote #328042:

So that line should become:

Excellent. That’s done. Will test more extensively with new versions of txp + php in due course and then repackage.

Yes that’d be brilliant! And in 4.9.0 these bundled assets will show up in the list of things to be installed.

Must look up what I need to do there. I know you told me once before… Nice that 4.90 notifies installers of what’s being added.


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB