The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I created a custom profile field with the ID 44 and entered a string in that field for my account.
Then I wrote a simple "hello world" plugin that looks like this: PHP Code:
The first echo is executed on the member profile, the other echo is not executed. How can I fix this? Or do I have to write a query to get the profile field in the plugin? $post['field44'] does not work and neither does $userinfo['field44'] on that plugin. Later, I want to write a conditional and display some variables in the templates. But I first need to know how to access the custom profile field from the member profile plugin. |
#2
|
|||
|
|||
![]()
You shouldn't echo directly to the browser. Place the variable in a template.
For the browsing user $bbuserinfo[field44] should work. For the member who's profile you are browsing you may need to use $prepared[field44] or $userinfo[field44] |
#3
|
|||
|
|||
![]()
Doesn't matter if I echo it directly or use it in a template. It's for testing purposes only.
As I said, once I see that the variable is not empty, I will use it for a condition in the plugin. $bbuserinfo[field44] does not work in the plugin. ![]() --------------- Added [DATE]1216494701[/DATE] at [TIME]1216494701[/TIME] --------------- Take for example this plugin code: PHP Code:
|
#4
|
|||
|
|||
![]()
Oh wait, plugin...
My bad I forgot. Try $vbulletin->userinfo instead of $bbuserinfo. Use var_dump() instead of echo() it provides more info. |
#5
|
|||
|
|||
![]()
Thanks, man. That worked.
![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|