The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I created a user profile field and want to use it in the FORUMHOME template.
To show it in the postbit I used $post[field6] and it works. But if I use this in the FORUMHOME template, it doesn't work. I know I'm missing something here. Can someone help me with this? |
#2
|
||||
|
||||
![]()
Try
PHP Code:
|
#3
|
||||
|
||||
![]()
nope, that didn't work.
|
#4
|
|||
|
|||
![]()
<font face="Courier New">$bbuserinfo['field6']</font>
|
#5
|
||||
|
||||
![]()
this shows only the info for the logged in user. but i want to work i a slightly different way.
in the who's online list i want to show the field6 of each loggedin user against their username. |
#6
|
||||
|
||||
![]()
anyone?
|
#7
|
|||
|
|||
![]()
You'd have to write a plugin then since I don't think userfields are fetched in the "Whats Going On" but. If you know the PHP side of vBulletin then you'd need to find the correct hook location (the one inside the user display loop) and use $userinfo = fetch_userinfo($userid) to fetch the info for the specified user. Then use $userinfo['field6'] to access the data.
|
#8
|
||||
|
||||
![]()
well, unfortunately i am not that good at PHP. so could you elaborate further?
Thanks |
#9
|
|||
|
|||
![]()
Add a new plugin
With hook location forumhome_loggedinuser PHP Code:
Add $online_userinfo[field6] to the end of it. Don't know if that is the most efficient way to do it, but it works. Hopefully ![]() |
#10
|
||||
|
||||
![]()
thanks a lot Opserty. it worked.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|