LjTiger69
07-15-2011, 10:45 AM
Hello, I'am new in VB4.
I try to create a plugin that add a field in postbit for showing a score from a game. This field is stored in a custom table in db.
This is code for plugin:
$name = $vbulletin->userinfo['username'];
$sql = "SELECT * FROM record WHERE Nome='$name'";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
if ($row[Record])
{
$template_hook['postbit_userinfo_right_after_posts'] .= '<dt>Score</dt> <dd>' .$row[Record]. '</dd>';
}
Problem is that $name return ""
How can get the username?
I try to create a plugin that add a field in postbit for showing a score from a game. This field is stored in a custom table in db.
This is code for plugin:
$name = $vbulletin->userinfo['username'];
$sql = "SELECT * FROM record WHERE Nome='$name'";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
if ($row[Record])
{
$template_hook['postbit_userinfo_right_after_posts'] .= '<dt>Score</dt> <dd>' .$row[Record]. '</dd>';
}
Problem is that $name return ""
How can get the username?