PDA

View Full Version : Custom Styles


DJ-Dez
04-19-2013, 12:10 PM
Afternoon vBulletin.

Alright, since my website is built from CSS, I can use this to my advantage. I can put (for example):


#mainheader{
background:<vb:if condition="$vbulletin->userinfo['field24'] "> {vb:raw bbuserinfo.field24}; </vb:if>;
background:-moz-linear-gradient(top,#3f95cb 0,#62b8ee 100%);
background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#3d94c9),color-stop(100%,#61b8ee));
background:-webkit-linear-gradient(top,#3f95cb 0,#62b8ee 100%);
background:-o-linear-gradient(top,#3f95cb 0,#62b8ee 100%);
background:-ms-linear-gradient(top,#3f95cb 0,#62b8ee 100%);
}


As you can see i've put:


background:<vb:if condition="$vbulletin->userinfo['field24'] "> {vb:raw bbuserinfo.field24}; </vb:if>;


All simple so far - it's taking it from my custom profile field 24.

However, I've done it with 2 users, but they'll always see my colour, even though they'll change their colour in the custom profile field.

I need something to define each is their own or something? Because it's no working, even with their custom profile field 24 updated with a different hex, they always see my colour.

Can somebody point me in the right direction.

Thank you.

Scanu
04-21-2013, 07:49 AM
Where are you doing this? {vb:raw userinfo.field24} is the field of the user that is viewing the page if you are in a post you should use {vb:raw post.field24} that is the field of the user in the post

DJ-Dez
06-09-2013, 10:18 PM
any other ideas guys?

and scanu - we're using it so people can input their own codes into vb4's css, just wondering how we can do it so the css takes it from a field, or another way.