1

Is it possible to install a file from a Joomla plugin to a non-plugin directory?

For example-- by default a Joomla plugin install xml looks like this:

<?xml version="1.0" encoding="utf-8"?>
<install version="1.5" type="plugin" group="mycomponent" method="upgrade">
<name>MyPlugin</name>
<author>Me Myself</author>
<creationDate>January 29, 2011</creationDate>
<copyright>Copyright (C) 2011 ME</copyright>
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license>
<authorEmail>me@mysite.com</authorEmail>
<authorUrl>www.mysite.com</authorUrl>
<version>1.5</version>
<description>My cool plugin.</description>
<files>
    <filename plugin="myplugin">myplugin.php</filename>
</files>
<params />
</install>

This will install the myplugin.php file to the /plugins/mycomponent plugins folder.

However, if I want to install some image files to make my plugin look nicer, and want to drop those in the /images folder, is there a way to supply that path?

Thanks

julio
  • 6,630
  • 15
  • 60
  • 82

2 Answers2

1
<!-- Site Main Media File Copy Section -->
    <media destination="com_helloworld">
        <filename>image.png</filename>
        <filename>flash.swf</filename>
    </media>

http://docs.joomla.org/Components:xml_installfile

gorodezkiy
  • 3,299
  • 2
  • 34
  • 42
0
<files>
    <filename plugin="myplugin">myplugin.php</filename>
    <folder>dummyFolder</folder>
</files>

In this way you can add dummyFolder to plugins=>mycomponent=>dummyfolder

Gaurav
  • 28,447
  • 8
  • 50
  • 80
  • right, but we're still inside the plugins directory. I'm hoping to be able to put images in the root Joomla images folder-- – julio Mar 01 '11 at 17:23