Website Sale Banner

🏷️ This Website is For Sale

Available Now

ℹ️ Reason for Sale: Due to limited availability, I am unable to continue maintaining the site at this time.

đź’° Pricing

$300

Flexible for negotiation

đź’ł Payment Method

PayPal (Friends & Family Only)

Secure transaction required

📦 What's Included

âś… All related files
âś… Complete database
❌ User data excluded
❌ Current theme excluded
❌ Domain excluded
❌ Hosting excluded

XF2 Tutorials User Message Background

JowLix

XenForo Expert

Staff member
LIFETIME ELITE
Coin Coins
22,316
1694075751545.webp


Add to extra.lesstemplate
Less:
.msgBgByName (@msgBgAuthorName; @msgBgUrl; @msgBgSize; @msgBgPosition: false) {
 
  .message[data-author="@{msgBgAuthorName}"] .message-inner {
    background-image: linear-gradient(to top, @xf-contentBg, fade(@xf-contentBg, 60%)), url(@msgBgUrl);
  background-position: @msgBgPosition;
  background-size: @msgBgSize;
}
.message[data-author="@{msgBgAuthorName}"] .message-cell.message-cell--user {
   background: transparent;
}
}
// Example
.msgBgByName (Pepelniy; 'https://i.imgur.com/W1yqxKS.jpg'; cover; left);

First, create a template modification

Template: post_macros
Modification key: messageAuthorId
Find:
HTML:
data-author="{{ $post.User.username ?: $post.username }}"
Replace:
HTML:
$0
data-author-id="{{ $post.User.user_id ?: 0}}"

Then add the code below to extra.less
Less:
.msgBgById (@msgBgAuthorId; @msgBgUrl; @msgBgSize; @msgBgPosition: false) {

.message[data-author-id="@{msgBgAuthorId}"] .message-inner {
background-image: linear-gradient(to top, @xf-contentBg, fade(@xf-contentBg, 60%)), url(@msgBgUrl);
background-position: @msgBgPosition;
background-size: @msgBgSize;
}
.message[data-author-id="@{msgBgAuthorId}"] .message-cell.message-cell--user {
background: transparent;
}
}
// Example
.msgBgById (1; 'https://i.imgur.com/W1yqxKS.jpg'; cover; left);
 
Similar threads Most view View more
Back
Top