The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
EQDKP in the postbit
I am trying to add a field in the postbit to display the users current DKP. I am somewhat of a novice but I have been learning rather quickly. The way my site is set up is that the EQDKP site and the vBulletin forums are separate MYSQL databases.
The way I envision this working is that I create a new User Profile Field through the Admin CP. It is just a string. My users enter their userid from our DKP site into that field. With this string entered into the 'fieldXX' (field6 for my board), I can use that string to index my array and extract the pertinent data to calculate the current DKP. The code below works properly by itself but I don't have enough knowledge to incorporate it into vBulletin. I'm not sure if this is too much of a bother to even worry about or if it would take just a few lines in the right place - any help would be greatly appreciated. Code:
<?php mysql_connect("myserver.net","myusername","mypassword") or die(mysql_error()); mysql_select_db("mydatabase") or die(mysql_error()); // $dkpname is the string that will come from 'fieldXX' which is a user defined profile field to display in the postbit $yourdkpname = mysql_query("SELECT * FROM eqdkp_members WHERE member_name= '$dkpname'") or die(mysql_error()); $data = mysql_fetch_array($yourdkpname); $yourdkp = $data['member_earned'] - $data['member_spent'] + $data['member_adjustment']; // $yourdkp is the current dkp that I want to be displayed in the postbit ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|