The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
Google Chrome gets correct results, but FF and IE do not? (User Set Username Color)
RESOLVED
Hey guys, thanks for checking out my thread, I don't really know if this part is considered coding, but here I go... This is from the memberaction_dropdown template; the goal is to have VIP member's usernames to show up as a custom color that they set. I realize I could concatenate the VIP and Field check in the example below, but I didn't to break things up more clearly. The issue is that on Firefox & IE $memberinfo['field7'] is showing up as empty, but on Google Chrome it works fine. Modified Snippet From memberaction_dropdown template: HTML Code:
<vb:if condition="$memberinfo['musername']"> //If the user is VIP <vb:if condition="is_member_of($memberinfo,17)"> //And the user has a custom color set <vb:if condition="$memberinfo['field7']"> //Display the user's name in the color they want <span style="color: {vb:raw memberinfo.field7};">{vb:raw memberinfo.username}</span> //If the VIP member doesn't have a custom color <vb:else /> //Display the regular color for that member group (VIP) {vb:raw memberinfo.musername} </vb:if> //If the member isn't a VIP then display the regular color set for that member group <vb:else /> {vb:raw memberinfo.musername} </vb:if> //It never gets here, but just display the username if it does <vb:else /> {vb:raw memberinfo.username} </vb:if> HTML Code:
<vb:if condition="$memberinfo['musername']"> {vb:raw memberinfo.musername} <vb:else /> {vb:raw memberinfo.username} </vb:if> Obviously I don't use the comments in the template like that, those are just there for you guys. At one point I had said "++++ it, I'm just going to edit the musername part in functions.php," but that didn't work either. The same issue happened. It's like when I try to check if they're part of the VIP usergroup (#17) it breaks field7, otherwise it works fine (but then it's applied to everyone instead of just VIPs). Here's the changes I made to functions.php later. Modified Snippet From functions.php: PHP Code:
PHP Code:
http://darklandservers.com/showthrea...6177#post36177 His name should show up white if it's working, and blue if it's not (the default VIP color). You can test it in Chrome and Firefox and see what I'm talking about, I've already had other people test it. Honestly, I'm really disappointed in myself for not being able to get this to work out. Asking for help was the last thing I wanted to do, but I've set my (coder's) pride aside for now because I've been pulling my hair out for too long trying to get this to work. I'm going on vacation today and won't be able to work on it for another 3 or 4 days so I'm trying to get this resolved now rather than later. Big thanks to anyone who can help. /rage What really makes me angry is that I know that this should be easy. I mean, just the concept is so basic. Maybe if I get some sleep this will be easier. I think it would make my day if it turned out not to be me just being stupid, but I have a feeling that's not the case. --------------- Added [DATE]1293505911[/DATE] at [TIME]1293505911[/TIME] --------------- Nevermind. It appears as though only people in my forum moderator group can see the name's properly. I'm trying to find out what permissions they might have that would do that. --------------- Added [DATE]1293513494[/DATE] at [TIME]1293513494[/TIME] --------------- Got it, because the field was private it wouldn't let the regular members get anything. When I was testing on Google Chrome I was using a moderator account. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|