MyBB Community Forums

Full Version: [Dev] Theme Variables
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Theme Variables

Theme variables allows you to easily create variables that you can place in your templates. It is designed to not have any dependencies such as Template Conditionals.
Features
  • Each Theme can have an unlimited number of variables.

  • Ability to control which usergroups will see the content.

  • Ability to control what forum it will show up in.

  • Ability to copy a variable to another theme.

  • Easy to use interface

  • Easy to install

  • Lightweight, but powerful
Installation
  • Upload inc/plugins/theme_vars.php to your /inc/plugins folder.

  • Upload admin/modules/style/theme_variables.php to your /admin/modules/style folder.

  • Activate from the Admin CP
Database Changes
One table is created that stores all the variables.
Support
Support is given on the Official MyBB Community Forum. Your forum must meet the Support Eligibility Requirements.



Right now it should be considered in development.  I've done some testing and had good results, but I want more testing before I release it on the Mods Site.  It can be downloaded from Github: https://github.com/dragonexpert/MyBB-Theme-Variables
Seems a interesting and useful plugin... just downloaded it will check it (locally) soon... 
When I next update this, it will have have an All Themes option. I don't plan on supporting for more than one single theme for a couple reasons:
1) Performance can take a big hit because there is no efficient way to query.
2) The Copy function exists so you can easily copy the variable to another theme.
Added the All themes option. It should be noted that this is the free version. It will be maintained in terms of support and bugs, but additional features will be added to a premium version. The interface may undergo a small redesign based on feedback.
I realize this is an unfinished plugin, but would you care to provide basic usage instructions? I appreciate your work, but it's not very useful if you're the only one who knows how to use it. The initial issue I haven't managed to work out is what the required fields even require. I click "Create Variable" after filling out the fields and the page just reloads. Am I doing something wrong?
Once you have created a variable, the next step is to use the variable in whichever template. I'm not sure if you have the latest code, but if you would like to test out the premium version, I can hook you up with an account that has access to it.
I have the premium version of this plugin but honestly some basic documentation would be nice. Smile
(2017-01-29, 02:04 PM)dragonexpert Wrote: [ -> ]Once you have created a variable, the next step is to use the variable in whichever template.  I'm not sure if you have the latest code, but if you would like to test out the premium version, I can hook you up with an account that has access to it.

Sure, I'll gladly take you up on that offer.
(2017-02-02, 07:49 PM)Marisa Wrote: [ -> ]I have the premium version of this plugin but honestly some basic documentation would be nice. Smile

I'll aim for getting some documentation done on either Sunday or Monday because I have those days off from work.

(2017-02-02, 09:28 PM)Tactrus Wrote: [ -> ]
(2017-01-29, 02:04 PM)dragonexpert Wrote: [ -> ]Once you have created a variable, the next step is to use the variable in whichever template.  I'm not sure if you have the latest code, but if you would like to test out the premium version, I can hook you up with an account that has access to it.

Sure, I'll gladly take you up on that offer.

Sent you a PM with the info.
(2017-02-02, 07:49 PM)Marisa Wrote: [ -> ]I have the premium version of this plugin but honestly some basic documentation would be nice. Smile

I added a bunch of documentation: https://github.com/dragonexpert/MyBB-The...r/usage.md
Pages: 1 2