Resource icon

User Message Background

prisnilos

Active member
Pepelniy submitted a new resource:

User Message Background - Set the message background for a specific user

Add to extra.less

Less:
.message-background (@mbUserName; @mbBackgroundUrl; @mbBackground-size; @mbBackground-position: false) {
 
  .message[data-author="@{mbUserName}"] .message-inner {
    background-image: linear-gradient(to top, @xf-contentBg, fade(@xf-contentBg, 60%)), @mbBackgroundUrl;
  background-position: @mbBackground-position;
  background-size: @mbBackground-size;
}
.message[data-author="@{mbUserName}"] .message-cell.message-cell--user {
   background...

Read more about this resource...
 
I assume this is a not feature individual members may set or modify, on their own, within their own account preferences area?
 
For some reason I was unable to get this to work.

The only modification is to the extra.less ... And only part of snippet needing changes is the members name correct?
 
For some reason I was unable to get this to work.

The only modification is to the extra.less ... And only part of snippet needing changes is the members name correct?
The code does not need to be changed, you only need to add the same line as in the example for each user. And there you already need to specify their nicknames, links to backgrounds, background sizes and their positions.
 
Hi Pepelniy, This is such a nice little code, but you may try to get user via userID instead of userName, as someone may face trouble or code not working issue, if a user name have special characters in his username like Mr. Smart (dot in user name) or something like that.
 
Hi Pepelniy, This is such a nice little code, but you may try to get user via userID instead of userName, as someone may face trouble or code not working issue, if a user name have special characters in his username like Mr. Smart (dot in user name) or something like that.
Hi, I’ll see what can be done when there is time.
 
is it possible to apply globally or per usergroup? per every user seems a nice option but a little impractical, not sure if im understanding correctly...
No, these are individual backgrounds for each user. I do not see much point in making the same backgrounds for user groups. And with individual backgrounds it is better not to overdo it, as it will turn out some kind of bad taste.
 
No, these are individual backgrounds for each user. I do not see much point in making the same backgrounds for user groups. And with individual backgrounds it is better not to overdo it, as it will turn out some kind of bad taste.

my idea was something like a watermarked looking piece of paper as BG...just to add a simple style for the whole site...but for certain user groups they could have a group themed one i thought...

so when you get a private message, its on a themed paper/letterhead signifying the senders group position...
 
Back
Top Bottom