Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: smd_prefalizer: directly edit prefs
kevinpotts wrote:
the actual labels of the author levels (“Publisher”, “Staff Writer”, etc). Is that something I just have to change in the language definition?
Yup. Special mention for wet_babble here, which is the coolest way to change stuff like that.
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 2009-11-16 22:39:05
- kevinpotts
- Member
- From: Ghost Coast
- Registered: 2004-12-07
- Posts: 370
Re: smd_prefalizer: directly edit prefs
Why do I not know about all this cool shit?!
Last edited by kevinpotts (2009-11-17 03:10:02)
Kevin
(graphicpush)
Offline
Re: smd_prefalizer: directly edit prefs
Hiya Stef,
I’ve just found today that when I use smd_prefalizer
I get an error message as I click through the pages of database entries:
Notice: Undefined index: 10 in /Users/username/Sites/sitename/textpattern/lib/txplib_misc.php(594) : eval()'d code on line 199
Something to do with checking for end of file?
“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower
Offline
Re: smd_prefalizer: directly edit prefs
speeke wrote:
Notice: Undefined index: 10… eval()’d code on line 199
Hmmm, seems to be something to do with the ‘type’ of one of your pref rows. Can you narrow it down to a particular ‘page’ of the results, or a possible suspect row or three? Do any of your rows show anything other than Advanced, Basic or Hidden in the type column? Can you find an entry with ‘10’ as its type and let me know what the pref name is (you may have to resort to using phpMyAdmin for this, or rss_db_admin plugin to view the table directly)?
If it turns out it’s a particular plugin or if there’s a type I’ve forgotten I’ll have to figure out how to deal with it. Bottom line is the plugin shouldn’t assume there are only 3 types — so I’ll try and handle it better in the next version — but I’d like to find out which entry is causing it. Thanks for the report.
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
Re: smd_prefalizer: directly edit prefs
Bloke wrote:
Do any of your rows show anything other than Advanced, Basic or Hidden in the type column?
Yes. I recently updated glz_custom_fields
, and wherever this notice occurs, a glz
type column entry is missing (ie no advanced, basic or hidden listed). I should have noticed this. Should I refer this to gerhard?
On a separate note, when I select View 15 per page
I still see 25 entries. The 50 & 100 options work as expected. No major drama, just thought you’d like to know ;)
Last edited by speeke (2010-01-26 00:19:36)
“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower
Offline
Re: smd_prefalizer: directly edit prefs
speeke wrote:
Yes. I recently updated
glz_custom_fields
… Should I refer this to gerhard?
Aha, thanks for sleuthing this one. I’m not completely clued up on how glz_cf does its magic but I guess Gerhard uses the ‘type’ column for something else. Perhaps the type of the input widget for that particular field? If you could refer Gerhard to post #15 here, he might be able to fill me in on what he’s using the field for and I can make this plugin work better with his. Cheers!
when I select
View 15 per page
I still see 25 entries.
Nuts, it’s a typo. Line 87 should read:
$limit = max(@$pageby, 15);
Thanks for noticing. I’ll fix it in the next release.
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
Re: smd_prefalizer: directly edit prefs
Bloke wrote:
If you could refer Gerhard to post #15 here, he might be able to fill me in on what he’s using the field for and I can make this plugin work better with his.
Done!
Nuts, it’s a typo.
Good oh. Thnx!
“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower
Offline
Re: smd_prefalizer: directly edit prefs
If it helps, in the meantime, I’ve checked the DB in phpMyAdmin, and all the glz events
are of type 10
(whatever that means!).
“People who value their privileges above their principles soon lose both.”
Dwight D. Eisenhower
Offline
Re: smd_prefalizer: directly edit prefs
speeke wrote:
all the
glz events
are oftype 10
Thanks. Mystifies me too, but hopefully Gerhard can shed some light on what type 10 is and whether there are any other values I need to know about.
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
Offline
Re: smd_prefalizer: directly edit prefs
gerhard wrote:
I’m setting all glz_custom_field prefs with type 10 so that they don’t show up in TXP’s preferences.
Thanks for stopping by! In theory, setting them to type 2 should achieve the same effect since lib/constants defines these three:
define('PREF_BASIC', 0);
define('PREF_ADVANCED', 1);
define('PREF_HIDDEN', 2);
But if it’s a major hassle to change from 10 then I’ll just make my plugin accept anything above ‘2’ as ‘hidden’ for now. Can play it either way, lemme know which you prefer.
Last edited by Bloke (2010-01-30 12:41:24)
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
Re: smd_prefalizer: directly edit prefs
v0.20 is out. Features:
- 3 new public side tags:
smd_pref_get
: display one or more prefssmd_pref_set
: create or update a single prefsmd_pref_delete
: remove one or more prefs
- pageby typo fix (thanks speeke)
- pref types > 2 now considered hidden (fixes glz_cf issue which uses type = 10)
With the new tags, you are prevented from modifying system prefs and cannot create or otherwise clobber any TXP system pref. But you can create/modify/delete your own hidden prefs or — if someone is logged in — create/modify/delete per-user prefs on their behalf.
Hope this proves useful for people who want to store transient information based on visitor interactions on your site.
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