Can I use a single .xml file to install components, modules, plugins and media files?

by HumanPew   Last Updated May 13, 2016 08:04 AM

I'm trying to create a package of a range of components, modules, plugins, templates and media files which are standard for most website that I create. I was wondering if the .xml file can handle all of this and if so. Which is the best way to go about it. So far this is what I have:

<creationDate>May 2016</creationDate>
<description>Package contains all components, plugins and modules</description>

<files folder="packages">
    <file type="component" id="com_aclmanager" ></file>
    <file type="component" id="admin_menu_manager" ></file>
    <file type="component" id="jce" ></file>
    <file type="plugin" id="plg_mtcustompagedata" group="system"></file>
    <file type="plugin" id="plg_mtcustompagefields" group="system"></file>
    <file type="plugin" id="plg_mtmodule" group="system"></file>
    <file type="plugin" id="plg_mtredirect" group="system"></file>
    <file type="plugin" id="plg_mtuserdata" group="system"></file>

<media folder="packages" destination="mt_media">

        <file charset="utf8" driver="mysql">install.mysql.sql</file>
        <file charset="utf8" driver="mysql">uninstall.mysql.sql</file>

It seems to completely miss the media files. And when I add templates in it also doesn't find those.


Tags : installation xml

Answers 1

As far as I know, <media> does not accept zip files in <filename>.

I think you best options will be to create a script.php and use the postinstall() function to:

  1. Move the zip file to the media directory
  2. Extract the zip file
  3. Delete the zip file

Take a look at Adding an install/uninstall/update script file for more information

May 13, 2016 09:32 AM

Related Questions

Joomla installation database connection

Updated August 03, 2015 14:04 PM

How to secure a new Joomla installation?

Updated May 27, 2015 22:04 PM