Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#25 2011-09-28 21:28:07

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

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

#26 2011-09-28 21:51:42

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

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

#27 2011-09-29 16:22:11

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

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

#28 2011-11-14 15:08:11

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

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

#29 2011-11-14 15:27:09

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

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.

Txp Builders – finely-crafted code, design and Txp

Offline

#30 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

Board footer

Powered by FluxBB