The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I have a plugin running on the fetch_musername hook that changes the username mark-up depending on a selection in their profile.
The plugin is: PHP Code:
Has anyone got any ideas how to fix this? I'd take a guess that it's because I'm using the $user variable, that isn't globally available... so perhaps I would have to change the conditional too... Would I have to declare the $post['fieldX'] and $bbuserinfo['fieldX'] in there too? EDIT: I tried this code too, and it failed to work: PHP Code:
Bump. Sorry guys, this is something I've been looking at for ages and I can't debug it
|
|
#2
|
||||
|
||||
|
$bbuserinfo is global so it should work anywhere... My guess is in the locations it's not working is because the hook isn't called.
|
|
#3
|
|||
|
|||
|
I've got debug mode on and the hook is called on Forumdisplay and on visitor messages and there's still no change.
I can't use bbuserinfo in the condition because I need to use $user to grab the profile field. |
|
#4
|
||||
|
||||
|
$bbuserinfo['filedX'] should pull the profile field X for that user.
|
|
#5
|
|||
|
|||
|
I removed the conditional, leaving my code as:
PHP Code:
If the $bbuserinfo variable worked, it should work on the switch, yet it doesn't.
|
|
#6
|
||||
|
||||
|
Sorry, I didn't see you tried $bbuserinfo first.
I wish there was a list of variables and where they are available someplace.
|
|
#7
|
|||
|
|||
|
Yeah, the debug mode should list the variables being called on that page.
|
|
#8
|
|||
|
|||
|
Bump (again).
I'm baffled by this one, can anyone else share an insight. The hook is being called on all of the pages that I require. |
|
#9
|
|||
|
|||
|
Which username on a page like for example forumdisplay would not show?
|
|
#10
|
|||
|
|||
|
The username of the user who filled the condition ($user['displaygroupid'] == 40).
I thought I had covered all options by using $post, $user, $bbuserinfo - apparently not! |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|