get('log_path'), JFactory::getApplication()->get('tmp_path') ); // Get the base directories. jimport('joomla.filesystem.folder'); $dirs = JFolder::folders(JPATH_SITE, '.', false, true); // Iterate through the base directories and find the subdirectories. foreach ($dirs as $dir) { // Check if the directory should be excluded. if (in_array($dir, $exclude)) { continue; } // Get the child directories. $return = JFolder::folders($dir, '.', true, true); // Merge the directories. if (is_array($return)) { $values[] = $dir; $values = array_merge($values, $return); } } // Convert the values to options. foreach ($values as $value) { $options[] = JHtml::_('select.option', str_replace(JPATH_SITE . '/', '', $value), str_replace(JPATH_SITE . '/', '', $values)); } // Add a null option. array_unshift($options, JHtml::_('select.option', '', '- ' . JText::_('JNONE') . ' -')); return $options; } }