The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
first post counted as reply in custom script
I am working on building a classifieds section on my forum and the current code is counting the first post of a thread as a reply. is there a way around this? Here is my current code
Code:
$cats = array(18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68); foreach ($cats AS $cat => $forumid) { $t_count[$forumid] = array( "forumid" => $forumid, "forum_name" => $vbulletin->forumcache[$forumid]['title'], "threadcount" => vb_number_format($vbulletin->forumcache[$forumid]['threadcount']), "replycount" => vb_number_format($vbulletin->forumcache[$forumid]['replycount']) ); } foreach ($cats AS $cat) { $total_count_thread += vb_number_format($vbulletin->forumcache[$cat]['threadcount']); $total_count_reply += vb_number_format($vbulletin->forumcache[$cat]['replycount']); } $classifieds = array_merge($t_count); if (is_member_of($vbulletin->userinfo, 6)) { /* print_r($total_count_reply); echo "<br />"; print_r($total_count_thread); */ } vB_Template::preRegister('FORUMHOME',array('classifieds' => $classifieds)); vB_Template::preRegister('FORUMHOME',array('total_count_thread' => $total_count_thread)); vB_Template::preRegister('FORUMHOME',array('total_count_reply' => $total_count_reply)); https://www.thesecond.org/forum/#classifieds if i make a "classified" aka thread, my "Listings" and "Replies" count is 1 when I'd like it to be Listings: 1 Replies: 0 Hope that makes sense. Thanks in advance! |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|