The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Give Users +10 postcount when they post a thread
Very Simple I presume
Just how do I do it ? I dont want to add any reward things or anything like that, just simple give users +10 posts if they post a thread. Thanks PS: also when i delete the thread it needs to -10 postcounts from the user that started it. I am using VB 2.3.0 |
#2
|
||||
|
||||
Open root/newthread.php
Find: Code:
$DB_site->query("UPDATE user SET ".iif ($foruminfo[countposts],"posts=posts+1,","")." $dotitle"."lastpost='".time()."' WHERE userid='$bbuserinfo[userid]'"); } Code:
$DB_site->query("UPDATE user SET ".iif ($foruminfo[countposts],"posts=posts+10,","")." $dotitle"."lastpost='".time()."' WHERE userid='$bbuserinfo[userid]'"); } Find: Code:
if (is_array($userpostcount)) { while(list($postuserid,$subtract)=each($userpostcount)) { $DB_site->query("UPDATE user SET posts=posts$subtract WHERE userid='$postuserid'"); } } Code:
if (!empty($userpostcount)) { $DB_site->query("UPDATE user SET posts=posts-9 WHERE userid='$postuserid'"); } It says [high]-9[/high], as the query above it will reduce the user's post count for the amount of posts in that thread that they made, so the first post will be counted as 1 post, so to make it remove 10 you have to subtract the 1 which was already removed, leaving you with 9 to remove afterwards I have also made it check that the User's post count is not 0, and if it is, it will not run that query... It should all work Satan |
#3
|
||||
|
||||
Satan thanks alot I will do that and let you know what happens
|
#4
|
||||
|
||||
Works thanks
|
#5
|
||||
|
||||
No problemos
Satan |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|