[CMS] Installing & Upading Extensions

Discussion in 'PHP' started by WebCM, Nov 28, 2008.

  1. #1
    I'm developing a new extensions management panel in my CMS.

    Usually plugins provide install(), uninstall() and update() functions. However, there are some problematic issues:
    - CMS supports more databases (MySQL & SQLite)
    - How to inform about plugin's and/or CMS's version?

    If plugins provide these functions, they will have to detect database engine, CMS version, its version and other information. It's a risk that they might do it incorrectly.

    The basic question is: what should take care of integrity?
    A. Plugins
    B. CMS

    In case of B, plugins provides only information about tables, menu items, etc. Example:
    <e>
            <!-- Tables - `date` field has been added in version 2.0 -->
            <table name="items">
                    <field name="ID" auto="auto" type="int" />
                    <field name="title" default="Untitled Item" type="varchar" />
                    <field name="date" added="2.0" type="datetime" />
            </table>
    
            <!-- Menu block deleted in version 2.0 -->
            <block name="A title" deleted="2.0" />
    
            <!-- Menu -->
            <menu id="1">
                    <item url="showItems.php" lang="en">Items</item>
                    <item url="showItems.php" lang="pl">Pozycje</item>
            </menu>
    </e>
    HTML:
    Maybe you know better solutions? I hope you will help me.
     
    WebCM, Nov 28, 2008 IP