vBulletin Modifications

[How To] Create forum counters

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support > vBulletin Modification Tutorials

Reply
 
LinkBack Thread Tools
Old 05-26-2006, 03:25 PM   #41
Coder
Join Date: Apr 2004
lasto is on a distinguished road

Default

kk nps any idea why as getting couplehundred of them per day yet board runs fine so it cant be nothing major.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 06-25-2006, 11:49 PM   #42
vB Newbie
Join Date: Oct 2004
TCattitude is on a distinguished road

Default

Quote:
Originally Posted by lasto
anyone able to finish this off - just need some php to update for threads etc which are already made before this hack is installed as it only counts the ones from when the hack is installed.So any existing ones are not counted.
Same here... any solution for that? please?, quick and easy and dirty even
Great "how to" by the way ;)




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-26-2006, 11:41 AM   #43
vB Newbie
Join Date: Oct 2004
TCattitude is on a distinguished road

Default

A note:
With ajax enable, the counter don't sum post. If you reply a thread in the old way, or if you make a new thread in a forum with the new counter enabled, or if you de-activate "problematic" ajax... then it counts as normal.
But, I make it work with ajax. I simply put this same peace of code:
Quote:
$usrname = $vbulletin->userinfo['username'];
if($foruminfo['enable_jokes_counter']){
$db->query_write("UPDATE " . TABLE_PREFIX . "user SET jokes = jokes + 1 WHERE username = '$usrname'");
}
from forumdata_start hook, to newreply_post_ajax... and problem solved.
I'm not to much experience in php. That was just test and try.

Some can give a easy way to update forumcounters now? please?
I look this hack:
http://www.vbulletin.org/forum/showt...t=thread+count
...and try to clone the "install code" to this hack (i packaged it into a product after apply all the plugins showed here). In that install code i put the querys to generate the new rows in user's table. But i can't get it work. I realize in that point of the product import, no forum have the "new counter" variable enabled, yo i try to put the forums ID directly in the query (that i try to copy from Boofo's mod)... but again: i can't get it work. Repeat: i'm not tu much experienced in php.
Someone with a little of time can do the trick?. Please.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-26-2006, 03:24 PM   #44
Niels
Support Staff
Niels's Avatar
Join Date: Jun 2004
Real Name: Niels
Location: NL
Niels is on a distinguished road

Default

I'll take a look in a few days for you guys




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-08-2006, 05:24 AM   #45
vB User
Join Date: Mar 2006
Real Name: Eric
Location: Netherlands
eric22269 is on a distinguished road

Default

Works great, now I only have to find out where the delete part goes.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-25-2006, 09:12 PM   #46
vB Newbie
Join Date: Aug 2006
KINGGS is on a distinguished road

Default

Im Haven Troubles With Tha Query Runnin..wen I Go To Run It Like Tha Test.php and it gives me this error

Fatal error: Call to a member function on a non-object in /home/******/public_html/******/TEST.php on line 2

Last edited by KINGGS; 08-25-2006 at 10:10 PM.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-25-2006, 10:10 PM   #47
vB Newbie
Join Date: Aug 2006
KINGGS is on a distinguished road

Default

Any Udate?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-26-2006, 05:00 PM   #48
vB Newbie
Join Date: Oct 2004
TCattitude is on a distinguished road

Default

Quote:
Originally Posted by KINGGS
Any Udate?
Same question here...




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-01-2006, 09:56 AM   #49
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

did you require global.php before you did that? If that's in the postbit then you need $this->registry->db->query not $db->query, try $vbulletin->db->query.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



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

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 Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[How To] Run a Query Ken Iovino vBulletin Modification Tutorials 9 07-30-2008 02:29 AM
[How To] Run vBulletin On your P.C. Ken Iovino vBulletin Modification Tutorials 81 12-15-2007 02:50 AM
[How to] Add navigation groups to your admincp left panel Ken Iovino vBulletin Modification Tutorials 11 07-15-2007 11:59 PM
[How To] Add Options per forum Ken Iovino vBulletin Modification Tutorials 10 03-03-2007 03:25 PM
[How To] Run a vb page outside of the forum directory Junior vBulletin Modification Tutorials 7 01-10-2007 07:05 PM


All times are GMT -3. The time now is 10:26 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)