![]() |
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 |
Use $GLOBALS[varname] where for a variable like $varname
|
What file should that be used in? Would showthread be sufficient?
Instead of defining $varname, I would define $GLOBALS[varname]? Thanks, -mc |
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] |
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 |
All times are GMT. The time now is 11:12 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|