The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
User rank code stopped working
Some of our code has stopped working out of the blue, I'm wondering if a syntax change has been made or something?
Hook: member_complete Code:
if ($userinfo['usergroupid'] == '42') { $prepared_bypass = $vbulletin->db->query_first("SELECT field54 FROM userfield WHERE userid='" . $userinfo[userid] . "'"); if ($prepared_bypass['field54'] == 'grey') { $prepared['rank'] = '<img src="/forums/images/elite_user_ranks/userbar-elite-grey.png" alt="NextGenUpdate Elite Member" border="0" />'; } if ($prepared_bypass['field54'] == 'red') { $prepared['rank'] = '<img src="/forums/images/elite_user_ranks/userbar-elite-red.png" alt="NextGenUpdate Elite Member" border="0" />'; } } |
#2
|
|||
|
|||
Can anyone help?
|
#3
|
||||
|
||||
You should not have to run a query since $userinfo will have all the users data.
The code below will work fine PHP Code:
the code you have works on my forum "vb 4.2.2 pl 1" but use my code you don't need the query --------------- Added [DATE]1397778920[/DATE] at [TIME]1397778920[/TIME] --------------- if they are in multiply usergroups i would use this PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|