![]() |
Plugin on fetch_musername
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 :( |
$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.
|
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. |
$bbuserinfo['filedX'] should pull the profile field X for that user.
|
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. :( |
Sorry, I didn't see you tried $bbuserinfo first. :( I wish there was a list of variables and where they are available someplace.
|
Yeah, the debug mode should list the variables being called on that page.
|
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. |
Which username on a page like for example forumdisplay would not show?
|
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! |
All times are GMT. The time now is 11:57 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:
|