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 05-03-2014, 04:53 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default usergroup legend hover

so i want to make a usergroup legend that shows users from hovered usergroup only.

similar to the mod
https://vborg.vbsupport.ru/showthrea...ight=Mouseover

but not just showing the usergroup name, i want it to show users online from that usergroup.

so I'm just curious before i start this, does anything like that already exist (yes i have searched)

and if not... what would be the conditional for that sort of thing

something similar to this im guessing... but only to show the users from hovered usergroup not only show specified usergroup (confusing but makes since to me lol)
<if condition="is_member_of($vbulletin->userinfo, 6)"></if>

EXP: (quick ps mockup)
Attached Images
File Type: png Untitled-1.png (6.7 KB, 0 views)
Reply With Quote
  #2  
Old 02-13-2016, 06:54 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump -
back in the scene and could use some help with this still
Reply With Quote
  #3  
Old 02-14-2016, 06:08 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So you want to know if a mod already exist that; When you hover over a members usergroup title in posts, it will show a popup box with an entire list of the members within said group?

If that is the case, it might not be best to do this... perhaps but if you realize why it's best to not show all usergroups members from all usergroups on the memberlist then you'd realize why that is unless it queries the members on click i.e. at time of request instead of loading for that div area each page load. I dunno I'm split on this, if you should be doing this based on what I know and if it can be done differently... perhaps someone else will come along with some suggestions or info I'm just not considering now so stand by .

Edit: But to answer your question, no I haven't seen anything similar to this but there's so many mods out there I don't know them all, 90% sure but the other 10% is still new to me .
Reply With Quote
  #4  
Old 02-14-2016, 07:42 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no, i want to create a product (a legend) that is in the users online section on forumhome.

when user hovers over the title for the usergroup, it will pop up users that are online in the group they are hovering over, if that makes sence.

poor example: (UNHOVERED - similar to normal way)

ONLINE USERS:
admin, mod, user1, user2, user3

MEMBER - MOD - ADMIN - SPIDER - SUPER - SPECIAL

poor example 2: (hovering over members in the legend)

ONLINE USERS:
user1, user2, user3

MEMBER - MOD - ADMIN - SPIDER - SUPER - SPECIAL
Reply With Quote
  #5  
Old 02-14-2016, 07:51 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think I know what you mean... it shouldn't be too hard to make such thing.
What you need to implement first is a way to see what member belongs to what usergroup.

You can do this by giving the hyperlink another attribute such as usergroup="6" or usergroup="administrator" and then when someone hovers over the legend rank administrator (which also has some kind of attribute attached to it so you can see what usergroup is being hovered over), it will loop through each of the hyperlinks in the "Who's online" div and find who has the attribute.

I made a quick example for you here: https://jsfiddle.net/1n5zzof6/
Reply With Quote
Благодарность от:
Dr.CustUmz
  #6  
Old 02-15-2016, 04:55 PM
Dr.CustUmz's Avatar
Dr.CustUmz Dr.CustUmz is offline
 
Join Date: Aug 2013
Location: USA
Posts: 647
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thats perfect dave, exactly what im going for and i didnt think of giving them an additional tag that included their usergroup -_- didnt think it was that simple =)

some reason i cant get this working i had it semi working when i had it all in forumhome_loggedinusers template that causes it to repeat though cause it prints that template for each user, but when i add it properly

FORUMHOME:
Code:
<div class="usersonline">$activeusers</div>
<div class="legend">
	<span usergroup="6">Administrator</span> <span usergroup="2">Member</span>
</div>
FORUMHOME_LOGGEDINUSER:
Code:
<if condition="$show['comma_leader']">, </if>$stylevar[dirmark]<a usergroup="$loggedin[usergroupid]" href="member.php?$session[sessionurl]u=$loggedin[userid]">$loggedin[musername]</a>$loggedin[invisiblemark]$loggedin[buddymark]
HEADER:
Code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
$(".legend span").hover(function(){
	usergroup = $(this).attr('usergroup');
	$(".usersonline a").each(function(){
		if($(this).attr('usergroup') != usergroup){
			$(this).hide();
		}
	});
}, function(){
	$(".usersonline a").show();
});
</script>
its not working... i have no errors in the console... and the html generates perfect... am i missing something...

HTML OUTPUT:
Code:
<div class="usersonline"><!-- BEGIN TEMPLATE: forumhome_loggedinuser -->
<a usergroup="6" href="http://dirtrif.com/members/drcustumz.html">DrCustUmz</a>
<!-- END TEMPLATE: forumhome_loggedinuser --><!-- BEGIN TEMPLATE: forumhome_loggedinuser -->
, <a usergroup="2" href="http://dirtrif.com/members/drbot.html">DrBot</a>
<!-- END TEMPLATE: forumhome_loggedinuser --></div>
<div class="legend">
	<span usergroup="6">Administrator</span> <span usergroup="2">Member</span>
</div>

Code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script>
$(".legend span").hover(function(){
	usergroup = $(this).attr('usergroup');
	$(".usersonline a").each(function(){
		if($(this).attr('usergroup') != usergroup){
			$(this).hide();
		}
	});
}, function(){
	$(".usersonline a").show();
});
</script>


FIXED BY PLACING SCRIPT IN HEADER
now need to get rid of the commas if theyre not needed....
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 02:58 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.09970 seconds
  • Memory Usage 2,239KB
  • 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
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (1)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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_attachment
  • 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