Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-11-07 00:17:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,445
Website GitHub

smd_prefalizer: directly edit prefs

Adds an interface on the Admin tab for taking a peek behind the curtain of your preference settings. Find, edit or delete any existing preferences — including hidden ones — or create new prefs directly. Very useful for purging old prefs after deleting plugins, or for keeping tabs on the myriad per-user prefs that can now litter your database.

Download it (Requires TXP 4.2.0+)

The plugin won’t let you delete anything crucial (i.e. your system prefs are safe) but watch your step because it does tiptoe directly through the prefs table. If you accidentally use the plugin to brutally lop a vital limb from your site you’ll be needing that recent backup sharpish.

As always, report any goodness, badness or indifference here and my loyal team of helper elves — Helves — will attempt to tend to your every plugin whim. Happy dabbling.

Revision history
————————

All available versions and changes are listed here. Each entry indexes the relevant post(s) in the thread to learn about the features.

  • 06 Nov 09 | 0.1 | Initial release
  • 07 Nov 09 | 0.11 | Added heading row above row being edited (thanks Uli)
  • 13 Nov 09 | 0.12 | Allowed you to expose all prefs for deletion
  • 27 Jun 10 | 0.20 | Added smd_pref_get, smd_pref_set and smd_pref_delete ; fixed pageby typo (thanks speeke) ; pref types > 2 now considered Hidden ; removed unused code

Last edited by Bloke (2010-06-28 23:28:35)


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

#2 2009-11-07 01:47:28

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: smd_prefalizer: directly edit prefs

Especially cool for hiding some dicey stuff from Managing Editors! :)

And for finally taking the chance and extending the 6 weeks limit of comments_disabled_after. And for round about 268 other fine points.

Thanks, Stef. Completes the tool shed.

Micro-proposal: Is it possible to repeat the column headers immediately above the row one is just editing?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#3 2009-11-07 02:17:53

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,445
Website GitHub

Re: smd_prefalizer: directly edit prefs

uli wrote:

Is it possible to repeat the column headers immediately above the row one is just editing?

Yes — the Helves are being good this evening :-)

It occasionally looks a bit odd if you’re editing the first row because the headings are repeated twice but it does help in situations lower down the page. I initially tried to ‘jump’ down to the row you were editing as well, but it just got confusing so I removed that feature.

Glad it’s useful for ya!


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

#4 2009-11-07 02:47:48

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: smd_prefalizer: directly edit prefs

Thanks, helves!
“View 50+ per page” is now considerably enhanced.

What’s this thing about “Position”? I tried re-ordering entries in the prefs’ pane with it but apparently didn’t quite get it.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2009-11-07 02:59:57

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,445
Website GitHub

Re: smd_prefalizer: directly edit prefs

uli wrote:

What’s this thing about “Position”? I tried re-ordering entries in the prefs’ pane with it but apparently didn’t quite get it.

The position is the order of entries on the basic/advanced panes; they are relative to the event they occur in.

Easiest with an example: filter by name = ‘comment’ and sort by Position. You’ll see that the numbers go 20, 20, 40, 40, and so on. Note the event alternates Basic, Advanced, Basic, Advanced, … now look at the names next to the Basic entries. comments_on_default is first, then comments_default_invite then comments_moderate and so on. This is the order of the entries in the ‘comments’ subsection of the Basic prefs panel.

Now edit the first entry and change it from ‘20’ to something large, like 320. Save it then refresh your Basic prefs pane; the comments_on_default has moved to the bottom. Does that shed some light on it?


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

#6 2009-11-07 03:24:25

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: smd_prefalizer: directly edit prefs

Bloke wrote:

filter by name = ‘comment’ and sort by Position. […] Now edit the first entry and change it from ‘20’ to something large, like 320.

Was obviously too fainthearted, I only added/subtracted 10, so that it should arrive in the prev/next group. I’ll try again. Thanks!


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2009-11-09 13:32:38

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: smd_prefalizer: directly edit prefs

This is great, cheers Stef!


Admin Themes Prometheus | Stung | <txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
<txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#8 2009-11-12 04:10:29

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: smd_prefalizer: directly edit prefs

A beauty. Haven’t started kicking the tires, but she sure looks like a sweet ride at first glance.

I suppose I should not test this on client sites. :)


Kevin
(graphicpush)

Offline

#9 2009-11-14 10:43:38

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: smd_prefalizer: directly edit prefs

Just bringing the other conversation over here Stef, your plugin doesn’t allow you to delete everything. Not that I’m complaining or anything but I found I couldn’t delete some “mem” preferences, only hide them. I later went into the database and removed them. I suspect it has something to do with what “type” of preference they are inserted as.

As you say, they can be removed these days but that requires that plugin authors keep up-to-date.

OT – For example I am having a problem with some well used plugins on my XAMPP install. The problem with XAMPP, if you want to call it a problem, is that it always has the latest versions of the contained software, thus it currently uses PHP 5.3.0 and apparently the function split() has been deprecated to be replaced with preg_split(). It seems a fair few plugins use split() so it keeps throwing warnings at me which don’t disappear when setting the site preference to “live” mode.

Last edited by thebombsite (2009-11-14 10:49:06)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#10 2009-11-14 16:06:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,445
Website GitHub

Re: smd_prefalizer: directly edit prefs

thebombsite wrote:

your plugin doesn’t allow you to delete everything.

In its standard mode, no. Since deleting system prefs could damage things. Check the docs (currently at the bottom — probably should be made more prominent) and you’ll find a way of allowing you to delete any prefs.


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

#11 2009-11-15 19:51:30

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: smd_prefalizer: directly edit prefs

I knew there was a reason for help docs. ;)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#12 2009-11-16 21:36:47

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: smd_prefalizer: directly edit prefs

One thing I do not see in the prefs, and I’m not even sure it’s possible, but the actual labels of the author levels (“Publisher”, “Staff Writer”, etc). Is that something I just have to change in the language definition?


Kevin
(graphicpush)

Offline

Board footer

Powered by FluxBB