Creating a module system for a Custom CMS - Best approach ?

Posted on 2012-08-11
Last Modified: 2012-08-17
i'm building a new cms which is using many themes completely designed for others (html themes, wp themes , opencart themes etc. )
And I want to build a very flexible module system.

Positions must be freely added and widgets must be added to positions (like opencart but more flexible)

Positions must be disabled or enabled automatically according to the theme

Widgets (say modules for big widgets) must have different styles according to the theme style.

And must have a very usable module management in admin panel.

for instance we have an announcement module. Admin adds announcements like a post in wordpress with featured images.

Each module can  be enabled or disabled for every page or pagestyle.

We will need an admin panel page to manage their visiblity , position , viewing style (scrolled , marquee or any plugin usage like jcarousellite ) , and limits, thumbnail sizes etc etc.

and these must have some predefined different values for each theme

i did something similar for slider management but not managed from panel. a function working on the controller which is customized by parameters coming from theme.(And it's getting bigger by every theme :) )

Experts i need some logical help , how would you build a module system like this. How must i shape the admin panel for this .

i mostly like opencarts approach can anyone advise me better , to  be inspired
Question by:erdincgc
    LVL 49

    Expert Comment

    by:Julian Hansen
    Why re-invent the wheel when you have Joomla and Drupal that does most of this for you already?
    LVL 107

    Expert Comment

    by:Ray Paseur
    I tend to agree with JulianH.  This is mostly a non-value-added exercise.  In my community of developers, Drupal would probably be the tool of first choice, followed by Joomla.  It would depend on the availability of subject-matter expertise.  If you build your own CMS, you will not be able to take advantage of open-source subject-matter experts.  It's just you in the rowboat, against the sea.

    Some cart discussion here:

    Best of luck with your project, ~Ray
    LVL 9

    Author Comment

    Thank you both for your interests.

    Hmm then i have ask you what if joomla or drupal or even wordress coders would think like this. We shouldn't have them in that case.

    So i'm also using them for many of my projects. But i need another CMS which has flexibility along simplicity that they dont have.

    I just cant give a joomla or wordress site admin panel to my customers and expect  them to manage their site without my assistance.

    I need to a simpler (and levelized) administration panel. So simple that only has homepage-products/services-contact-references  content management and some slider things plus a gallery management.

    These are already ok (completely as i wish to be )
    I just need to add some weather , news, stocks , announcements,customers etc. info boxes (i call them widgets if they are just in a box on page at somewhere)

    and  customer feedbacks, detailed ingredients -for single product pages-  etc. (i call them modules if they are completely decicated by a page url)

    to express my self better i can show you some links that i studied on .

    btw i keep using joomla and drupal , my own cms is not opensource and not on sale and will not be ever .... it's just for building company sites  faster and with minimal code and obeying my seo rulesheet... so  the value of these effort is not the money but time in the long term and seo perfomance (Less customer phones :) )
    LVL 107

    Expert Comment

    by:Ray Paseur
    I will sign off on this question because we have different philosophies.  I perceive more customer calls to be an advantage and I charge money for these calls.  I respect and serve my customers, and I want their calls. They pay me to take these calls and get them the solutions they require.

    All the best, ~Ray
    LVL 9

    Author Comment

    Ray , I respect you (for all the knowlege you share at ee) and your approach on this subject.

    But i cant charge for money for this kind of customers because of my sales strategy.

    Some extra customizations like POS integrations and order management etc. will be available for cash but lite system is completely free.

    I'm giving my customers 1 year .com domain and hosting package for free. (i am registering the domain and hosting at my server). After first year they only will pay for domain registration and hosting . Using CMS will be free forever.

    So i want to minimize customer calls about usage support on this project.

    On other deals (drupal,joomla,wordpress,magento,opencart et. ) i completely have your logic , more calls means more money :)

    Thanks again, bye
    LVL 26

    Expert Comment

    Have you considered becoming a reseller / licensee of one of the many commercial and semi-idiot proof CMS systems:

    As they'll save you several man years of pain, and or being sued, for re-inventing someone else's patented wheel, as well as avoiding any PCI-DSS compliance issues /costs.
    LVL 49

    Expert Comment

    by:Julian Hansen
    Some insight from my side. I have built my own web framework (front and backend) for similar reasons to the ones you give above.

    There are existing frameworks out there you could utilise to help with this (symfony, cakePhp, qcodo etc) that can help with the basics but you will still need to code your own functionality.

    In my case I built everything from scratch - and it works for my clients but it took a long time and went through several iterations (8 at the last count) before getting to a point I am reasonably happy with it.

    Trying to match the development effort of hundreds of contributors is not possible - so either you have to lower the standards of what you want to achieve or set asside a couple of years to perfect it or use one of the suggestions above.
    LVL 9

    Author Comment

    arober11 thanks for suggestions and resources you share

    julianH  : Great summary of my situation in last paragraph, your three possibility theory is quite true.

    i'd choosen the
    "set asside a couple of years to perfect it"
    and that years -mostly- passed

    i did already code the most of sections and using on some sites.

    What i need is an approach advise for building the module system  like opencart . But themes should change functions like wordpress ... I have a few schemes already planned and started coding one . But as this is a complex part of system i wanted to ask you , your advices. Do you know any tutorials on this subject like i'd showed some at #38286096
    LVL 49

    Accepted Solution

    The best tutorials are to look at what the established CMS's are doing.

    I found while building my framework - that while in the beginning I chose not to look at other implementations as it might "pollute" my thinking that ultimately what I ended up with was very similar. Point being that the "right" solution is often the simplest and most logical - which is why we tend to look around for "patterns" today - they are the distilled final form of a solution to a problem.

    I am a big fan of re-inventing the weel - it is how new ideas come to light - however sometimes you find that you can't make a wheel more round. If you are stuck look at the frameworks out there to get an idea - sometimes what happens is you see how they do it and discover a way to do it that is not as complex based on your requirements - the previously mentioned solutions suffer from the drawback that they tend to try to be everything to everyone so are at times over-engineered for a specific requirement. This leaves scope to take the core of what they are doing and remove the fluff.

    Hope that makes sense?
    LVL 9

    Author Comment

    yes,happily  you totally understand me  :)

    i did like the opencart way and started coding ... now i also will investigate other scripts to -maybe- combine them all with my logic

    Thank you for understanding me .. cys

    After 1 day i will close topic. Till then i'm open to cms advices to be inspired by and handling a module system tutorials.

    Any suggester will share points with JulianH .

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
    Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
    The viewer will learn how to dynamically set the form action using jQuery.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now