Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ThemeExtras Plugin - Allows themes to define custom fields and settings
#1
Brick 
ThemeExtras
Version 1.0.0


This awesome plugin will allow theme developers to enable the ability to give users configuration options for their theme, plus the ability to add custom fields for use in themes. For a theme to be supported by this plugin, it simply needs to have a ‘theme.xml’ file in the root directory of the theme that is used to define the possible configuration options or custom fields. Checkout the documentation for info on the syntax of this xml file. I18n for all configuration options and custom fields is fully supported also. My upcoming SimpleBlog plugin will be natively supported also, allowing themes to define custom fields for blog posts, etc. too.

Configuration options for themes will show up on the ‘Themes’ tab when a supported theme is active and custom field options will show up in the post editor under the metadata section when a supported theme is active. This plugin takes care of saving all the data so theme developers need not worry about it.

This plugin is currently under active development and is getting very close to completion and ready for release. If you’d like to track the development progress, please visit the GitHub page linked above.

A new team of translators will be needed for this plugin. If you speak any languages other than those that are already included, then please send me a PM so that I can add you to the project. A GitHub account is a must as the development process is maintained from there.

More information about this plugin, including what the future holds for it, the changelog, plus the main documentation can be found on my website. Just follow the links at the top of this post!

Language Support
  • English (en_US) - Maintained by John Stray (johnstray2001)

Version 1.1.0
Scheduled: Q4, 2022 - Estimated: November-December, 2022

Use this forum thread for SUPPORT and FEATURE REQUESTS
If you find any bugs that wish to report, then please visit the GitHub page,
check if it has been reported and/or fixed already, and if it hasn't then please create a new issue.
Check out my website: JohnStray.com
Reply
#2
Smile 
johnstray2001



Hello.

The plugin gives an error.

PHP 5.4(MAX FOR OC XP)



Code:
Parse error: syntax error, unexpected '.', expecting ',' or ';' in xxx\plugins\ThemeExtras\ThemeExtras.class.php on line 17


Error:

Code:
var $data_file = GSDATAOTHERPATH . 'themes-config.xml';


Valid:

Code:
var $data_file = "data/other/themes-config.xml";


Where are the full examples theme.xml ? Wink
Reply
#3
@ufopera: The method I’ve used for string concatenation in the variable declaration is compatible only with PHP 5.6 or newer. As I am not supporting versions of PHP older than 5.6 (because they are way too old for production use), I probably won’t be adding a fix in a future version of the plugin.

In your case, you have 2 options, you could either update to a newer version of PHP, or use the workaround that you’ve provided in your post.

Also, as stated in the first post of this thread, you can find information about the theme.xml file by checking out the documentation for the plugin (link at top of first post). A full example is also provided in the GitHub repository within the themes/Innovation folder.
Check out my website: JohnStray.com
Reply
#4
(2022-08-26, 13:26:12)johnstray2001 Wrote: A full example is also provided in the GitHub repository within the themes/Innovation folder.

Ok

PHP 5.6 is clear. (again a lot of bugs in PHP 5.4)   Sad
Editing in the Theme tab.
I liked the idea.
I will keep an eye on updates   Smile

   
Reply




Users browsing this thread: 1 Guest(s)