Active
Project:
Constants
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Mar 2010 at 23:20 UTC
Updated:
29 Jul 2011 at 23:45 UTC
Just a note on
I'd be very interested in hearing what other use cases people have, or if I've duplicated work already done elsewhere.
The Devel module has a variable editor, which is very similar. I think you can only edit existing variables, though, and not add new ones, but I'm not sure. There's also Strongarm module, which doesn't really overlap functionality but is still also closely related (ie managing variables cross-site).
Note this is just a pointer because it might be worthwhile to investigate, not a 'This is duplicate module! Go to hell!' issue. :)
Comments
Comment #1
thebuckst0p commentedThanks for the note. I haven't used Strongarm yet, but my understanding from a webcast on it is that it's meant to enforce the same values across sites. In this case, I needed different values (nids) across sites.
The Devel editor is good, but lists thousands of variables; I wanted a UI to list a handful of custom variables for administrative use. So you could give editors access to this UI where you wouldn't want them using the whole Devel UI.
There's also PURL, which I haven't taken the time to figure out what it's for, but it says it's only an API.
Comment #2
dman commentedFYI, Reptag provides site-wide variables/tokens, along with replacement of those tokens within most content areas. Reptag has a bit of history, and predates the Drupal 'token' system.
Comment #3
nickrice commentedI haven't looked at how this works but from its description it provides the useful and distinct functionality that I had to build for myself for my own site.
The way I do it is not suitable for a generic publicly available module but works fine and quite efficiently for my purposes. However, had this module existed I would have used it rather than doing something myself. (Of the above mentioned modules only Reptag comes anywhere near to providing what I wanted and had there been a v6 version I'd have fitted in with its way of doing things).
So although I'm not currently in the market for this module I think it has a place and I would most likely use it if I had to do the same thing again in a more robust fashion for a client. (Depending on all the usual caveats, of course.)
Comment #4
thebuckst0p commentedThat's good to hear, and thanks for introducing me to RepTag. Any idea when a stable D6 version for that will be released?
Comment #5
lpalgarvio commentedfeatures (export/import) + strongarm (override variables) + variable_changes (compare variables in export to db) + diff (provide diff functionality for all these modules and content too) probably covers the scope of this module
regarding node IDs, UUID Features and UUID
Comment #6
thebuckst0p commentedLPCA, I don't use this module anymore, so I have no stake either way, but which of those modules lets you set variables in a UI? They're all code-based as far as I'm aware.
Comment #7
lpalgarvio commentednone actually.
but you can add them manually to the exports generated by features.
in the .info file, you add the variable name.
features[variable][] = "my_var"in the .strongarm.inc file, you add the data.
note, you won't need to do this for nodes if you use UUID Features.
it is only needed for custom code, like PHP code with a variable_get call in PHP content for nodes, blocks or ctools content panes.
perhaps it would be a good idea to submit patches for adding new variables into Strongarm.
Comment #8
dman commented@LCPA - the Features UI does actually provide that for you when creating or updating a feature. Strongarm presents a list of checkboxes allowing you to choose which variables to serialize. You are not required to do it by hand.
Comment #9
thebuckst0p commentedLook at the screenshot, that's not what this module does: http://drupal.org/node/755466
Anyway, this was built for a very particular use case that I had once and never again, so I don't expect a lot of people to use it.
Comment #10
lpalgarvio commentedi've tested the constants module before.
AFAIK, features, ctools, strongarm, etc, do not let you create new variables, like constants does.
but exporting and importing and overriding/providing defaults they do.
UUID Features let's you export/import nodes as it makes use of UUIDs for things that don't have machine names like the nodes or the taxonomy.
the thing missing, from what i can see, that none of these modules can do, is create new variables from within the GUI. but you can still add variables directly to the DB or to code in exported features.
my suggestion is to try push a patch to strongarm to allow creating variables.
then IMO it would be safe to deprecate the module and suggest an alternative path: features + strongarm; optionally with variable_changes and diff for comparison, and uuid_features for node/taxonomy exporting. ctools and uuid are also required.
Comment #11
dman commented> my suggestion is to try push a patch to strongarm to allow creating variables.
Agreed, a variable editor (devel.module has it) seems like a best fit for strongarm, which is a bit underpowered without it
Comment #12
lpalgarvio commentedposted. #1231824: create variable