Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)

Reply
 
Thread Tools Display Modes
  #11  
Old 03-06-2012, 04:03 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try using $user['field7'] instead of $vbulletin->userinfo['field7'].
Reply With Quote
Благодарность от:
sadiq6210
  #12  
Old 03-07-2012, 12:03 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

kh99 to the rescue... Oversight on my part!

PHP Code:
global $vbulletin;

if (
$user['field7'] == "GIRL")
{
     
$user['musername'] = '<span style="color:pink;">' $user['username'] . '</span>';
}

else
{
     
$user['musername'] = '<span style="color:blue;">' $user['username'] . '</span>';

I would have noticed but the thread I tested it in only had one post (mine.)
Reply With Quote
  #13  
Old 03-07-2012, 12:20 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I knew you'd figure it out too when you saw the output - I probably should have left it for you to deal with, but it was a slow day...
Reply With Quote
  #14  
Old 03-07-2012, 02:50 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
I knew you'd figure it out too when you saw the output - I probably should have left it for you to deal with, but it was a slow day...
I never turn down a helping hand... I've been busy mod writing all day. Lines of code are blurring together right now. :erm:
Reply With Quote
  #15  
Old 03-07-2012, 11:02 AM
sadiq6210 sadiq6210 is offline
 
Join Date: Sep 2005
Posts: 684
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

kh99 & BirdOPrey5
Thank you very much for your effort, I appreciate

I noticed that the code is working perfect in postbit (showthread.php pages) but it is not working in online users or forumhome or forumdisplay !

In ( (online users ) all users in blue color
In ( (showthread.php ) it is working perfect (Blue + Pink)

Okay I will change it only in postbit but how can I make the change only in postbit so the color will not change to all blue in other pages?
Reply With Quote
  #16  
Old 03-07-2012, 04:37 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To work only in showthread...

PHP Code:
global $vbulletin;

if (
THIS_SCRIPT == 'showthread')
{
  if (
$user['field12'] == "GIRL")
  {
     
$user['musername'] = '<span style="color:pink;">' $user['username'] . '</span>'
  }
  else
  {
     
$user['musername'] = '<span style="color:blue;">' $user['username'] . '</span>';
  }

If it's not working in whoslonline I'm guessing it needs extra info added to the query, that will be a little bit tougher.
Reply With Quote
  #17  
Old 03-08-2012, 02:40 PM
sadiq6210 sadiq6210 is offline
 
Join Date: Sep 2005
Posts: 684
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This code working perfect in showthread. Thanks dear

last question and sorry to take that much from your time

I want this code working only with member group (group==2)
Because I have moderator with (red color) and I don't want to change their color to blue or pink.
Reply With Quote
  #18  
Old 03-08-2012, 02:48 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just for usergroup 2...

PHP Code:
global $vbulletin;

if (
THIS_SCRIPT == 'showthread' AND is_member_of ($user2))
{
  if (
$user['field12'] == "GIRL")
  {
     
$user['musername'] = '<span style="color:pink;">' $user['username'] . '</span>'
  }
  else
  {
     
$user['musername'] = '<span style="color:blue;">' $user['username'] . '</span>';
  }

Reply With Quote
  #19  
Old 03-08-2012, 03:47 PM
sadiq6210 sadiq6210 is offline
 
Join Date: Sep 2005
Posts: 684
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much Joe

Working perfect .. appreciate you
Reply With Quote
Благодарность от:
BirdOPrey5
  #20  
Old 03-15-2012, 01:25 AM
thecojuk thecojuk is offline
 
Join Date: Mar 2012
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks man
Reply With Quote
Reply

Thread Tools
Display Modes

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 11:31 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.12680 seconds
  • Memory Usage 2,283KB
  • Queries Executed 14 (?)
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
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • 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
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete