NOTE: The $channels object passed here should contain forum tree structure containing categories, main forums and subforums under the specified root id Change this value to adjust the number of colums for the subchannels {vb:set subChannelsPerRow, 3} Top level node is a category {vb:hook 'forumlist_before_categories'}   {vb:raw channel.title} {vb:rawphrase {vb:raw forumHeaderPhrase}} {vb:rawphrase directory} {vb:rawphrase topics} {vb:rawphrase posts} {vb:rawphrase last_post} this is a channel without category, so display a blank category first then the channels (forums/subforums)   Top level node is a forum -- Move the entire $channel array to its 'subchannels' array {vb:set nodeid, {vb:raw channel.nodeid}} {vb:set tempChannel, {vb:raw channel}} {vb:set channel.subchannels, {vb:php array}} {vb:set "channel['subchannels'][$nodeid]", {vb:raw tempChannel}} fetch info in batches {vb:set userIds, {vb:php array}} {vb:set num_elem, {vb:php array_push, {vb:raw userIds}, {vb:raw forum.lastcontent.userid}}} {vb:data userThumbAvatars, user, fetchAvatars, {vb:raw userIds}, 1} if the forum is actually a Category (category within a category), then let it be displayed like a forum would but don't display any statistics {vb:set isSubcategory, 1} {vb:set isSubcategory, 0} {vb:set forumLevel, 2} {vb:set forumLevel, 1} {vb:template display_Forums_item, forum={vb:raw forum}, forumLevel={vb:raw forumLevel}, isSubcategory={vb:raw isSubcategory}, avatar={vb:raw userThumbAvatars}}
{vb:rawphrase sub_forums}
{vb:set cols, 1} {vb:set colspan, ''} {vb:set colspan, {vb:concat 'colspan="', {vb:math {vb:raw subChannelsPerRow} - {vb:raw remaining} + 1}, '"'}} {vb:set cols, {vb:math {vb:var cols} + 1}}
js-frame-image-wrapper "> js-frame-image " alt="{vb:var subforum.title}" title="{vb:if "$subforum['is_new']", {vb:phrase new_posts}, {vb:phrase no_new_posts}}" /> b-icon__speech-single2--blue b-icon__speech-single2--gray"> {vb:raw subforum.title} ({vb:number {vb:raw subforum.topics}}/{vb:number {vb:raw subforum.posts}})