The problem I'm having is that users are being shown in a different colour than the one they've selected.
The usergroup cache update is because all of the users are in usergroup 9, so I figured if I set the musername
and update the usergroup tags it's a foolproof way to go about it.
--------------- Added [DATE]1341483055[/DATE] at [TIME]1341483055[/TIME] ---------------
OK I've established that my code is fine - and the other plugins are causing the issue.
I have a question though:
Another plugin is calling the fetch_musername function to generate the markup username, using this code:
PHP Code:
if($thread['post_user_displaygid']!=0)
{
$thread['postusername'] = fetch_musername($thread, 'post_user_displaygid', 'postusername');
}
else
{
$thread['postusername'] = fetch_musername($thread, 'post_user_usergid', 'postusername');
}
As you can see, it's calling the fetch_musername hook, on the threadbit_process hook. Now, this doesn't seem to be calling the mark-up username via my hook, almost as if it's being processed before the hook code is being called.
Anyone have any ideas?
--------------- Added [DATE]1341484926[/DATE] at [TIME]1341484926[/TIME] ---------------
After further playing, it seems the $vbulletin->usergroupcache["9"][opentag] & [closetag] aren't being overwritten in the array via my above code.