vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Add/Delete Postcount (https://vborg.vbsupport.ru/showthread.php?t=154244)

Terrasoft 08-03-2007 11:28 PM

Add/Delete Postcount
 
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:

PHP 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!


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00990 seconds
  • Memory Usage 1,708KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete