| Server IP : 87.98.154.146 / Your IP : 216.73.216.101 Web Server : Apache System : Linux webm005.cluster126.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : bsiadvisil ( 110003) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/bsiadvisil/www/modules/mod_sp_simple_gallery/elements/ |
Upload File : |
<?php
/**
* @title SP Image Gallery
* @website http://www.joomshaper.com
* @copyright Copyright (C) 2010 - 2014 JoomShaper.com. All rights reserved.
* @license GNU/GPL, see LICENSE.php
*/
defined('_JEXEC') or die('Restricted access');
jimport('joomla.form.formfield');
jimport( 'joomla.filesystem.folder' );
class JFormFieldFolderTree extends JFormField
{
protected $type = 'FolderTree';
protected function getInput()
{
$options = array();
// path to images directory
$path = JPATH_ROOT.'/'.$this->element['directory'];
$filter = $this->element['filter'];
$folders = JFolder::listFolderTree($path, $filter);
foreach ($folders as $folder)
{
$options[] = JHtml::_('select.option', str_replace("\\","/",$folder['relname']), str_replace("\\","/",substr($folder['relname'], 1)));
}
return JHtml::_('select.genericlist', $options, $this->name, '', 'value', 'text', $this->value);
}
}