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
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
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
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
Re: smd_prefalizer: directly edit prefs
Any tips on how to get the results from a form and post them into smd_pref_set
?
My only success has been through a URL string which is not preferred for obvious reasons.
Offline
Re: smd_prefalizer: directly edit prefs
aslsw66 wrote:
Any tips on how to get the results from a form and post them into
smd_pref_set
?
<txp:adi_gps post="1" />
? Then use the resultant <txp:variable />
as input to smd_pref_set;
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
OK, got it. I must have been abusing adi_gps
because the data was appearing in the URL – clearly not good!
Pity I didn’t think about using this earlier as there are lots of revisions ahead of me. I’m going to have a go at pack a preferences field with a comma delimited string and see what happens.
Offline
#24 2011-11-14 15:08:11
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,311
Re: smd_prefalizer: directly edit prefs
Stef, based on what you say here in the smd_browse_by thread …
The select lists available at the moment are configurable (albeit via a hidden pref right now) in the beta.
… made me think that it might be pretty useful if every row in the prefalizer panel got its own ID so that you could simply link to the right point in your plugin e.g to make the users skip to the right spot in these hundreds of table entries. Maybe its possible to even hide all the other table rows and only show what you wanted to edit right now.
Equipped with such capabilities, perhaps more plugin authors could make use of your nice plugin.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline