The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Postbit Variables
Hello,
Where do I need to define a variable in VB so it will show up in the postbit? I would like a variable defined in PHP to show up in the postbit and have been unsuccessful in figuring it out. Thanks, -mc |
#2
|
||||
|
||||
Use $GLOBALS[varname] where for a variable like $varname
|
#3
|
|||
|
|||
What file should that be used in? Would showthread be sufficient?
Instead of defining $varname, I would define $GLOBALS[varname]? Thanks, -mc |
#4
|
||||
|
||||
Put $GLOBALS[varname] inside the postbit template where you want the variables contents to appear. $GLOBALS[varname] will contain the same content as $varname.
So if you have: PHP Code:
HTML Code:
$GLOBALS[myvar] |
#5
|
|||
|
|||
Thanks!
Is it possible to have the posts username in functions_showthread? Im trying to show a users pointtotal in their postbit. This is what I have in functions_showthread. $query=$DB_site->query("SELECT points FROM dev_user WHERE username='$post[musername]';"); while($result=$DB_site->fetch_array($query)) { $pointtotal = $result["points"]; } Trying to run the query based on their username. It does not work. Is their a way to make it work this way or is there another way? Thanks, -mc |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|