View Single Post
  #13  
Old 04-08-2009, 11:57 PM
decipher442 decipher442 is offline
 
Join Date: Jan 2009
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02270 seconds
  • Memory Usage 1,799KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html
  • (1)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete