I'm working on a basic module to display an image carousel. The module itself works well, but what I want to do now is create a new folder called 'carousel' within the root 'images' folder when the module installs.
I've researched this a lot here (I apologise if this is a duplicate question) and from searches, but no matter what I try I can't get it to work.
I have this in the manifest file.
<scriptfile>script.php</scriptfile>
And I've created a script.php file. Here's what I have so far:
<?php
// No direct access to this file
defined('_JEXEC') or die;
class mod_CarouselInstallerScript
{
function install($parent)
{
$destination = JPATH_SITE.'/'."images";
$folder_name = "carousel";
JFolder::create($destination .'/'. $folder_name, 0755);
}
}
?>
I've tried various versions of this found here and in Joomla documentation.
What am I missing?
var_dump('foobar');
inside the function and check your Network tab in the browser console to see if you see that being returned?<name>
value for your module?class mod_CarouselInstallerScript
withclass mod_Rmg_carouselInstallerScript