Esempio n. 1
0
 function getList($params, $module)
 {
     $content = new ContentSlider();
     $content->featured = $params->get('featured', 2);
     $content->limit = $params->get('total', 5);
     $content->sort_order_field = $params->get('sort_order_field', "created");
     $content->thumb_height = $params->get('thumb_height', "150");
     $content->thumb_width = $params->get('thumb_width', "120");
     $content->small_thumb_height = $params->get('small_thumb_height', "150");
     $content->small_thumb_width = $params->get('small_thumb_width', "120");
     $content->resize_folder = JPATH_CACHE . DS . $module->module . DS . "images";
     $content->url_to_resize = JURI::base() . "cache/" . $module->module . "/images/";
     $content->imagesource = $params->get('imagesource', 1);
     $content->cropresizeimage = $params->get('cropresizeimage', 1);
     $content->sec_cat_list = $params->get('sec_cat_list', 1);
     $items = $content->getList();
     return $items;
 }
Esempio n. 2
0
 function getSubCategories($pId, $clear = false)
 {
     static $cats = array();
     if ($clear == true) {
         $cats = array();
     }
     $cats[] = $pId;
     $db =& JFactory::getDBO();
     $sql = 'SELECT c.id FROM #__categories c  WHERE c.parent_id = "' . $pId . '"';
     $db->setQuery($sql);
     $items = $db->loadObjectList();
     if (sizeof($items) > 0) {
         foreach ($items as $item) {
             ContentSlider::getSubCategories($item->id);
         }
     }
     return $cats;
 }