Dec 4, 2016 21:04:50 GMT -5
Hello,
I'm wondering how this theme and Elli's breathe theme has a profile banner. Is it possible for it to be added to the normal proboards layout?
I'm around and round we go
Moderator
Dec 5, 2016 0:43:10 GMT -5
(I moved this to general proboards board since the code board is just for submitting final codes)
First you have to add the Custom Profile Field, and set it to a URL (plain text) text field.
Once you get that working, it's just a matter of editing the layout template to show the URL as a background graphic.
This is current what I use on here, you'll have to switch "profile_graphic" with your custom profile field name.
<div class="cover"
{foreach $[user.custom_field]}
{if $[user.custom_field.name] == "profile_graphic"}
style="background-image: url('$[user.custom_field.value]');"
{/foreach}>
</div>
Depending on how your profile is set up, you'll want to add CSS to the .cover class or place this in a particular spot to achieve a certain look.
Let me know if you have any questions!
Dec 5, 2016 17:15:43 GMT -5
Alright, I added this to the layout and created a profile field named Banner and put it under the username header...
i.imgur.com/icaVVhd.pngBut when I fill in the banner, I don't see anything:
i.imgur.com/xtwOjsOl.png
Dec 6, 2016 1:35:59 GMT -5
Don't forget the CSS. For example, if you don't give the container a height, it will appear to be not there.
I'm around and round we go
Moderator
Dec 6, 2016 19:26:54 GMT -5
@trinityblair is correct!
Forgot to give you the CSS, this should get something to show up and you will have to customize it how you like:
.cover {
background-size: cover;
background-position: center;
background-repeat: repeat-x;
height: 300px;
width: 100%;
}