vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Making a User Rank gain a hex code from User Profile Fields (https://vborg.vbsupport.ru/showthread.php?t=321057)

XotelHotel 12-12-2015 11:07 AM

Making a User Rank gain a hex code from User Profile Fields
 
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

HTML Code:

<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

Quote:

Originally Posted by Dragonsys (Post 2560278)
you need $userinfo not $post
Also, if this is in a template you need to use vb:raw

HTML Code:

<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

Quote:

Originally Posted by RobLeonard (Post 2560363)
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

Quote:

Originally Posted by Dragonsys (Post 2560278)
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

Quote:

Originally Posted by squidsk (Post 2560392)
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.


All times are GMT. The time now is 06:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01577 seconds
  • Memory Usage 1,732KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete