The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
When I submit a new reply I get the following error:
Quote:
Code:
$db->query("UPDATE user SET available = available + 100 WHERE userid = $bbuserinfo[userid]");
Code:
$db->query("UPDATE user SET available = available + 100 WHERE userid = $vbulletin->userinfo[userid]");
|
|
#2
|
||||
|
||||
|
1) $db is not within the Scope of build_new_post(); $vbulletin is.
2) $bbuserinfo does not exist in vB 3.5 3) You cant use $vbulletin->userinfo within an evaluated String - break out of it or use {} But it might be a good idea to use userdata_postsave anyway to avaoid an additional Query. |
|
#3
|
|||
|
|||
|
Quote:
Would it be something like this? Code:
$uid = $vbulletin->userinfo[userid];
$this->query("UPDATE user SET available = available + 100 WHERE userid = $uid");
|
|
#4
|
||||
|
||||
|
Actually it would be smth. like this in the Datamanager
PHP Code:
|
|
#5
|
|||
|
|||
|
thanks for helping out KirbyDE. Is there any place I can look to see more detailed documentation as to what can be used in which hooks?
|
|
#6
|
||||
|
||||
|
Yes - the PHP files
|
|
#7
|
|||
|
|||
|
Can you tell me which php file has userdata_postsave hook in it?
|
|
#8
|
||||
|
||||
|
class_dm_user.php
|
|
#9
|
|||
|
|||
|
Thank You
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|