Quote:
Originally Posted by Blaine0002
it is actually very easy to add points for different actions people do ont he forums, i am going to cover voting on a poll.
Create a new plugin and call it : ICash Poll
The hooklocation should probably be : pollvotedata_postsave
and the code should look somthing like this
PHP Code:
$amount = '1';
$vbulletin->db->query("update " . TABLE_PREFIX . "user set {$vbulletin->options['icashf']}={$vbulletin->options['icashf']}+'{$amount}' where userid='{$vbulletin->userinfo['userid']}'");
now just set the $amount variable to the amount you want to give to the voter.
simple as that, you simply have to know what hook is located where.
if you wanted to subtract points all you would need to do is change + to - in the php code.
Have fun and feel free to post your plugins 
|
I did this and it does not work. It say:
Fatal error: Call to a member function on a non-object in .../public_html/forum/includes/class_dm_pollvote.php(138) : eval()'d code on line 2