Exemplo n.º 1
0
 public static function getUrl($params)
 {
     $ids = ModShowHelper::show_get_img_arr($params);
     if (count($ids[1]) == 0) {
         return null;
     }
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select(array('id,link'))->from($db->quoteName('#__menu'))->where($db->quoteName('id') . 'in(' . implode(',', $ids[1]) . ')');
     try {
         $db->setQuery($query);
         $ret = $db->loadObjectList();
     } catch (Exception $e) {
         return false;
     }
     foreach ($ret as $obj) {
         $data[$obj->id] = $obj->link;
     }
     return $data;
 }
Exemplo n.º 2
0
<?php

defined('_JEXEC') or die;
$time = is_numeric($params->get('time')) ? $params->get('time') : 10000;
$module_width = is_numeric($params->get('width')) ? $params->get('width') : 950;
$module_height = is_numeric($params->get('height')) ? $params->get('height') : 250;
$suffix = ModShowHelper::show_get_img_arr($params)[0];
$menu_ids = ModShowHelper::show_get_img_arr($params)[1];
$img_num = count(ModShowHelper::show_get_img_arr($params)[0]);
$href = ModShowHelper::getUrl($params);
$page_num = ceil($img_num / 3);
$document = JFactory::getDocument();
$document->addScript('media/mod_show/js/jquery.min.js');
$document->addScript('media/mod_show/js/ck_slide.js');
?>

<style type="text/css">
.ck-slide .ck-prev, .ck-slide .ck-next { position: absolute; top: 50%; z-index: 2; width: 35px; height: 70px; margin-top: -35px; border-radius: 3px; opacity: .15; background: red; text-indent: -9999px; background-repeat: no-repeat; transition: opacity .2s linear 0s;}
.ck-slide .ck-prev { display:none;left: 5px; background: url(<?php 
echo JURI::base(true) . '/media/mod_show/image/arrow-left.png';
?>
) #000 50% no-repeat;}
.ck-slide .ck-next { display:none;right: 5px; background: url(<?php 
echo JURI::base(true) . '/media/mod_show/image/arrow-right.png';
?>
) #000 50% no-repeat;}

.ck-slide { width:<?php 
echo $module_width;
?>
px; height:<?php