PDA

View Full Version : Making a User Rank gain a hex code from User Profile Fields


XotelHotel
12-12-2015, 11:07 AM
Hey,

I'm currently in a situation where I'm about to break my laptop...

I've been trying to make a "Custom VIP" thing for my forum, now since this is fairly new, most sites are unable to help me, because they don't have it. It's mainly just the User Profile Field section that I'm not able to get working, everything else works when I just put a standard hex code into the coding.

<img src="http://www.madhabboforum.com/custom/v2/Special/vip.png" style="background: #$post['field18'];margin-bottom:1px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;">

The bit in red is the bit where its not working....

It's most likely a coding error, if anyone could provide me with the post bit coding, it would be fantastic!

Thanks,

Tom

Dave
12-12-2015, 11:34 AM
In which template are you placing the code?

Dragonsys
12-12-2015, 02:44 PM
you need $userinfo not $post
Also, if this is in a template you need to use vb:raw

<img src="http://www.madhabboforum.com/custom/v2/Special/vip.png" style="background: #{vb:raw userinfo.field18};margin-bottom:1px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;">

RobLeonard
12-13-2015, 09:18 PM
you need $userinfo not $post
Also, if this is in a template you need to use vb:raw

<img src="http://www.madhabboforum.com/custom/v2/Special/vip.png" style="background: #{vb:raw userinfo.field18};margin-bottom:1px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;">

Not for vBulletin 3 you don't?

OP I could implement the Custom VIP script you're on about for a small fee.

ozzy47
12-14-2015, 12:36 AM
If the OP wanted to pay, they would have posted a paid request, not ask the community for help. ;)

Dragonsys
12-14-2015, 01:09 AM
Not for vBulletin 3 you don't?

opps, I didn't notice this was the vb3 board :(

In that case it is $vbulletin->userinfo['field18']

squidsk
12-14-2015, 02:48 PM
you need $userinfo not $post

Depends, $userinfo would be for the person viewing the page, $post would be for the user of each individual post when viewing a thread for example. You wouldn't want the viewers information to be showing for every post, so $userinfo may not be what is being looked for.

Dragonsys
12-14-2015, 03:13 PM
Depends, $userinfo would be for the person viewing the page, $post would be for the user of each individual post when viewing a thread for example. You wouldn't want the viewers information to be showing for every post, so $userinfo may not be what is being looked for.

ok, just ignore me then. I guess it has been too long since I coded for vb3 LOL
I don't recall $post containing user profile info.

andy_mcguire
12-16-2015, 09:57 AM
Anyone? I'm having the same issue on my forum.. Need Profile Field 32 to identify the HEX Code.