Exemplo n.º 1
0
 /**
  * get list k2 items
  */
 public static function getList($params, $categories, $totalItems = 0)
 {
     $my =& JFactory::getUser();
     self::$AID = $my->get('aid', 0);
     self::setCacheImagePath('mod_lofk2news2');
     // if the cache option is enabed ?
     if ($params->get('enable_cache')) {
         $cache =& JFactory::getCache('mod_lofk2news2');
         $cache->setCaching(true);
         $cache->setLifeTime($params->get('cache_time', 30) * 60);
         return $cache->get(array('modLofK2News', '_getList'), array($params, $categories, $totalItems));
     } else {
         return self::_getList($params, $categories, $totalItems);
     }
 }
Exemplo n.º 2
0
        ?>
</a></p>
                    <?php 
        if ($cii + 1 >= $maxCatsShowed) {
            break;
        }
    }
    ?>
                </div>
      	  </div>
          <!--  ENDCONTENT RIGHT OF THE BOX //--> 
          <?php 
}
?>
  
       </div> 
</div>
<div class="clearfix"></div>

<?php 
if (array_key_exists($k, $positions) && $positions[$k]) {
    ?>
 <!--  INJECT POS OF THE BOX //-->
	<div class="lof-injectpos">
    	<?php 
    echo modLofK2News::loadModulesByPosition($positions[$k]);
    ?>
    </div>
   <!-- END INJECT POS OF THE BOX //-->  
<?php 
}
Exemplo n.º 3
0
 * @package		modules
 * @subpackage	$Subpackage.
 * @copyright	Copyright (C) Octorber 2010 LandOfCoder.com <@emai:landofcoder@gmail.com>.All rights reserved.
 * @license		GNU General Public License version 2
 */
// no direct access
defined('_JEXEC') or die;
$item = modLofK2News::onBeforeRender($item, $sDescriptionMaxChars, $limitDescriptionBy, $params->get('itemAuthor', 1));
?>
<li class="lof-item">
    
    <?php 
if ($sShowImage) {
    ?>
      <?php 
    echo modLofK2News::getImage($item, $sImageWidth, $sImageHeight, $isThumb);
    ?>
    <?php 
}
?>
   <h4><a href="<?php 
echo $item->link;
?>
"><?php 
echo $item->title;
?>
</a></h4>
   <?php 
if ($item->description && $item->description != "...") {
    ?>
   
Exemplo n.º 4
0
    <?php 
if ($lShowImage) {
    ?>
      <?php 
    echo modLofK2News::getImage($item, $lImageWidth, $lImageHeight, $isThumb);
    ?>
    <?php 
}
?>
	
	    <h4>
    	<a href="<?php 
echo $item->link;
?>
" class="<?php 
echo modLofK2News::getIcon($item);
?>
"><span><?php 
echo $item->title;
?>
</span></a>
    	</h4>
          <div class="lof-extrainfo">
                <?php 
if ($params->get('itemCategory', 1)) {
    ?>
                <?php 
    echo JText::_('Published In');
    ?>
 
                    <a title="<?php 
Exemplo n.º 5
0
$tmp = $params->get('module_width', 'auto');
$moduleWidth = $tmp == 'auto' ? 'auto' : (int) $tmp . 'px';
$openTarget = $params->get('open_target', 'parent');
$class = $params->get('navigator_pos', 0) ? '' : 'lof-snleft';
$itemLayout = 'item' . DS . trim($params->get('content_slider', 'image-desc')) . '.php';
$css3 = $params->get('enable_css3', '1') ? " lof-css3" : "";
$isThumb = $params->get('auto_renderthumb', 1);
/** RENDER CONTENT FOR LAYOUT **/
modLofK2News::loadMediaFiles($params, $module);
$catids = $params->get('category', '');
$catids = !is_array($catids) ? array($catids) : $catids;
$layoutModulePath = JModuleHelper::getLayoutPath($module->module);
$categoriesInfo = modLofK2News::getCategoriesInfo($catids);
foreach ($catids as $k => $id) {
    // parent category information
    if (isset($categoriesInfo[$id])) {
        $categoryInfo = $categoriesInfo[$id];
        $themeBox = array_key_exists($k, $themesSetting) ? "lof-" . $themesSetting[$k] : "";
        $categories = modLofK2News::getListCategories((int) $id);
        $showCategories = true;
        if ($maxCatsShowed <= 0 || count($categories['ids']) <= 1) {
            $showCategories = false;
        }
        $items = modLofK2News::getList($params, $categories['ids'], $totalItems);
        unset($categories['ids']);
        $leading = array_slice($items, 0, $leadingCount);
        $primary = array_slice($items, $leadingCount, $primaryCount);
        $secondary = array_slice($items, $leadingCount + $primaryCount, $secondaryCount);
        require $layoutModulePath;
    }
}