Follow vBSEO on Twitter
vBulletin Modifications
  • Forums
  • Add-Ons
  • Template Modifications
  • Styles
  • Graphics
  • Tutorials
  • Support Center
  • Register
  • vBulletin SEO

Member Log In

Site Navigation

  • Register
  • Members List
  • Social Groups
  • Search
  • Today's Posts
  • Mark Forums Read

Latest Modifications

  • [vB 3.8.4] THX - Hack for VB. 3.8.4
    By: bluedog
  • [vB 3.8.4] Cyb - Chatbox V.2.3
    By: bluedog
  • [vB 4.0.x] PHPKD - Advanced Quick...
    By: PHPKD
  • [vB 3.6.x] StopSpam
    By: flappi282
  • [vB 3.8.x] vBulletin Chat Addon for...
    By: 123flashchat

Latest Template Mods

  • [vB 4.0.x] Remove My Profile Link...
    By: Ak Worm
  • [vB 3.8.x] Images DownloadBox...
    By: cRs!MP
  • [vB 3.8.x] Adviertise Mod On Forum...
    By: MG4
  • [vB 3.8.4] Images PassWordBox...
    By: cRs!MP
  • [vB 3.8.4] Footer Follow Ups
    By: Ak Worm

Latest Styles

  • [vB 4.0.x] 4.0.3 - VB4STYLE-TWEETA...
    By: Belon
  • [vB 4.0.x] [4.0.3] vbdesigns.de...
    By: Belon
  • [vB 3.8.4] CompletevB - Skylight
    By: DreadKnight
  • [vB 3.8.3] [vB 3.8.4] Barcelona...
    By: hoiquantinhoc.com
  • [vB 3.8.3] Natures Walk by vBSkin...
    By: Chri5

Latest Graphics

  • [vB ] [anim.]Team Ranks
    By: cRs!MP
  • [vB ] Abstract Circles (3...
    By: cRs!MP
  • [vB ] PlayStation Rank Images
    By: cRs!MP
  • [vB 3.6.12] Heavy Stroked Button...
    By: Shelley
  • [vB ] Minature Ranks.
    By: Shelley
vBulletin Modifications » Support Center » vBulletin Support » Just got the Thread Count Hack by TouchingVirus
Reply

 

  • Thread Tools
Old 04-23-2004, 05:16 AM   #1
Infamouz Nex
Charter Member

Activity Longevity
0/20 20/20
Today Posts
0/3 ssssss125
Location: Boston, MA
Age: 25
Infamouz Nex is on a distinguished road
Send a message via AIM to Infamouz Nex Send a message via MSN to Infamouz Nex
Status: Offline Default Just got the Thread Count Hack by TouchingVirus
hmmm having some problems.... he has these set up a little different then how i want it...

he has Count 1, Count 2, Count 3, Count 4, Count 5

and its under the members list, and in a thread... but i want all 1 number... now..... i know i have to edit the code... i just dont know what to edit...

=========================================
Open functions_newpost.php
Add Before $DB_site->query(" on line 367
=========================================


PHP Code:
// Begin Thread Count Hack By TouchingVirus
if (($foruminfo['forumid']=='counter1_forum1') || ($foruminfo['forumid']=='counter1_forum2'))
{
$threadcount1 = $DB_site->query("SELECT * FROM thread_count WHERE userid=$bbuserinfo[userid]");
while (
$threadcounter1 = $DB_site->fetch_array($threadcount1))
{
$counter++;}if ($counter<1)
{
    
$DB_site->query("INSERT INTO thread_count (userid,count1,count2,count3,count4,count5) VALUES('".$bbuserinfo['userid']."',1,0,0,0,0)");
}
else
{
    
$DB_site->query("UPDATE thread_count SET count1=count1+1 WHERE userid=$bbuserinfo[userid]");
}
}
if ((
$foruminfo['forumid']=='counter2_forum1') || ($foruminfo['forumid']=='counter2_forum2'))
{
$threadcount2 = $DB_site->query("SELECT * FROM thread_count WHERE userid=$bbuserinfo[userid]");
while (
$threadcounter2 = $DB_site->fetch_array($threadcount2))
{
$counter++;}if ($counter<1)
{
$DB_site->query("INSERT INTO thread_count (userid,count1,count2,count3,count4,count5) VALUES('".$bbuserinfo['userid']."',0,1,0,0,0)");
}
else
{
$DB_site->query("UPDATE thread_count SET count2=count2+1 WHERE userid=$bbuserinfo[userid]");
}
}
if ((
$foruminfo['forumid']=='counter3_forum1') || ($foruminfo['forumid']=='counter3_forum2'))
{
$threadcount3 = $DB_site->query("SELECT * FROM thread_count WHERE userid=$bbuserinfo[userid]");
while (
$threadcounter3 = $DB_site->fetch_array($threadcount3))
{
$counter++;}if ($counter<1)
{
$DB_site->query("INSERT INTO thread_count (userid,count1,count2,count3,count4,count5) VALUES('".$bbuserinfo['userid']."',0,0,1,0,0)");
}
else
{
$DB_site->query("UPDATE thread_count SET count3=count3+1 WHERE userid=$bbuserinfo[userid]");
}
}
if ((
$foruminfo['forumid']=='counter4_forum1') || ($foruminfo['forumid']=='counter4_forum2'))
{
$threadcount4 = $DB_site->query("SELECT * FROM thread_count WHERE userid=$bbuserinfo[userid]");
while (
$threadcounter4 = $DB_site->fetch_array($threadcount4))
{
$counter++;}if ($counter<1)
{
$DB_site->query("INSERT INTO thread_count (userid,count1,count2,count3,count4,count5) VALUES('".$bbuserinfo['userid']."',0,0,0,1,0)");
}
else
{
$DB_site->query("UPDATE thread_count SET count4=count4+1 WHERE userid=$bbuserinfo[userid]");
}
}
if ((
$foruminfo['forumid']=='counter5_forum1') || ($foruminfo['forumid']=='counter5_forum2'))
{
$threadcount5 = $DB_site->query("SELECT * FROM thread_count WHERE userid=$bbuserinfo[userid]");
while (
$threadcounter5 = $DB_site->fetch_array($threadcount5))
{
$counter++;}if ($counter<1)
{
$DB_site->query("INSERT INTO thread_count (userid,count1,count2,count3,count4,count5) VALUES('".$bbuserinfo['userid']."',0,0,0,0,1)");
}
else
{
$DB_site->query("UPDATE thread_count SET count5=count5+1 WHERE userid=$bbuserinfo[userid]");
}
}
// End Thread Count Hack By TouchingVirus 
========================================
Open showthread.php on line 938
=======================================

FIND ONLY ON THIS LINE (938)

PHP Code:
$postbits .= construct_postbit($post, $template); 
Add BEFORE

PHP Code:
// Begin Thread Count Hack by TouchingVirus
$threadcount = '';
$threadcounttemplate = '';
$count=$DB_site->query_first("SELECT * FROM thread_count WHERE userid='$post[userid]'");
$count1amount=$count['count1'];
$count2amount=$count['count2'];
$count3amount=$count['count3'];
$count4amount=$count['count4'];
$count5amount=$count['count5'];

// Put in here the USERID's that you want exempt from the thread_count counters
// For example, if your an admin & dont post images, yet your counters count images
// You dont want all your members to think your a loser with 0 images to post..so use this function
// Just add in another || and ($post[userid]=='') for every user...

if (($post[userid]=='exempt1') || ($post[userid]=='exempt2'))
{
$count1 = ''; 
$count2 = '';  
$count3 = '';  
$count4 = '';  
$count5 = '';  
}
else
{
$count1 = '<div>Count1: ' .$count1amount. '</div>'; 
$count2 = '<div>Count2: ' .$count2amount. '</div>';  
$count3 = '<div>Count3: ' .$count3amount. '</div>';  
$count4 = '<div>Count4: ' .$count4amount. '</div>';  
$count5 = '<div>Count5: ' .$count53amount. '</div>';  
}
// End Thread Count Hack by TouchingVirus 
========================================
Open member.php on line 426
=======================================

FIND:

PHP Code:
$show['extrainfo'] = true;
} 
ADD BELOW:

PHP Code:
// Begin Thread Count Hack by TouchingVirus
$threadcount = '';
$threadcounttemplate = '';
$count=$DB_site->query_first("SELECT * FROM thread_count WHERE userid='$post[userid]'");
$count1amount=$count['count1'];
$count2amount=$count['count2'];
$count3amount=$count['count3'];
$count4amount=$count['count4'];
$count5amount=$count['count5'];

// Put in here the USERID's that you want exempt from the thread_count counters
// For example, if your an admin & dont post images, yet your counters count images
// You dont want all your members to think your a loser with 0 images to post..so use this function
// Just add in another || and ($post[userid]=='') for every user...

if (($post[userid]=='exempt1') || ($post[userid]=='exempt2'))
{
$count1 = ''; 
$count2 = '';  
$count3 = '';  
$count4 = '';  
$count5 = '';  
}
else
{
$count1 = '<div>Count1: ' .$count1amount. '</div>'; 
$count2 = '<div>Count2: ' .$count2amount. '</div>';  
$count3 = '<div>Count3: ' .$count3amount. '</div>';  
$count4 = '<div>Count4: ' .$count4amount. '</div>';  
$count5 = '<div>Count5: ' .$count53amount. '</div>';  
}
// End Thread Count Hack by TouchingVirus 

what do i edit to have all of them add up to 1 counter, and what do i edit to insert the 5 forumids, which are 4,5,8,12,17. Thank in advanced.

justincase those taht want the script
Attached Files
File Type: zip TouchingVirus[1].Thread.Counter.zip (6.4 KB, 17 views)
Reply With Quote
Old 04-23-2004, 11:00 AM   #2
ShavedApe
Coder

Activity Longevity
0/20 20/20
Today Posts
0/3 sssss1112
Location: UK
Age: 37
ShavedApe is on a distinguished road
Status: Offline Default
lol i shouldnt even comment on this since I already gave you the code to do exactly what your asking.
The showthread and member part of his code I didnt supply but then I seem to remember you saying you want to learn :p

You want to set specific forums and have a total for threads created in 2 or 3 forums by user I gave you the code to do that all you had to do was install and test :p The first part of my post was what you had to find. The second part was what you had to replace with

So in answer to your question. You use the code i supplied alreadly lol and since you have this one as well you look over the showthread and member part and figure out what you need to edit based on what you added to the dbase

Above seems to be doing a lot of querys for what is a very simple hack (no offence intented to the maker btw)
The counts themselves dont need to be fetched to update them.


Driving Lessons Bolton

Last edited by ShavedApe; 04-26-2004 at 04:33 AM.
Reply With Quote
Old 04-23-2004, 12:33 PM   #3
Infamouz Nex
Charter Member

Activity Longevity
0/20 20/20
Today Posts
0/3 ssssss125
Location: Boston, MA
Age: 25
Infamouz Nex is on a distinguished road
Send a message via AIM to Infamouz Nex Send a message via MSN to Infamouz Nex
Status: Offline Default
i agree. thank you.
Reply With Quote
Old 04-23-2004, 04:28 PM   #4
Ken Iovino
vBulletin Guru

Ken Iovino's Avatar

Activity Longevity
0/20 20/20
Today Posts
0/3 sssss2695
Location: Miami, Florida
Age: 27
Ken Iovino is on a distinguished road
Status: Offline Default
That code in the showthread will add a query for every post on the page.
Reply With Quote
Old 04-23-2004, 06:26 PM   #5
Infamouz Nex
Charter Member

Activity Longevity
0/20 20/20
Today Posts
0/3 ssssss125
Location: Boston, MA
Age: 25
Infamouz Nex is on a distinguished road
Send a message via AIM to Infamouz Nex Send a message via MSN to Infamouz Nex
Status: Offline Default
uh huh... i understand that... but do i really have a choice? on my page (the poem one) people would like to know, exactly how many poems they have currently submitted... like its one of those neccessity... :goof:
Reply With Quote
Old 04-23-2004, 06:45 PM   #6
Ken Iovino
vBulletin Guru

Ken Iovino's Avatar

Activity Longevity
0/20 20/20
Today Posts
0/3 sssss2695
Location: Miami, Florida
Age: 27
Ken Iovino is on a distinguished road
Status: Offline Default
Do you understand that if you have 15 post it will add 15 queries, added on to the 15 original queries that are executed, could be a total of aleast 30 queries for one page. That would slow the site down tremendously.

Also note: If one of your members likes to display more threads on one page it will be added on there. Myself likes to view 25 post per page. That would mean at least 40 queries.
Reply With Quote
Old 04-24-2004, 08:03 AM   #7
Infamouz Nex
Charter Member

Activity Longevity
0/20 20/20
Today Posts
0/3 ssssss125
Location: Boston, MA
Age: 25
Infamouz Nex is on a distinguished road
Send a message via AIM to Infamouz Nex Send a message via MSN to Infamouz Nex
Status: Offline Default
hmmm i understand. thank you for your explanation.

what i want is somethign like posts, but just a count for threads for the forums i give it to count for the user. would that make a lot ot queries? like ummm i dont need 5 seprate counts for each forum, its just 1 count for all forums inserted.... what do you think?
Reply With Quote
Old 04-26-2004, 04:38 AM   #8
ShavedApe
Coder

Activity Longevity
0/20 20/20
Today Posts
0/3 sssss1112
Location: UK
Age: 37
ShavedApe is on a distinguished road
Status: Offline Default
No it wouldnt create a lot of queries. Provided your count is added to the user table it can be called whenever user information would be used within a page which is most of the time.
I did provide a way of doing it in an earlier post somewhere on this board I just forgot where sorry.

lol i even used you as an example

http://www.vbhacks.us/forum/showthread.php?t=135&p=779

ah the wonders of the search button :p

Last edited by ShavedApe; 04-26-2004 at 04:43 AM.
Reply With Quote

Reply

« hacking question | Private Messaging - Unread marking »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Hack, Auto close thread/Move thread to new forum BigJohnny vBulletin Modification Requests 3 07-31-2009 06:41 AM
Thread Identifier hack. hornstar6969 vBulletin Modification Requests 2 09-14-2006 10:15 AM
Hack Installs / Working - Suggestion VirtualBurn Site Feedback 11 08-16-2006 07:01 PM
Mods/admins make thread have no post count Keyser Söze vBulletin Modification Requests 2 09-09-2004 03:33 PM



All times are GMT. The time now is 05:42 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Transverse Styles
  • Top
  • Archive
  • vBSEO
  • Contact Us
LinkBack
LinkBack URL LinkBack URL
About LinkBacks About LinkBacks
Bookmark & Share
Digg this Thread! Digg this Thread!
Add Thread to del.icio.us Add Thread to del.icio.us
Bookmark in Technorati Bookmark in Technorati
Furl this Thread! Furl this Thread!