public static function getAvailableSources($sourcedir)
 {
     jimport('joomla.filesystem.folder');
     jimport('joomla.filesystem.file');
     $paths = self::getFrontsideTemplates();
     $paths[] = $sourcedir;
     foreach ($paths as $path) {
         RokMiniEvents::addSourcesPath($path);
     }
     $results = array();
     foreach ($paths as $source_path) {
         if (JFolder::exists($source_path)) {
             $source_files = JFolder::files($source_path);
             foreach ($source_files as $entry) {
                 $source_name = basename($entry, ".php");
                 $path = $source_path . DS . $source_name . '.php';
                 if (JFile::exists($path) && !array_key_exists($source_name, $results)) {
                     $sourceClass = self::CLASS_NAME_PREFIX . ucfirst($source_name);
                     $source = new $sourceClass();
                     if ($source->available()) {
                         $source_info = new stdClass();
                         $source_info->name = $source_name;
                         $source_info->source = $source;
                         $source_info->paramspath = $source_path . DS . $source_name . '.xml';
                         $results[$source_name] = $source_info;
                     }
                 }
             }
         }
     }
     return $results;
 }
Exemple #2
0
					<div class="knob"></div>
				</div>
			</div>
			<?php 
    if ($params->get('timeline_dates') == 'inline') {
        ?>
			<div class="timeline-dates date-inline">
			<?php 
    } else {
        ?>
			<div class="timeline-dates date-column">
			<?php 
    }
    ?>
				<?php 
    $timelineDates = RokMiniEvents::getTimelineDates($events, $params);
    foreach ($timelineDates as $date) {
        ?>
				<?php 
        if ($params->get('timeline_dates') == 'inline') {
            ?>
					<div class="date">
						<span class="start"><?php 
            echo $date['start'];
            ?>
</span> - <span class="end"><?php 
            echo $date['end'];
            ?>
</span>
					</div>
				<?php 
/**
* @version   1.5 October 6, 2011
* @author    RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2011 RocketTheme, LLC
* @license   http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
if (!defined('ROKMINIEVENTS')) {
    define('ROKMINIEVENTS', 'ROKMINIEVENTS');
}
if (!defined('ROKMINIEVENTS_ROOT')) {
    define('ROKMINIEVENTS_ROOT', dirname(__FILE__));
}
require_once ROKMINIEVENTS_ROOT . '/lib/include.php';
JHTML::_('behavior.mootools');
$doc =& JFactory::getDocument();
if ($params->get('builtin_css', 1)) {
    $doc->addStyleSheet(JURI::Root(true) . '/modules/mod_rokminievents/tmpl/css/rokminievents.css');
}
if ($params->get('set_widths', 1)) {
    $width = $params->get('wrapper_width', 750);
    $item = intval($width / $params->get('item_number', 3));
    $inlinestyle = ".rokminievents-wrapper {width:" . $width . "px;} .rokminievents-item {width:" . $item . "px;}";
    $doc->addStyleDeclaration($inlinestyle);
}
$rokminievents = new RokMiniEvents();
$rokminievents->loadScripts($params);
$events = $rokminievents->getEvents($params);
require JModuleHelper::getLayoutPath('mod_rokminievents');