I'm just not haveing any luck with this at all. :|
I know the template to edit i just do not know what hook to choose nor how to add the hook into that template where I want it displayed.
I am sure if I had the experience you had it would be more simple... but I don't.
Isn't there an easier an easier way of doing this?
maybe doing it something like seen here...
http://www.vbulletin.com/forum/showthread.php?t=113870
but obiousely displaying total threads and posts instead of a sponsor link.
Quote:
Does anyone know how I can do this?
NOTE: (Here is an example of what I would like my category bar(s) to look like...)
__________________________________________________ ______________________
[__Category_Title___________________________Threads : X,XXX, Posts: XX,XXX__[^]_]
** Threads: X,XXX, Posts: XX,XXX = Total amount of Threads and Post from all sub-forums of the category.
** [^] = category collapse image
|
I see that this is the PHP code I need to add.. (That displays total threads and posts)
PHP Code:
<?php
$totalthreads = 0;
$totalposts = 0;
if (is_array($vbulletin->forumcache))
{
foreach ($vbulletin->forumcache AS $forum)
{
$totalthreads += $forum['threadcount'];
$totalposts += $forum['replycount'];
}
}
$totalthreads = vb_number_format($totalthreads);
$totalposts = vb_number_format($totalposts);
</a>
?>
And this is the template I need to edit... (
forumhome_forumbit_level1_nopost)
HTML Code:
<if condition="!$show['collapsable_forums']">
<tbody>
</if>
<tr>
<td class="tcat" colspan="<if condition="$vboptions[showmoderatorcolumn]">6<else />5</if>">
<if condition="$childforumbits">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumbit_$forumid')"><img id="collapseimg_forumbit_$forumid" src="$stylevar[imgdir_button]/collapse_tcat{$collapseimg_forumid}.gif" alt="" border="0" /></a>
</if>
<a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">$forum[title]</a>
<a style="float:$stylevar[right]">
<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
<if condition="$show['subforums']"><div class="smallfont"><strong>$vbphrase[subforums]</strong>: $forum[subforums]</div></if>
</td>
</tr>
<if condition="!$show['collapsable_forums']">
</tbody>
</if>
<if condition="$childforumbits">
<if condition="!$show['collapsable_forums']">
<tbody id="collapseobj_forumbit_$forumid" style="{$collapseobj_forumid}">
</if>
$childforumbits
<if condition="!$show['collapsable_forums']">
</tbody>
</if>
</if>
From my understanding.... all I need to do now is create the plugin...
1.
I DO NOT KNOW what hook to choose when creating the plugin, "Do you know?"
2. After the plugin is created what code snippet to I add into
forumhome_forumbit_level1_nopost template to make the plugin work?
Quote:
NOTE: (Here is an example of what I would like my category bar(s) to look like...)
__________________________________________________ ______________________
[__Category_Title___________________________Threads : X,XXX, Posts: XX,XXX__[^]_]
** Threads: X,XXX, Posts: XX,XXX = Total amount of Threads and Post from all sub-forums of the category.
** [^] = category collapse image
|
Thanks!