![]() |
Registring a variable.
Hello:
I'm trying to register a variable. It will need to check whenever a visitor belong to the poster buddy list, so... PHP Code:
Now, I think I will do something like this: Code:
<vb:if condition="in_array($post[userid], $new_buddylist)"> Thanks. |
The code you posted is both rendering the postbit_legacy template and preRegistering your variable to it. You don't need to do both. I think you probably just need the preRegister part, like:
Code:
$new_buddylist = explode(' ', $bbuserinfo['buddylist']); Then you'd use $my_buddylist in template postbit_legacy. |
Thanks kh99. Then, I do:
Code:
<vb:if condition="in_array($post[userid], $my_buddylist)"> PHP Code:
$new_buddylist is: array(1) { [0]=> string(0) "" } Why? |
Did you check $bbuserinfo['buddylist']? To be honest I can't remember if you can use $bbuserinfo in a plugin, you might have to use $vbulletin->userinfo instead.
|
Quote:
|
All times are GMT. The time now is 08: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:
|