File manager - Edit - /home/verseaumee/www/plugins/system/bluejoomla/shortcodes/tabs.php
Back
<?php /** * @author Bluejoomla * @date: 01-04-2014 * * @copyright Copyright (C) 2013 shinetheme.com . All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ //no direct accees defined ('_JEXEC') or die('resticted aceess'); //[Tab] if(!function_exists('tab_sc')) { $tabArray = array(); function tab_sc( $atts, $content="" ){ global $tabArray; $params = btshortcode_atts(array( 'id' => 'tab', 'class'=>'', 'direction'=>'vertical', 'title'=>'' ), $atts); $rand = rand(0,9999999); btdo_shortcode( $content ); if ($params['direction'] == 'vertical'){ $return = '<div class="row m0 leftAlignedTap">'; //Tab Title $return .='<ul class="nav nav-tabs" role="tablist" id="'.$rand . $params['id'] . '">'; foreach ($tabArray as $key=>$tab) { $return .='<li role="presentation" class="'. ( ($key== 0) ? "active" : "").'"> <a href="#'.$rand. $params['id'] . '-' . $key.'" aria-controls="#'.$rand. $params['id'] . '-' . $key.'" role="tab" data-toggle="tab"> <i class="fa '.$tab['icon_name'].'"></i> '. $tab['title'] .' </a></li>'; } $return .='</ul>'; //Tab Content $return .='<div class="tab-content">'; foreach ($tabArray as $key=>$tab) { $return .='<div role="tabpanel" class="tab-pane '. ( (($key)==0) ? " active" : "").'" id="'.$rand. $params['id'] . '-' . $key.'"> '. btdo_shortcode($tab['content']) .'</div>'; } $return .='</div>'; $return .='</div>'; }else{ $return = '<div class="row getInTouch_tab m0">'; //Tab Title $return .='<ul class="nav nav-tabs nav-justified" role="tablist" id="getInTouch_tab">'; foreach ($tabArray as $key=>$tab) { $return .='<li role="presentation" class="'. ( ($key== 0) ? "active" : "").'"> <a href="#v'.$rand. $params['id'] . '-' . $key.'" aria-controls="v'.$rand. $params['id'] . '-' . $key.'" role="tab" data-toggle="tab"> <i class="fa '.$tab['icon_name'].'"></i> '. $tab['title'] .' </a></li>'; } $return .='</ul>'; //Tab Content $return .='<div class="tab-content">'; foreach ($tabArray as $key=>$tab) { $return .='<div role="tabpanel" class="tab-pane'. ( (($key)==0) ? " active" : "").'" id="v'.$rand. $params['id'] . '-' . $key.'"> '. btdo_shortcode($tab['content']) .'</div>'; } $return .='</div>'; $return .='</div>'; } $tabArray = array(); return $return; } btadd_shortcode( 'tab', 'tab_sc' ); //Tab Items function tab_item_sc( $atts, $content="" ){ global $tabArray; $tabArray[] = array('title'=>$atts['title'], 'icon_name'=>$atts['icon_name'], 'content'=>$content); } btadd_shortcode( 'tab_item', 'tab_item_sc' ); function st_module_func($atts, $content="" ){ $mod_position = $content; jimport( 'joomla.application.module.helper' ); $new_modules = JModuleHelper::getModules($mod_position); $attribs['style'] = 'xhtml'; if (count(JModuleHelper::getModules($mod_position))){ $mod_content = JModuleHelper::renderModule($new_modules[0], $attribs); return (string)$mod_content; } } btadd_shortcode( 'st_module', 'st_module_func' ); }
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings