Page 1 of 1

How to make meta system for plugins and themes

Posted: Sun Dec 29, 2013 11:15 pm
by crazycoder
Hello all,

This is my very first post and so if I post in wrong form, I extremely apologies for that.

I am kind of intermediate in PHP and MySQL development and now trying to gain my skill more toward CMS and Web Application development. So I have decided to built CMS in detailed.

Comparing to WordPress, Jommla and all other available CMS they have Plugin and Template engine where developer can design own. But to register a template or plugin they have to define Metas within comment (refering WordPress)

For Instance:

WordPress Theme:

Code: Select all

/*
Theme Name: Twenty Thirteen
Theme URI: http://wordpress.org/themes/twentythirteen
Author: the WordPress team
Author URI: http://wordpress.org/
Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
Text Domain: twentythirteen

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/
So I want to understand how can I make this type of system where developer can register their new theme?

Re: How to make meta system for plugins and themes

Posted: Mon Dec 30, 2013 12:10 pm
by Celauran
I think a lot of that will depend on how your code is structured and what you mean by 'theme' (as WordPress' themes can contain far more than aesthetic changes). Another question worth considering is why you're writing your own CMS rather than using and/or contributing to an existing one.

Re: How to make meta system for plugins and themes

Posted: Wed Jan 01, 2014 4:41 am
by crazycoder
Celauran wrote:I think a lot of that will depend on how your code is structured and what you mean by 'theme' (as WordPress' themes can contain far more than aesthetic changes).
I am looking exactly the same type of functionality where developers can define various tags like author, name, uri, version etc. I found the solution in one of the CI library called CI-Plugins. It has the same thing what I am looking for and understand how he had done it.
Celauran wrote:Another question worth considering is why you're writing your own CMS rather than using and/or contributing to an existing one.
There are many reasons to develop own but couple of are major to me.
1. Gaining and sharping my PHP and MySQL experience. Since I have mentioned that I am an intermediate developer so it is always good practice to make things from scratch, which will helps to understand from the ground level.
2. In many cases readymade CMSs doesn't work the way we want. For example if I have 10 different types of functionality which is complex and confidential than I would never prefer to use CMS such as WordPress, Joomla etc. They are pretty slow and many features I may not use at all. Better to built own which allows full control and no unwanted stuffs in it.
3. CMSs like WordPress now days becoming pain especially for comment spammers. I am running my site on WP and getting more than 40-50 comments everyday and not a single comment is real but spams.

However I love WP architecture and the way it built. Allowing lot's of flexibility in development. But again what I mentioned that may stuffs I may not use.. :) Even it is always good to build own CMS for the learning purpose as well.