MyBB Community Forums

Full Version: Profile Background Default Image
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
https://community.mybb.com/thread-159715.html

Thought I'd make this tutorial or shall I say share it since I've figured how to do this and didn't think it was possible but everything is possible lol. Toungue

Anyways if you're using that tutorial above and would like to know how to set a background default image in profile cover well this is how you would do it. Remember these are my codes I'm sharing feel free to edit it to your likings.

<if $userfields['fid4'] then>
<style>
.profbg {
    background: url({$userfields['fid4']}) center center no-repeat #292929;
    overflow: hidden;
    background-position: center center;
    background-size: cover !important;
    background-repeat: no-repeat;
	border-radius: 2px;
}
</style>
<else>
<style>
.profbg {
    background-image: url(Paste your default image link here) !important;
    overflow: hidden;
    background-position: center center;
    background-size: cover !important;
    background-repeat: no-repeat;
	border-radius: 2px;
}
</style>
</if>

Pretty simple and easy. Big Grin
Enjoy!
Hey man, this was really helpful for me. Thank you for sharing.
(2018-05-13, 08:15 PM)Livewire Wrote: [ -> ]https://community.mybb.com/thread-159715.html

Thought I'd make this tutorial or shall I say share it since I've figured how to do this and didn't think it was possible but everything is possible lol. Toungue

Anyways if you're using that tutorial above and would like to know how to set a background default image in profile cover well this is how you would do it. Remember these are my codes I'm sharing feel free to edit it to your likings.

<if $userfields['fid4'] then>
<style>
.profbg {
    background: url({$userfields['fid4']}) center center no-repeat #292929;
    overflow: hidden;
    background-position: center center;
    background-size: cover !important;
    background-repeat: no-repeat;
	border-radius: 2px;
}
</style>
<else>
<style>
.profbg {
    background-image: url(Paste your default image link here) !important;
    overflow: hidden;
    background-position: center center;
    background-size: cover !important;
    background-repeat: no-repeat;
	border-radius: 2px;
}
</style>
</if>

Pretty simple and easy. Big Grin
Enjoy!
where should i put this code ?