Extensions manifest in JSON/PHP format

Do you have an idea for the Joomla community that you can help implement? Discuss in here.
Forum rules
Global Rules
Posting guidelines for this board <-- please read before posting.

Joomla Idea Pool <-- Add your suggestions for future versions of Joomla and vote on current suggestions.
Locked
Sind-Bad
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 16, 2012 12:52 pm

Extensions manifest in JSON/PHP format

Post by Sind-Bad » Wed Aug 05, 2015 10:09 am

Hallo!
I guess everyone bored by creating XML files every time when begin a new extension.
My idea is adding into Joomla installer supporting of JSON and PHP array formats too.
Some examples:

Code: Select all

{
    "type": "module",
    "version": "3.0.0",
    "client": "site",
    "method": "upgrade",
    "name": "mod_menu",
    "author": "Joomla! Project",
    "creationDate": "July 2004",
    "copyright": "Copyright (C) 2005 - 2015 Open Source Matters. All rights reserved.",
    "license": "GNU General Public License version 2 or later; see LICENSE.txt",
    "authorEmail": "admin@joomla.org",
    "authorUrl": "www.joomla.org",
    "description": "MOD_MENU_XML_DESCRIPTION",
    "files": {
        "filename": [
            "mod_menu.php",
            "helper.php",
            "mod_menu.json"
        ],
        "folder": [
            "tmpl"
        ]
    },
    "languages": {
        "en-GB": [
            "en-GB.mod_menu.ini",
            "en-GB.mod_menu.sys.ini"
        ],
        "ru-RU": [
            "ru-RU.mod_menu.ini",
            "ru-RU.mod_menu.sys.ini"
        ]
    },
    "help": "JHELP_EXTENSIONS_MODULE_MANAGER_MENU",
    "config": {
        "basic": [
            {
                "name": "menutype",
                "type": "menu",
                "label": "MOD_MENU_FIELD_MENUTYPE_LABEL",
                "description": "MOD_MENU_FIELD_MENUTYPE_DESC"
            },
            {
                "name": "base",
                "type": "menuitem",
                "label": "MOD_MENU_FIELD_ACTIVE_LABEL",
                "description": "MOD_MENU_FIELD_ACTIVE_DESC",
                "option": {
                    "": "JCURRENT"
                }
            },
            {
                "name": "showAllChildren",
                "type": "radio",
                "class": "btn-group btn-group-yesno",
                "default": "1",
                "label": "MOD_MENU_FIELD_ALLCHILDREN_LABEL",
                "description": "MOD_MENU_FIELD_ALLCHILDREN_DESC",
                "option": [
                    "JNO",
                    "JYES"
                ]
            }
        ],
        "advanced": [
            {
                "name": "tag_id",
                "type": "text",
                "label": "MOD_MENU_FIELD_TAG_ID_LABEL",
                "description": "MOD_MENU_FIELD_TAG_ID_DESC"
            },
            {
                "name": "class_sfx",
                "type": "text",
                "label": "MOD_MENU_FIELD_CLASS_LABEL",
                "description": "MOD_MENU_FIELD_CLASS_DESC"
            }
        ]
    }
}

Code: Select all

<?php
return [
    'type'      => 'module',
    'version'   => '3.1',
    'client'    => 'site',
    'method'    => 'upgrade',
    'name'      => 'mod_menu',
    'author'    => 'Joomla! Project',
    'creationDate'    => 'July 2004',
    'copyright'       => 'Copyright (C) 2005 - 2015 Open Source Matters. All rights reserved.',
    'license'         => 'GNU General Public License version 2 or later; see LICENSE.txt',
    'authorEmail'     => 'admin@joomla.org',
    'authorUrl'       => 'www.joomla.org',
    'version'         => '3.0.0',
    'description'     => 'MOD_MENU_XML_DESCRIPTION',
    'files'           => [
        'filename'    => [
            'mod_menu.php',
            'helper.php',
            'mod_menu.json',
        ],
        'folder'      => [
            'tmpl',
        ],
    ],
    'languages'       => [
        'en-GB' => [
            'en-GB.mod_menu.ini',
            'en-GB.mod_menu.sys.ini',
        ],
        'ru-RU' => [
            'ru-RU.mod_menu.ini',
            'ru-RU.mod_menu.sys.ini',
        ],
    ],
    'help'             => 'JHELP_EXTENSIONS_MODULE_MANAGER_MENU',
    'config'           => [
        'basic' => [
            [
                'name'        => 'menutype',
                'type'        => 'menu',
                'label'       => 'MOD_MENU_FIELD_MENUTYPE_LABEL',
                'description' => 'MOD_MENU_FIELD_MENUTYPE_DESC',
            ],
            [
                'name'        => 'base',
                'type'        => 'menuitem',
                'label'       => 'MOD_MENU_FIELD_ACTIVE_LABEL',
                'description' => 'MOD_MENU_FIELD_ACTIVE_DESC',
                'option'      => [
                    '' => 'JCURRENT',
                ],
            ],
            [
                'name'          => 'showAllChildren',
                'type'          => 'radio',
                'class'         => 'btn-group btn-group-yesno',
                'default'       => '1',
                'label'         => 'MOD_MENU_FIELD_ALLCHILDREN_LABEL',
                'description'   => 'MOD_MENU_FIELD_ALLCHILDREN_DESC',
                'option'      => [
                    '0' => 'JNO',
                    '1' => 'JYES',
                ],
            ],
        ],
        'advanced'  => [
            [
                'name'        => 'tag_id',
                'type'        => 'text',
                'label'       => 'MOD_MENU_FIELD_TAG_ID_LABEL',
                'description' => 'MOD_MENU_FIELD_TAG_ID_DESC',
            ],
            [
                'name'        => 'class_sfx',
                'type'        => 'text',
                'label'       => 'MOD_MENU_FIELD_CLASS_LABEL',
                'description' => 'MOD_MENU_FIELD_CLASS_DESC',
            ],
        ],
    ],
];
I think this is not bad idea. And what is your opinion? Probably I shall try to pull this small feature into GH repo.

P.S. Whether there is a Joomla installer guide or a flowchart of installing process? This info will very useful for implementing of this improvement.

User avatar
ramarjun
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 204
Joined: Fri Feb 13, 2015 4:57 am
Location: bangalore
Contact:

Re: Extensions manifest in JSON/PHP format

Post by ramarjun » Wed Aug 05, 2015 1:56 pm

we need to create xml file,its an easy way to design and describe all the data for your extensions file,if we dont do that we need to customize our joomla package for our requirement,

Sind-Bad
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Tue Oct 16, 2012 12:52 pm

Re: Extensions manifest in JSON/PHP format

Post by Sind-Bad » Wed Aug 05, 2015 2:19 pm

Yes, I offer to rewrite installer core. Moreover, I offer leave old description way too.


Locked

Return to “Joomla! Ideas Forum”