Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2013-05-31 10:51:09

EdwardS
Member
Registered: 2013-02-23
Posts: 13

Re: adi_variables - Manage TXP variables

Hi gomedia, would love to be able to have categories in this plugin.

Offline

#62 2013-06-01 16:30:40

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: adi_variables - Manage TXP variables

Wow. this has been around since 08 and I just discovered it.

Idea: often times it is useful to set variables with variables and perform other machinations on variables. It might be nice to have a “safe area” which does not get touched, overwritten when you save variables…

so in adi_variables form, the following would be possible…

<txp:variable name="example-admin">Only admin can change this</txp:variable>
<txp:hide>PUBLIC VARIABLES BELOW, ADMIN VARIABLES ABOVE</txp:hide>
<txp:variable name="example-public1">Anybody can change this one</txp:variable>
<txp:variable name="example-public2">Anybody can change this too</txp:variable>
<txp:hide>NON UI VARIABLES BELOW</txp:hide>
<txp:variable name="full-meal-combo"><txp:variable name="example-admin">,<txp:variable name="example-public1"></txp:variable>

Last edited by mrdale (2013-06-01 16:31:34)

Offline

#63 2014-09-18 01:04:58

gfdesign
Member
From: Argentina
Registered: 2009-04-20
Posts: 401

Re: adi_variables - Manage TXP variables

Hi Adi.
Great plugin, but as other have asked, I’m also wondering if you or somebody else knows how to create a page with theme options. It would be great give to the client the possibility to edit some variables even with other field types (checkboxes, radiobutton, textareas, etc) such as glz_custom_field has.
Many thanks

Offline

#64 2014-11-21 04:56:09

wavesource
Member
From: Australia
Registered: 2011-08-02
Posts: 56

Re: adi_variables - Manage TXP variables

gee – me too, I’ve just stumbled across this looking for this specific function – thanks, gomedia

I was thinking along the lines of gfdesign, but was wondering if this could be achieved by allowing HTML in the adi_variables form to be output to the page… that way we’d be able to structure our own pages at least with headers and so forth. The ability to group fields manually by editing the form is already there, and that’s pretty much all I need right now, but I can see further scope for this to become the global custom fields section from hell.

Cheers to all

Offline

#65 2015-08-11 23:39:33

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_variables - Manage TXP variables

Version 0.6 now available:

  • TXP 4.5+ only
  • tested on TXP 4.6
  • plugin privileges in options
  • drag & drop reordering
  • minor UI improvements

Offline

#66 2015-08-12 08:17:33

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,742
Website

Re: adi_variables - Manage TXP variables

Hi Adi,

This is still a firm favourite of mine, but has become sidelined of late because the form-based method conflicts with flat-file-to-db syncing when developing using flat files and rah_flat.

Would you also consider the option of having an optional alternative saving method using prefs instead of forms? And a corresponding tag to retrieve the prefs as variables. There’s a related discussion in this thread with Stef’s in-progress smd_prefset. Jukka made some comments here in response to my request to reinstate a past method for ignoring certain forms from syncing.

( Background: adi_variables is just excellent for storing site prefs, but in conjunction with flat-file-based templates using rah_flat – which prevents admin-side access to form prefs – the panel is unusable. More precisely: it’s usable when in “live” mode when rah_flat is not active, but as soon as you switch out of it, the admin-side panel is blank and the adi_variables form is updated with the flat-file eradicating any settings you may have made admin-side in the meantime. )

EDIT: corrected my mistake. Thanks maniqui.


TXP Builders – finely-crafted code, design and txp

Offline

#67 2015-08-12 09:17:26

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

Re: adi_variables - Manage TXP variables

jakob wrote #294098:

Stef’s in-progress smd_prefset

*cough* Stef’s accidentally forgotten smd_prefset. Thanks for the reminder!


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

#68 2015-08-12 12:52:45

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: adi_variables - Manage TXP variables

jakob wrote #294098:

( Background: adi_variables is just excellent for storing site prefs, but in conjunction with flat-file-based templates using rah_swap – which prevents admin-side access to form prefs – the panel is unusable. More precisely: it’s usable when in “live” mode when rah_swap is not active, but as soon as you switch out of it, the admin-side panel is blank and the adi_variables form is updated with the flat-file eradicating any settings you may have made admin-side in the meantime. )

You meant rah_flat, didn’t you?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#69 2015-08-12 14:46:35

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,742
Website

Re: adi_variables - Manage TXP variables

You meant rah_flat, didn’t you?

I did. Thanks Julián. Corrected above.


TXP Builders – finely-crafted code, design and txp

Offline

#70 2016-06-08 03:02:16

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: adi_variables - Manage TXP variables

Version 0.7 now available:

  • minor updates for TXP 4.6

Offline

#71 2016-06-08 17:04:22

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: adi_variables - Manage TXP variables

gomedia wrote #299610:

Version 0.7 now available:

  • minor updates for TXP 4.6

“No good deed goes unpunished” is the preface to me +1ing jakob’s request to find a way for adi_variables to survive rah_flat imports.

I use both on every new site and generally have to switch off flat when I hand over the reins to the client. But then subsequent updates involve manually updating the flat adi_variables form.

Great plugin BTW, a real gem… I’ve been looking at a way to hack in support for pre-populated selects and multi-selects via jquery.

Offline

#72 2016-06-09 07:47:56

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,742
Website

Re: adi_variables - Manage TXP variables

mrdale wrote #299628:

“No good deed goes unpunished” is the preface to me +1ing jakob’s request to find a way for adi_variables to survive rah_flat imports.

I like adi_variables too, but I’ve just found it too risky to lose user settings if I activate rah_flat. It’s not adi’s fault and the solution would be to skip it in rah_flat as was once possible an earlier version.

An aside: Dale, you might want to try Nicolas’ fork of rah_flat – oui_flat – which allows you to define prefs variables (which appear in an own “twister” of Admin › Preferences) as flat-file entries (like this) but unlike the forms and pages, they remain user-definable once created. He also has a separate plugin which adds the ability to specify different kinds of prefs UI elements, though I’ve yet to try it.

Note: in his new version, Nicolas also changed the form naming convention to type.name.ext, which I think Phil has proposed elsewhere. If you want it to work seamlessly with your existing templates, you need to reverse the changes made to FormIterator.php here.

(Sorry for hijacking the thread, Adi).


TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB