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