Quote:
Originally Posted by Boofo
Try changing your hook location for your query to the postbit_display_complete.
|
Thanks! that did the trick! It works now.
For anyone interested Here's the plugin : (Admin CP -> Plugins & Products -> Plugin Manager -> Add New Plugin )
Product : Vbulletin
Hook Location : postbit_display_complete
Titile : Referrals in Postbit
Execution Order : 5
Plugin PHP code :
Code:
$usersid = $this->post['userid'];
$refcount = mysql_query("SELECT username FROM " . TABLE_PREFIX . "user WHERE referrerid='$usersid'");
$referrals = mysql_num_rows($refcount);
$template_hook['postbit_userinfo_right_after_posts'] .= '<dt>Referrals</dt><dd> '. $referrals.'</dd>';
Plugin is Active : yes
Like Boofo said, this adds a query for every post.