ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Creating a "User Control Panel" for theme settings?

September 19, 2012 4:08am

Subscribe [3]
  • #1 / Sep 19, 2012 4:08am

    Hi everyone, don’t be scared off by the long entry, you can probably tell what I mean by reading the first section - the rest are examples and so on 😊

    As you can read here, I’ve started a mission to find great WordPress and HTML-3 + CSS3 themes, convert them to ExpressionEngine, and release them for free to the community. I’m releasing the first one - AllTuts - soon.

    Most WordPress themes have some sort of user control panel, where various settings can be made. Like what categories should be included in the site menu, what Widgets should be shown in the sidebar, a place to paste Google Analytics code, webmaster e-mail, footer text and so on. Stuff you’d store in Global Vars, but with a nicer interface around it.

    Because the themes I’m converting will all be released to the community for free, in an effort to get more people to choose EE, I expect most users of these themes will be newcomers to the platform. And thus I’d really love to give them some sort of control panel, instead of storing these settings in Global Vars or in a “Miscellaneous” channel.

    When Bjørn did some theme conversion for WooThemes, he created this CP: Screenshot ...  but I’m not fluent enough in PHP to do stuff like that 😊

    My question is: Do you know of any kind of “framework” that will allow me to store theme settings and options in a central place, like a control panel, and that can be customized to fit different themes. Something that will, for example, create a nicer interface around a Global Var, where the user makes a selection from a menu, checkbox or text field, that is then stored in a Global Var, so I can reference the setting in the sites code?

    Or any other solution, that makes such theme settings more accessible for the user?

    A FEW MORE EXAMPLE AND THOUGHTS:
    I know I can place these options in a “Miscellaneous” channel. But channel entries can be deleted, and are not very flexible. Any menu or checkbox will be shown in every “Miscellaneous” entry made, even if the option is only used once.

    Let’s say you want to let the user select whether to show the theme’s sidebar or not. You can place the setting in a Global Var, but it’s all text so you have to tell the user to change “yes” to “no” or “1” to “0” or something like that.

    And if I place a menu in a channel entry for selecting “YES” or “NO” that menu will be shown in every other entry in the “Miscellaneous” channel. Or I can place ALL the settings in one entry, or create a new channel for each ... not the best scenarios from a Users point-of-view 😊

    Right now I am using entries in a Misc channel for this, as shown here, where I also use a field for instructions. But the more settings, the more cluttered this will get as I convert the theme and more choices should be made available to the user.

    I’m totally fluent in HTML and CSS, but not in PHP - not to a degree that I can code something like Bjørn’s module myself. And because each theme is different, it has different options that should be user selectable. Right now I am storing things in a “Misc” channel, but I really would like a more elegant approach 😊

    The solution should preferably be free, because my converted themes will be free. I want them to be a catalyst, that makes people change over to our beloved platform, and charging for a theme - or a part of it - is really far from my mission with this 😊

    Or perhaps someone would want to create a framework for this project, that I can easily adapt for each theme? I can do a little PHP, and have coded in other languages. So if someone could just do a framework for me, that will create an interface to hold the values from several Global Vars, and let me choose whether to present these in a text field, radio-button, menu and so on, and then store the users choice in the DB, that would be really cool.

    So if you have ideas, input or want to help with such a framework/module/interface, I’d love to hear from you 😊

    Thank you all in advance, and sorry for the long post!
    -Thomas

  • #2 / Sep 19, 2012 8:18am

    e-man

    1816 posts

    Not free but Low’s Low variables comes pretty close to what you describe if you turn on ealry parsing:
    http://gotolow.com/addons/low-variables

  • #3 / Sep 20, 2012 3:38am

    Ohh man, it sure does, it’s absolutely beautiful 😊

    Low Variables is exactly what I’ve been looking for. I’ve read that a lot of people rely extensively on this, but I never got around to looking at it myself. I should have, it really makes setting and storing these “site and theme settings” easy and understandable for the end user.

    But ... since the themes I’m converting are free or open source, and since they will be released with the same license they were originally created under, I can’t make them depend on Low Variables, thus making the user pay for a license. It would violate the original license, and it would not be fair to the theme creator, that others suddenly makes money on the converted version ... as much as Low would deserve it, he sure does 😊

    So I’ll rely on either channel entries or Global Vars ... unless others have ideas?

    Let me ask you e-man and others: If you could not use something like Low Variables, what would you choose (keeping in mind that the theme will be used by non-devs and less experienced users)?

    A: Keep all theme/site-settings in Global Vars?

    B: Keep all theme/site-settings in channel entries, in one channel, “misc”?

    C: Create separate channels for each setting, allowing for customized entries for each?

    D: Do a combination of Global Vars and channel entries?

    E: Or something else?

    One thing I just thought of: One could have all settings in just one channel and one channel entry, creating all the needed fields there, but having them grouped on different tabs on the entry page!

    Is that something that any of you do or have done, and does it work better than the above, for the average user? I suppose the tab-setup can be carried over, when I’m doing the theme installation, so it’s set-up for the user right away?

    Let me know your thought on this, thanks everyone! 😊

    -Thomas

  • #4 / Sep 20, 2012 5:10am

    Tyssen

    756 posts

    http://republiclabs.com/expressionengine/republic-variables isn’t as powerful or flexible as Low Variables, but it doesn’t require a licence fee.

    You might also be interested in https://github.com/iainurquhart/entry_widgets which Iain only brought to public attention last week. Apparently still got a bit of work to go on it, but it may fit your situation.

  • #5 / Sep 24, 2012 4:00am

    Thanks John!

    I’m going to test Republic Variables and Phil Sturgeons original version of Entry Widgets - Widgets - as Entry Widgets ties to entries, where Widgets does not. That makes Widgets more useful for my use, I think.

    I’m going to get back to you all, with my findings.

    I’d still love to hear what you would all do, if you HAD to use the built-in features of EE for this type of content. See my list in the post above, what would you choose: A, B, C, D or something else, E?

    Thanks again guys!

  • #6 / Sep 24, 2012 4:45am

    Phils Widgets really seem to fit the bill perfectly for me, it’s a totally awesome concept!

    Thanks for showing me the way, and thanks to Phil for taking the time to create this 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases