Multi styled categories implemented on channels page
This commit is contained in:
parent
ef299b8295
commit
3d09ec7028
2 changed files with 10 additions and 9 deletions
|
@ -159,27 +159,24 @@
|
|||
*/
|
||||
|
||||
function pullCategories() {
|
||||
global $cbvid;
|
||||
global $cbvid, $userquery, $cbphoto;
|
||||
$params = array();
|
||||
switch (THIS_PAGE) {
|
||||
case 'videos':
|
||||
$type = 'video';
|
||||
$all_cats = $cbvid->cbCategories($params);
|
||||
break;
|
||||
case 'photos':
|
||||
$type = 'photo';
|
||||
$all_cats = $cbphoto->cbCategories($params);
|
||||
break;
|
||||
case 'channels':
|
||||
$type = 'channels';
|
||||
$all_cats = $userquery->cbCategories($params);
|
||||
break;
|
||||
|
||||
default:
|
||||
$type = 'video';
|
||||
$all_cats = $cbvid->cbCategories($params);
|
||||
break;
|
||||
}
|
||||
|
||||
$params['type'] = $type;
|
||||
$params['echo'] = false;
|
||||
$all_cats = $cbvid->cbCategories($params);
|
||||
if (is_array($all_cats)) {
|
||||
return $all_cats;
|
||||
} else {
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{$category = $smarty.get.cat}
|
||||
{if $category != 'All' && is_numeric($category)}
|
||||
{$catname = $cbvid->get_category_name($category)}
|
||||
{if $smarty.const.THIS_PAGE == 'videos'}
|
||||
{$catname = $cbvid->get_category_name($category)}
|
||||
{else}
|
||||
{$catname = $userquery->get_category_name($category)}
|
||||
{/if}
|
||||
{$catname = $catname.category_name}
|
||||
{else}
|
||||
{$catname = 'All'}
|
||||
|
|
Loading…
Add table
Reference in a new issue