| @@ 77-93 (lines=17) @@ | ||
| 74 | $space = 1; |
|
| 75 | $chcount = 1; |
|
| 76 | $subcategories = ''; |
|
| 77 | foreach ($arr as $ele) { |
|
| 78 | if (true === XoopstubeUtility::xtubeCheckGroups($ele['cid'])) { |
|
| 79 | if ($GLOBALS['xoopsModuleConfig']['subcats'] == 1) { |
|
| 80 | $chtitle = $xtubemyts->htmlSpecialCharsStrip($ele['title']); |
|
| 81 | if ($chcount > 5) { |
|
| 82 | $subcategories .= '...'; |
|
| 83 | break; |
|
| 84 | } |
|
| 85 | if ($space > 0) { |
|
| 86 | $subcategories .= '<br>'; |
|
| 87 | } |
|
| 88 | $subcategories .= '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewcat.php?cid=' . $ele['cid'] . '">' . $chtitle . '</a>'; |
|
| 89 | ++$space; |
|
| 90 | ++$chcount; |
|
| 91 | } |
|
| 92 | } |
|
| 93 | } |
|
| 94 | ||
| 95 | // This code is copyright WF-Projects |
|
| 96 | // Using this code without our permission or removing this code voids the license agreement |
|
| @@ 72-90 (lines=19) @@ | ||
| 69 | $space = 1; |
|
| 70 | $chcount = 1; |
|
| 71 | $infercategories = ''; |
|
| 72 | foreach ($sub_arr as $sub_ele) { |
|
| 73 | // Subitem file count |
|
| 74 | $hassubitems = XoopstubeUtility::xtubeGetTotalItems($sub_ele['cid']); |
|
| 75 | // Filter group permissions |
|
| 76 | if (true === XoopstubeUtility::xtubeCheckGroups($sub_ele['cid'])) { |
|
| 77 | // If subcategory count > 5 then finish adding subcats to $infercategories and end |
|
| 78 | if ($chcount > 5) { |
|
| 79 | $infercategories .= '...'; |
|
| 80 | break; |
|
| 81 | } |
|
| 82 | if ($space > 0) { |
|
| 83 | $infercategories .= ', '; |
|
| 84 | } |
|
| 85 | ||
| 86 | $infercategories .= '<a href="' . XOOPS_URL . '/modules/' . $xoopsModule->getVar('dirname') . '/viewcat.php?cid=' . $sub_ele['cid'] . '">' . $xtubemyts->htmlSpecialCharsStrip($sub_ele['title']) . '</a> (' . $hassubitems['count'] . ')'; |
|
| 87 | ++$space; |
|
| 88 | ++$chcount; |
|
| 89 | } |
|
| 90 | } |
|
| 91 | $totalvideos = XoopstubeUtility::xtubeGetTotalItems($ele['cid']); |
|
| 92 | $indicator = XoopstubeUtility::xtubeIsNewImage($totalvideos['published']); |
|
| 93 | ||