Profile background

26 May
#1
Hey. How can I add a profile background to Hovercards?
I tried to add something to the templates:
<style>
.tlo_profil {
background-image: url({$userfields['fidX']}), url(X); background-size: cover; background-repeat: no-repeat; background-position-y: -250px;
}
</style>
But nothing is displayed.
Shade 26 May
#2
Hovercards' syntax for custom profile fields is {fidX}, not {$userfields['fidX']}.
Roughster 26 May
#3
Still not displaying.
Shade 26 May
#4
Did you add the code to hovercards_template? I will need your board to see what are you trying to do.
Roughster 26 May
#5
Yes, please priv.
@Roughster

You can use {$mybb->user['fidX']} in hovercards and in other templates to display custom profile field information.
Shade 27 May
#7
@Roughster

You can use {$mybb->user['fidX']} in hovercards and in other templates to display custom profile field information.
Hüseyin Filiz (27 May)
This won't work in Hovercards' template.
Hüseyin Filiz 27 May Edited
#8
hovercards_template in;
{$mybb->user['fid1']}

It works for me.

PS: fid1 is my location.

<div>
    <img class="avatar" src="{avatar}" />
    <div class="username">
        {username}
    </div>
    <div>
        <span class="lastactive {lastactive}">{lastactive}</span>
        <span class="regdate">{$mybb->user['fid1']}</span>
    </div>
</div>
My test board screenshot: https://prnt.sc/sop63j

Note: Custom Profile Fields » Field » Display on postbit? » YES
Shade 27 May
#9
That's not the user's profile field, but the one associated with your currently logged in account. If you log out, you can see it's no longer displayed.

To display each user's CPF you will need to use {fidX} instead.
https://prnt.sc/soqotf

I'm sorry to misunderstand. I add {fid1} in hovercards_template and just display. Mean, like normal text. Please see my ss.

And if u need a test, i created a admin account for you in my test board forum. i send u pm.