![]() |
Usergroup mark-up based off of userfield
Hi guys,
Basically, I have a VIP usergroup (who all have the same permissions) and I want to be able to allow them to change their username colour by specifying a hex value (from a drop-down list) in their profile. The only way I can think of doing this is by grabbing the field, then sending it to the fetch_musername hook and setting a custom $user['musername'] style. I don't think the fetch_musername hook allows me to use the $post['fieldX'] variable globally across the forum, so I'm going to have to grab the field value (probably from fetch_userinfo) and send it to that hook. Does anyone have any ideas on how I can accomplish this? Thanks in advance. --------------- Added [DATE]1276992160[/DATE] at [TIME]1276992160[/TIME] --------------- Can anyone assist with this? |
I've tried fetching the contents of the $post['fieldX'] variable and putting that directly into a plugin, but that has failed.
|
Does nobody have any idea on how to do this? I've tried all sorts!
|
I think the hook would allow you to use the variable, however, did you look at the function? The $post variable, or whatever it is called when passed to the function, is called $user in the function. So, you would need to call it $user['fieldx'] in your plugin.
|
Hi Lynne,
I greatly appreciate the reply! I have this code on the fetch_musername hook: PHP Code:
|
James, go read the function. $bbuserinfo is nowhere in there. Not only that, in php, it would be $vbulletin->userinfo, not $bbuserinfo. But, as I said, the variable there is called $user.
|
Thanks Lynne, I've managed to get this to work now.
|
All times are GMT. The time now is 12:08 PM. |
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:
|