Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-12-2015, 11:07 AM
XotelHotel XotelHotel is offline
 
Join Date: Oct 2015
Location: Nailsea
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 12-12-2015, 11:34 AM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In which template are you placing the code?
Reply With Quote
  #3  
Old 12-12-2015, 02:44 PM
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Location: DFW, Texas
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;">
Reply With Quote
2 благодарности(ей) от:
Lynne, MarkFL
  #4  
Old 12-13-2015, 09:18 PM
RobLeonard's Avatar
RobLeonard RobLeonard is offline
 
Join Date: Oct 2014
Location: London, England
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dragonsys View Post
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.
Reply With Quote
  #5  
Old 12-14-2015, 12:36 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If the OP wanted to pay, they would have posted a paid request, not ask the community for help.
Reply With Quote
2 благодарности(ей) от:
Dragonsys, MarkFL
  #6  
Old 12-14-2015, 01:09 AM
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Location: DFW, Texas
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RobLeonard View Post
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']
Reply With Quote
  #7  
Old 12-14-2015, 02:48 PM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dragonsys View Post
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.
Reply With Quote
  #8  
Old 12-14-2015, 03:13 PM
Dragonsys's Avatar
Dragonsys Dragonsys is offline
 
Join Date: Jan 2008
Location: DFW, Texas
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by squidsk View 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.
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.
Reply With Quote
  #9  
Old 12-16-2015, 09:57 AM
andy_mcguire andy_mcguire is offline
 
Join Date: Jan 2010
Location: Australia
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone? I'm having the same issue on my forum.. Need Profile Field 32 to identify the HEX Code.
Reply With Quote
Благодарность от:
XotelHotel
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14041 seconds
  • Memory Usage 2,255KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (5)post_thanks_box_bit
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete