Hi,

  I am creating a component in joomla 1.6 for uploading photos.I want to create a new folder named "imagegallery"  in the images folder in joomla,while installing my component..I want to upload all my photos into this folder.I am following the mvc architecture.How i can achieve this by the xml file in my component.Please reply.

Views: 78

Replies to This Discussion

I tried a few things in the manifest for a similar problem, but no luck. Eventually I built in a check for the folder in the component entry file and created the folder if necessary.

The solution is using extension script file  (http://docs.joomla.org/Developing_a_Model-View-Controller_(MVC)_Com...) .  You can implement the install method of the script like below code :

 

<?php
    function install($parent) {
        jimport(joomla.filesystem.folder);
        $path = JPATH_ROOT.'/images/imagegallery' ;
        if (!JFolder::exists($path)) {
            JFolder::create($path);
        }
   }
?>

 

Hope this help !

RSS

Badge

Loading…

© 2012   Created by Amy Stephen.

Badges  |  Report an Issue  |  Terms of Service