Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 01-04-2015, 01:34 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually you want to use $bbuserinfo['fieldX'] instead of $post[fieldX] for forumhome.
Reply With Quote
  #12  
Old 01-04-2015, 02:43 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Using $bbuserinfo['fieldX'] will use your fieldX for every user.

I think this can be done everywhere with a plugin using hook fetch_musername and code like this:
Code:
if (is_member_of($user, 27))
{
   $user[musername] = '<span style="color:'.$user['field9'].'">'.$username.'</span>';
}
but I haven't tried it. There may be an issue with field9 being available when that hook is called.
Reply With Quote
  #13  
Old 01-04-2015, 02:59 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, that's not going to work in the "who's online" because of missing field9 for those users. A few other people have asked about similar things over the past few years, and I looked at the threads quickly but didn't find a complete answer. I'll look at it a little more tomorrow if you haven't worked it out by then.
Reply With Quote
  #14  
Old 01-04-2015, 01:14 PM
TC-Jamech TC-Jamech is offline
 
Join Date: Sep 2011
Location: UK
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Yeah, that's not going to work in the "who's online" because of missing field9 for those users. A few other people have asked about similar things over the past few years, and I looked at the threads quickly but didn't find a complete answer. I'll look at it a little more tomorrow if you haven't worked it out by then.
Sadly, I have no idea how to make hooks lol, but if I try to replace memberinfo's username field with the one in postbit_legacy ($post[musername] it still doesn't work as the usernames disappear)

I've seen several sites use it, but non are prepared to share the code.
Reply With Quote
  #15  
Old 01-04-2015, 02:28 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I made you a product xml that you should be able to import, and attached it. In case you don't know already, to do that you go to Plugins & Products > Manage Products and click on the "Add/Import Products" link at the bottom. Then press the "Choose File" button and find the xml file (you would have saved to your computer already), then press "Import".

I did try this but I'm not 100% certain it will add the color everywhere you need (some places just don't have it at all even if you set it in the usergroup manager). But you should be able to remove the edits you made in the postbit template, if you want.

Hopefully this is what you wanted. Otherwise, let me know.
Attached Files
File Type: xml product-usercolor_from_profile.xml (1.2 KB, 29 views)
Reply With Quote
  #16  
Old 01-04-2015, 04:40 PM
TC-Jamech TC-Jamech is offline
 
Join Date: Sep 2011
Location: UK
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
OK, I made you a product xml that you should be able to import, and attached it. In case you don't know already, to do that you go to Plugins & Products > Manage Products and click on the "Add/Import Products" link at the bottom. Then press the "Choose File" button and find the xml file (you would have saved to your computer already), then press "Import".

I did try this but I'm not 100% certain it will add the color everywhere you need (some places just don't have it at all even if you set it in the usergroup manager). But you should be able to remove the edits you made in the postbit template, if you want.

Hopefully this is what you wanted. Otherwise, let me know.
Thanks buddy, I've tested it and it shows on postbit & memberinfo, is their away of enabling it for the users online?
Reply With Quote
  #17  
Old 01-04-2015, 04:47 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I thought it would work for users online. Sorry if this is a stupid question, but what part are you talking about exactly? Is it "Currently Active Users" on index.php? Maybe I'm thinking of a different section.
Reply With Quote
  #18  
Old 01-04-2015, 04:52 PM
TC-Jamech TC-Jamech is offline
 
Join Date: Sep 2011
Location: UK
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
I thought it would work for users online. Sorry if this is a stupid question, but what part are you talking about exactly? Is it "Currently Active Users" on index.php? Maybe I'm thinking of a different section.
Yep that lil bit at the bottom of index.php, and also the members visited today box which is a mod. I tried modifyin that div but it's different coding to the postbit and only shows up as $activeusers
Reply With Quote
  #19  
Old 01-04-2015, 05:21 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm...it's working for me in "Currently Active Users" (which was kind of the point of it). I don't think I can help you with the mod, I don't know anything about it.

Your VIP group is 27, and the profile field is 9, right? I hard-coded those in that plugin.

If you right click one of the user names and "Inspect Element" (or whatever it is for your browser), do you see the <span style="... tags around the user name?
Reply With Quote
  #20  
Old 01-04-2015, 06:11 PM
TC-Jamech TC-Jamech is offline
 
Join Date: Sep 2011
Location: UK
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
Hmm...it's working for me in "Currently Active Users" (which was kind of the point of it). I don't think I can help you with the mod, I don't know anything about it.

Your VIP group is 27, and the profile field is 9, right? I hard-coded those in that plugin.

If you right click one of the user names and "Inspect Element" (or whatever it is for your browser), do you see the <span style="... tags around the user name?
Yeah it's working fine now, just not in Chrome lol. I suppose I can live without the mod plugin

Just one more thing, how do I bold the usernames? as I currently have <b> </b> in the usergroup manager for that user, but isn't showing as bold? I'm guessing I need to modify the plugin you gave?
Reply With Quote
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 11:03 AM.


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.04823 seconds
  • Memory Usage 2,279KB
  • Queries Executed 12 (?)
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
  • (1)bbcode_code
  • (4)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
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (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_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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete