Welcome to Admin Junkies, Guest — join our community!

Register or log in to explore all our content and services for free on Admin Junkies.

POSTBIT BACKGROUND CUSTOM FIELDS TUTORIAL

cloug

Addicted member
Joined
May 2, 2020
Messages
652
Credits
0
  1. Make a custom user field
  2. Title Postbit Cover or Anything you want
  3. Field ID can be anything i suggest no space on it (I use same CSS Class name [.profilebackground])
  4. Description : JPG, PNG, GIF (Link of the Image)
  5. Display Location : Personal Details
  6. Field Type: Single Line text Box
  7. General Option: User editable, Moderator Editable
  8. Go to Admin Panel > Appearance > Templates > Search messages_macros and paste the code,

Code:
<xf:if is="$user.Profile.custom_fields.profilebackground">
? ? ? ? <div class="profilebackground" style="background-image: linear-gradient(180deg, #fff0, #141414), url({$user.Profile.custom_fields.profilebackground});"></div>
? ? </xf:if>


after this,


Code:
<xf:macro name="user_info"
? ? arg-user="!"
? ? arg-threadUserId=""
? ? arg-fallbackName="">

Final result:


Code:
<xf:macro name="user_info"
? ? arg-user="!"
? ? arg-threadUserId=""
? ? arg-fallbackName="">
? ? <xf:if is="$user.Profile.custom_fields.profilebackground">
? ? ? ? <div class="profilebackground" style="background-image: linear-gradient(180deg, #fff0, #141414), url({$user.Profile.custom_fields.profilebackground});"></div>
? ? </xf:if>

Find this,

Code:
<section itemscope itemtype="https://schema.org/Person" class="message-user">

and add this as inline,


Code:
style="position: relative;"

Final result:

[align=left]
Code:
<section itemscope itemtype="https://schema.org/Person" class="message-user"
????????????style="position: relative;" >
Code:
.profilebackground {
? ? opacity: .50;
? ? position: absolute;
????border-radius: 4px 0px 0px 0px;
? ? top: 0;
? ? bottom: 0;
? ? left: 0;
? ? right: 0;
? ? width: auto;
? ? height: auto;
? ? background-position: center;
? ? background-size: cover !important;
}
@media (max-width: 650px) {
.profilebackground {
? ? height: 60px !important;
}
 
Advertisement Placeholder
Thanks for sharing this. I'm going to have a proper look later on and maybe add it to my forum :)
 
This is a very detailed tutorial that you have provided here and i especially like that you have provided the code as well because i think that this way you can actually edit it as needed.
 

Log in or register to unlock full forum benefits!

Log in or register to unlock full forum benefits!

Register

Register on Admin Junkies completely free.

Register now
Log in

If you have an account, please log in

Log in
Who read this thread (Total readers: 0)
No registered users viewing this thread.

Would You Rather #9

  • Start a forum in a popular but highly competitive niche

    Votes: 9 27.3%
  • Initiate a forum within a limited-known niche with zero competition

    Votes: 24 72.7%
Win this space by entering the Website of The Month Contest

Theme editor

Theme customizations

Graphic Backgrounds

Granite Backgrounds