Terrasoft
08-03-2007, 11:28 PM
In the vbulletin hardcode, which files determine if a post is added and *counted* (updating increasing the user table in mysql) and if a post is deleted (updating decreasing post in mysql user table.)???
Im trying to add this MB system, meaning that if they post then they get a certain amount of MBs for download. Currently Im using this code:
// Add's Download Points when posts are counted
$download_userid = $vbulletin->userinfo['userid'];
mysql_unbuffered_query("UPDATE user SET extra_download_allowance = extra_download_allowance + 1024 WHERE userid = '$download_userid'") or die(mysql_error());Where you can alter 1024 with however many you want added, but I only want it to add when the post is definitely counted and raises your post count and just by adding the -1024 instead of +1024, if I can find the exact place I see where it deletes or decreases the postcount, I can have it autodeduct from their points when a post is deleted. If someone can aid me in this, Id be grateful. Im also trying to set it for when a user makes a thread, if someone wants to go ahead and assist me in telling me where it defines when a thread is made it'd be extremely appreciated. Thanks in advance!
Im trying to add this MB system, meaning that if they post then they get a certain amount of MBs for download. Currently Im using this code:
// Add's Download Points when posts are counted
$download_userid = $vbulletin->userinfo['userid'];
mysql_unbuffered_query("UPDATE user SET extra_download_allowance = extra_download_allowance + 1024 WHERE userid = '$download_userid'") or die(mysql_error());Where you can alter 1024 with however many you want added, but I only want it to add when the post is definitely counted and raises your post count and just by adding the -1024 instead of +1024, if I can find the exact place I see where it deletes or decreases the postcount, I can have it autodeduct from their points when a post is deleted. If someone can aid me in this, Id be grateful. Im also trying to set it for when a user makes a thread, if someone wants to go ahead and assist me in telling me where it defines when a thread is made it'd be extremely appreciated. Thanks in advance!