public static function load_style($module, $params) { $doc = JFactory::getDocument(); //set moduleid $module_id = XEFUtility::getModuleId($module, $params); $moduleId = '#' . $module_id; $moduleClass = '.' . $module_id; $scrollerLayout = $params->get('scroller_layout'); /* * module unique id will only assign on horizontl style. * this unique class will only use for navigation arrow styling * vertical style will auto adjuct arrow position to middle using css file. */ $selectorClass = $scrollerLayout == 'basic_h' ? '.' . $moduleId : ''; //scroller wrapper widtha nd height. this width and height will effect on .pane class also. $moduleWidth = $paneWidth = (int) $params->get('module_width'); $moduleHeight = (int) $params->get('mod_height'); /* * In horizontal style item width will calculated by persentage value * In vertical style item height will calculate on module height and num of columns */ if ($scrollerLayout == 'basic_h') { $itemDimensions = 'width:' . 100 / (int) $params->get('col_amount') . '%'; } else { $itemDimensions = 'width: 100%; height:' . $moduleHeight / $params->get('col_amount') . 'px'; } $controlMargin = $params->get('control_margin'); //items div always higher value thats way we will check animatin style and determine the proper css property $animationStyle = $params->get('animation_style') == 'animation_h' ? 'width' : 'height'; //preaper all css settings $css = "\n {$moduleId} {height: {$moduleHeight}px;}\n\n {$moduleId} .items { {$animationStyle}:20000em; }\n {$moduleId} .pane .item{{$itemDimensions}; overflow:hidden; }\n\n {$moduleClass} a.browse{ margin:{$controlMargin}; }\n \n "; //push this css on document head $doc->addStyleDeclaration($css); }
public static function loadScripts($module, $params) { $doc = JFactory::getDocument(); // Set moduleid $module_id = XEFUtility::getModuleId($module, $params); // Load jQuery form framework XEFUtility::addjQuery($module, $params); $js = "jQuery(#{$module_id}).collapse();"; //$doc->addScriptDeclaration($js); if (!defined('XPERT_ACCORDION')) { //add tab engine js file $doc->addScript(JURI::root(true) . '/modules/mod_xpertaccordion/assets/js/xpertaccordion.js'); define('XPERT_ACCORDION', 1); } }
public static function generateTabs($tabs, $list, $params, $module) { $module_id = XEFUtility::getModuleId($module, $params); $title_type = $params->get('tabs_title_type'); $position = $params->get('tabs_position', 'top'); $html = array(); $icons = explode(',', (string) $params->get('faicon')); if ($title_type == 'custom') { $titles = explode(",", $params->get('tabs_title_custom')); } if ($tabs == 0 or $tabs > count($list)) { $tabs = count($list); } $html[] = '<ul class="txtabs-nav ' . $position . ' clearfix">'; for ($i = 0; $i < $tabs; $i++) { if ($list[$i]->introtext != NULL) { // li and a classes $class = ''; $aclass = ''; if (!$i) { $class = 'first active'; //$aclass = 'active'; } if ($i == $tabs - 1) { $class = 'last'; } if ($title_type == 'custom') { $title = isset($titles[$i]) ? $titles[$i] : ''; } else { $title = $list[$i]->title; } $html[] = '<li class="' . $class . '">'; $html[] = '<a data-toggle="tab" data-target="#' . $module_id . '-' . $i . '">'; $html[] = '<i class="' . $icons[$i] . '"></i>'; $html[] = "<span>{$title}</span>"; $html[] = '</a>'; $html[] = '</li>'; } } $html[] = '</ul>'; return implode("\n", $html); }
* @copyright Copyright (C) 2009 - 2011 ThemeXpert * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only * */ // no direct access defined('_JEXEC') or die('Restricted accessd'); // Check for the framework, if not found eject include_once JPATH_LIBRARIES . '/xef/bootstrap.php'; if (!defined('XEF_INCLUDED')) { echo 'Your Module installation is broken; please re-install. Alternatively, extract the installation archive and copy the xef directory inside your site\'s libraries directory.'; return; } // Include the syndicate functions only once require_once dirname(__FILE__) . '/helper.php'; //set module id $module_id = XEFUtility::getModuleId($module, $params); // Content source $content_source = $params->get('content_source', 'joomla'); // Import source and get the class name $class_name = importSource($content_source); // Create instance of the class $instance = new $class_name($module, $params); // Lets set some variables $cat_ids = array(); $cat_field = ''; $items = array(); // assign ids based on contetn_source switch ($content_source) { case 'joomla': $cat_ids = $params->get('jom_catid'); $cat_field = 'jom_catid';