Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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 pageI 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.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
Re: smd_prefalizer: directly edit prefs
speeke wrote:
all the
glz eventsare 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.
Hire 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.
Hire 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.
Hire 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.
Hire 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,316
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
Re: smd_prefalizer: directly edit prefs
uli wrote:
it might be pretty useful if every row in the prefalizer panel got its own ID
That’s a pretty good idea, thanks! I suppose the same (sort of) thing could be achieved by simply linking to the prefalizer page with the search criteria already filled in, based on what you clicked. Thus it shows you the current prefs values if defined. And if not, you can add them.
It’d be even nicer if a plugin’s help could dynamically insert the link if the plugin was installed, so you could click the link in abc_my_plugin’s help and have it transport you to the prefalizer page in edit mode, fill in the html_type / event / etc fluff for you so all you needed to do was write the name/val in and click Save. We can dream!
I do need to pop back in and fix this plugin quite a bit. I’d like to make it easier to multi-delete, among other things. I think there was a technical (=lack of knowledge on my part) reason I couldn’t do that before, but I’ve learnt stuff since then. Will see what other goodies I can cram in when that day arrives.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#26 2015-09-24 13:54:47
- gfdesign
- Member

- From: Argentina
- Registered: 2009-04-20
- Posts: 401
Re: smd_prefalizer: directly edit prefs
Hi Stef
I have a couple questions / suggestions about your plugin:
1. I wonder if your plugin lets add a new preference to more than one user. Not just for name, but user privileges.
2. May I add a new preference where I can save an image? How will I would have to do it? It would be nice it has a functionality such as bot_image_upload has
3. As the item 2, would be possible to do the same with files (I am thinking for instance, user be able to add a favicon file)
4. As suggestion, it would be interesting the possibility to add a small description about the purpose about the preference we create.
Thanks in advanced.
Best regards
Last edited by gfdesign (2015-09-24 13:58:41)
Offline