www.chinaphonearena.com

Full Version: How to use @member with correct colour?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

If first post or ----full edit---mode there is the @ symbol

hover shows it means mention

@"mirandam"

syntax put in code box
Code:
@"mirandam"

first syntax displays as black @ blue membername

Question
######
How do I display it as green @ green membername if member is donator?

cheers
@aus9 , not putting any quotes around the username
Code:
@aus9

will give the following color scheme:

contributor -> lightblue,
donator -> green,
mod -> red
junior member -> brown

Examples:
@wisdom
@Louis777
@Wuddawaste
@bubu

One thing I noticed is that when I use my own username @mirandam , this scheme doesn't apply, it shows in lightblue.

From what I've read in the mybb documentation using the @ with quotes is only needed when you use a "complex" username ( @"whateverthatmeans" which is non-existant and thus not colored.)

The way this functions should be equal to bbcodes
Code:
[mention]username[/mention]
but mybb doesn't do this bbcode.
@mirandam
@aus9

Code:
@mirandam

@aus9

ahh maybe there is something going on with your setup?

As you know I tried to show your membername in green and could not understand why I could not get green.

a separate test for Athos
@Athos

#############
sorry for not thinking of this test in my prevous post in the intro area.

Maybe we should delete it?

#############

EDIT

NO there is something else happening

I hover my name and I show as offline
the grey humoid versus a darker humoid?
No, it's ok.

It has nothing to do with my setup. I'll explain better:

When you use the @withyourusername while logged in, you always get your username in blue, doesn't matter if you are a donator or not.

When using a @differentusername , the color scheme as I posted applies.

That's why now in your last post I see my name in blue and yours in green, while you probably see the reverse.

The same color scheme is used in the left most column "Latest threads" (and other forum columns to be precise), there my username indeed is green, like yours.
then maybe there is something wrong with both setups?

I am logged in and yet I am in green not quite what you explained
Maybe it's because you are an elite contributor? Don't know.....

I am at this moment looking into the mybb source to see if I can find the exact explanation for this, it will take some time though, mybb is different from phpbb so I need to adjust a little.

At this point I can confirm some facts:

1. it is not online dependent. Doesn't matter whether you're logged-in or not, resulting colours are same.
2. it is browser or system dependent. A quick test on android's dolphin browser gave completely different results.
Later on I will attach a screen-shot.
3. source code shows colour is user-name, user-group and display-group dependent. I'm working on this one.

Please ignore the folloring, just a little test:

@mirandam
@mirandam
@aus9
@aus9

(2014-09-29, 14:09)aus9 Wrote: [ -> ]...
EDIT

NO there is something else happening

I hover my name and I show as offline
the grey humoid versus a darker humoid?

Oops, sorry if I missed your edit. I did indeed see that in the screenshot you posted and I wondered about that having any influence. Did you set your online status to hidden at the time of registration (correct me if I'm wrong but I think this was possible only during the initial profile setup)?
Indeed when I'm online I do have a blueish humoid indicating my online status and I've never seen yours (don't get me wrong on that one Big Grin )...

Anyway it doesn't seem to matter, I did a test on different browser ( IE8 ) where I wasn't logged-in, and it shows the same colours. See this image:
[attachment=1893]

As far as I can see for now, is that it depends on the primary group you belong to. This group is called the displaygroup because it is the one shown in each of your posts, in our case CPA Donator.
I'm not a member of any other groups but I don't know if this is your case too. Check in your profile the groupmemberships. It could be of influence since the colour attribute of the @mention depends on user, usergroup and displaygroup.

Another thing I just found out is that in your profile if you go to edit options, indeed you can change your online status indicator.
On the same page are also these options:
[attachment=1894]
Maybe yours are different?

B.t.w. elite contributor has no influence, these are rewards and do not appear in this section of the source code.

Just found the affirmative information in the source code of mybb.
The exact style of the username shown in the @username is directly dependent on the primary usergroup, the displaygroup of said user. This dispaygroup has preference over other usergroups a user maybe member of.
The function in question is the format_name function which is a general function used in various places, including all posts and the various columns we see around our screen.

This style is defined in the configuration of the forum and includes font, colour and text attributes, defined by the admin of the forum. These maybe theme related, I would have to dig further to confirm that, but seems pointless at this moment.
And from what I've seen, CPA seems to use the DVZ_mentions plugin.

@aus9

I can only explain the difference between us for one reason (if the profile options I mentioned are of no influence), and that would be a difference in browser compatibility, quite possibly due to different html format interpretation.
I've seen those things happen on my own forum and even though there are tricks and workarounds to achieve a close to perfect compatibility, it's difficult to encompass all browsers.
One of the most frequent problems is due to use of tables where different browsers use a different order to apply formatting rules. For example one might place a colour attribute to a link inside a table cell. That attribute might well be ignored or overruled by a cell format attribute or even a row or overall table one, not to speak of CSS style attribute prevalence.
As I am writing this I am inspecting elements on the same page and I can confirm the use of tables within the postings of this page, so it seems I'm not too far off with the above.
I am using the blackhawk browser which is chrome based, I don't know which one you use, but I will be checking other ones when I have some time left. My IE8 showed the exact same colouring, but possibly FF or Opera gives different results. I'll let you know.
OOPS I forgot to check what my online status profile was before posting
silly me....I had it hidden...now fixed and email fixed

2) I rarely visit forum on Android so use Linux PC , firefox web browser.

On Android I prefer CM browser which is tiny (ish)
not an opportunity for any jokes here either....giggles

3) in profile I am on defaults ...default thread/style and language

user cp -> group membership
top box for group I can join = CPA member
bottom box...I belong....Donator group
which is my display group

its still a puzzlement.

maybe its because I use a Linux PC which makes me special?
(2014-09-29, 21:59)aus9 Wrote: [ -> ]OOPS I forgot to check what my online status profile was before posting
silly me....I had it hidden...now fixed and email fixed
yes, I see you're in here now Cool

(2014-09-29, 21:59)aus9 Wrote: [ -> ]...
3) in profile I am on defaults ...default thread/style and language

user cp -> group membership
top box for group I can join = CPA member
bottom box...I belong....Donator group
which is my display group

its still a puzzlement.
so am I, no differences here.


(2014-09-29, 21:59)aus9 Wrote: [ -> ]...
maybe its because I use a Linux PC which makes me special?
ausies are always special.... Tongue
Hang on a sec, I'm going to have a look at my dlna server (ubuntu + ff) to see if this is happening too.... nope, displays the exact same as on my pc. Very confusing indeed.