0

My custom plugin needs add a folder with images in "images" folder of joomla. Is this possible and if yes how can i tell my install script to take this folder and copy it in images path?

  • do you really need images in "images" folder of Joomla or it may be media folder?? – Rahul Kaushik Apr 07 '14 at 12:52
  • Look at the Joomla documentation for the File System Package. Everything you need to manipulate folders and files is there – Lodder Apr 07 '14 at 13:19
  • Yes inside the images folder . Iknow how to put them in media folder from xml but i need them in images folder. – user3506740 Apr 07 '14 at 15:26
  • i checked the Joomla documentation for the File System Package, i know how to create ,file, folder etc. I need to take a folder with images from the zip and put them under images folder.( that is what i did not found ) – user3506740 Apr 07 '14 at 15:36

2 Answers2

1

Ok i found a way to do it . In my xml file i added

<media folder="" destination="../images">
    <folder>testfolder</folder>

</media>
0

The primary issues being how to include an archive file with your installation package and then how to deal with zip files using exclusively PHP functionality to un-package and place where you want them.

EDIT

I made an error, the original link didn't contain the required information to create installation scripts to run during your extensions install. The new second link is however specific to doing this. I would recommend storing the images somewhere in you installation package, and manually moving them during installation to where you need them in the images folder using one of the available methods to hook into.

Sorry for the error, good luck!

http://docs.joomla.org/Package http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Adding_an_install-uninstall-update_script_file

Brian Bolli
  • 1,873
  • 1
  • 12
  • 14
  • i do not want to use zip . Is there another way ? – user3506740 Apr 07 '14 at 21:57
  • I made an error in my original post, use the new second link to manually move the images where you need them. Just remember when writing code inside the context of the installer class, you are not dealing with archived files, as far as the code is concerned you are dealing with files structure set by the extension manifest file. – Brian Bolli Apr 07 '14 at 22:41