Quote:
Originally Posted by footose
I want to insert a new "forum" on the main forum listing page, but with information that is not directly related to the vbulletin database.
Say for example, you have an image Gallary, and want to show the "latest image" in the "latest post" section.
I've done this already by using a conditional in the forum templates, however, I have been asked to create this into a Product and I would like to eliminate the amount of template edits that need to occur. I was hoping to "highjack" how the forums were parsed so that I can insert what I need to via a plugin.
|
Ah sweet! Makes sense to want to bypass the template parts.
as far as counts, I do know that there are counts created in the function file that I posted earlier, but I assume you want to get details before that..
here is a little snippit..
PHP Code:
$counters = array();
if (is_array($vbulletin->forumcache))
{
foreach($vbulletin->forumcache AS $forum)
{
$this_forum =& $counters["$forum[forumid]"];
$this_forum['threadcount'] = 0;
$this_forum['replycount'] = 0;
if (is_array($children["$forum[forumid]"]))
{
foreach($children["$forum[forumid]"] AS $id => $info)
{
$this_forum['threadcount'] += $info['threads'];
$this_forum['replycount'] += $info['posts'];
}
}
}
}