The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Cannot get username
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: Code:
$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>'; } How can get the username? |
#2
|
|||
|
|||
Try including..
Code:
global $vbulletin; |
#3
|
|||
|
|||
Thanks now work
--------------- Added [DATE]1310732424[/DATE] at [TIME]1310732424[/TIME] --------------- Yes now work but $name return my username, not the username of author of thread. How can get the username of author of thread? --------------- Added [DATE]1310734332[/DATE] at [TIME]1310734332[/TIME] --------------- OK, I have solved using varible $post[userid] |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|