vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Usergroup Member's List (https://vborg.vbsupport.ru/showthread.php?t=320943)

Cody.9791 12-01-2015 12:34 AM

Usergroup Member's List
 
How would I go about allowing all registered users the ability to view users in a specific usergroup? Right now, only the usergroup leaders have the ability to view the users in their own usergroup. I'd like to allow everyone that function rather than limiting it.

Thanks in advance!

Cody.9791 12-04-2015 04:36 AM

Is anybody able to give advice on this issue?

Dragonsys 12-04-2015 04:58 AM

You might use one of the member list or roster mods. I will have to dig into the settings to see if vb has a way to allow this with the default list.

Cody.9791 12-04-2015 07:12 AM

Quote:

Originally Posted by Dragonsys (Post 2559730)
You might use one of the member list or roster mods. I will have to dig into the settings to see if vb has a way to allow this with the default list.

Thank you, that'd be very much appreciated.

Dragonsys 12-04-2015 01:57 PM

So, are you wanting everyone to appear on the Memberlist, or are you wanting to be able to show only the members in the specific group?

Are you sure what you want is a usergroup? I ask because I'm not aware of usergroups having leaders, Social/Member Groups do. I'm not aware of a way to display this info for Social groups, but then I don't use these groups on any of my sites, so I have never looked into it.

I'm not really seeing a plugin out there for it either.

Cody.9791 12-10-2015 02:48 AM

Quote:

Originally Posted by Dragonsys (Post 2559748)
So, are you wanting everyone to appear on the Memberlist, or are you wanting to be able to show only the members in the specific group?

Are you sure what you want is a usergroup? I ask because I'm not aware of usergroups having leaders, Social/Member Groups do. I'm not aware of a way to display this info for Social groups, but then I don't use these groups on any of my sites, so I have never looked into it.

I'm not really seeing a plugin out there for it either.

I'm wanting to view the "Permission Group" (Usergroup) page and be able to view the members within each Permission Group (Usergroup) rather than view the entire Members List for the entire site.

Currently, only the Usergroup leaders have this ability. I want to have it changed so that everyone can view who is within each usergroup.

Dragonsys 12-10-2015 01:02 PM

Ok, you are meaning Publiclly Joinable usergroups. I'm following you now, sorry, I'm a little slow sometimes, LOL
I'm not sure of a way to do this, I will have to look into it some, and see if there is a hook which can be used.

Cody.9791 12-10-2015 07:10 PM

Quote:

Originally Posted by Dragonsys (Post 2560113)
Ok, you are meaning Publiclly Joinable usergroups. I'm following you now, sorry, I'm a little slow sometimes, LOL
I'm not sure of a way to do this, I will have to look into it some, and see if there is a hook which can be used.

I've seen this done on other vBulletin sites, so I know it's possibly I just couldn't figure it out. Thanks in advance for helping look into it!

Dragonsys 12-10-2015 07:17 PM

I know you could use a plugin such as this - https://vborg.vbsupport.ru/showthread.php?t=299659. I actually used this on a site for years for this very type of thing.

Cody.9791 12-13-2015 08:35 PM

Quote:

Originally Posted by Dragonsys (Post 2560151)
I know you could use a plugin such as this - https://vborg.vbsupport.ru/showthread.php?t=299659. I actually used this on a site for years for this very type of thing.

Isn't there code I can either edit or change within the template to allow what I'm wanting? Basically, it's currently restricted to usergroup leaders and I want to make it to where it's allowed for all registered users.

Dave 12-13-2015 08:44 PM

Templates are just there for the visual aspect, they don't take care of the core functionality.
It'll really have to be done with a plugin or hook.

Cody.9791 12-13-2015 08:48 PM

Quote:

Originally Posted by Dave (Post 2560361)
Templates are just there for the visual aspect, they don't take care of the core functionality.
It'll really have to be done with a plugin or hook.

So I couldn't add something within the " modifyusergroups_nonmemberbit" template and have this solved?

What do you suggest that I do then because I would like this done. Any suggestions would be greatly appreciated.

Dragonsys 12-14-2015 01:14 AM

Quote:

Originally Posted by Cody.9791 (Post 2560362)
So I couldn't add something within the " modifyusergroups_nonmemberbit" template and have this solved?

What do you suggest that I do then because I would like this done. Any suggestions would be greatly appreciated.

If you want it done faster, then either offer to pay someone for it, or code it yourself. not trying to be mean, I'm just pretty direct ;). I'm looking into it, but it will take me a bit, as I just started a new job and things are extremely hectic for me right now.

Cody.9791 12-14-2015 05:36 AM

Quote:

Originally Posted by Dragonsys (Post 2560369)
If you want it done faster, then either offer to pay someone for it, or code it yourself. not trying to be mean, I'm just pretty direct ;). I'm looking into it, but it will take me a bit, as I just started a new job and things are extremely hectic for me right now.

Definitely not trying to be pushy. Just would like some help with solving this. I appreciate you continuing to look for a solution for me.

Dragonsys 12-18-2015 09:21 PM

Ok, after looking into this some, I feel you would probably be best served with the plugin I linked above. I think trying to display the members of each joinable group on the group listing page would not be very user friendly, as it could potentially make the page rather large. I have used Sarcoth's Roster mode a LOT and really like it. You can see an example of one of my sites using it here - http://www.lonestarcamaro.com/forums/rosterlite.php

Cody.9791 12-20-2015 06:57 AM

Quote:

Originally Posted by Dragonsys (Post 2560758)
Ok, after looking into this some, I feel you would probably be best served with the plugin I linked above. I think trying to display the members of each joinable group on the group listing page would not be very user friendly, as it could potentially make the page rather large. I have used Sarcoth's Roster mode a LOT and really like it. You can see an example of one of my sites using it here - http://www.lonestarcamaro.com/forums/rosterlite.php

I've looked at this plugin and it looks like it has to be manually updated when there's new usergroups made / deleted / renamed. I'm not looking to add more work for my admins to have to keep this updated. Other than that, seems like a decent plugin, but not for me.

I'm just looking to add a link that says "List Members" below the usergroup without having to be a usergroup leader. All registered users need to just be able to click "List Members" for every public usergroup and see who's in each different usergroup.

Dragonsys 12-20-2015 03:23 PM

Ok, that would be doable, as long as you don't mind it displaying on a different screen or a pop-up

Cody.9791 12-20-2015 04:52 PM

Quote:

Originally Posted by Dragonsys (Post 2560840)
Ok, that would be doable, as long as you don't mind it displaying on a different screen or a pop-up

Like when you select it, it brings you to a different page? That's fine. That's what it does currently when you click "List Members" for each usergroup. It's just that only the usergroup leaders are able to view that and I need it to show for all registered users.

Dragonsys 12-20-2015 05:52 PM

Ok, this is a manual edit, so if you upgrade vBulletin you might have to reapply it, but here it is quick and dirty:

Open Template: modifyusergroups_nonmemberbit
Find:
HTML Code:

<vb:else />
        {vb:rawphrase anyone_free_to_join_group}
</vb:if>

After Add:
HTML Code:

        <a href="memberlist.php?usergroupid={vb:raw usergroup.usergroupid}">{vb:rawphrase list_members}</a>

EDIT:
Just noticed this gives a permission error. The permission is coded into memberlist.php, you can get around it by doing the following edits (These will be lost when upgrading vBulletin as this is editing a core file) Line numbers based on vB v4.2.3

Open: memberlist.php
Find (lines 358-368):
PHP Code:

        // check permission to do authorizations in this group
        
if (!$leadergroup $db->query_first_slave("
            SELECT usergroupleader.usergroupleaderid, usergroup.title
            FROM " 
TABLE_PREFIX "usergroupleader AS usergroupleader
            LEFT JOIN " 
TABLE_PREFIX "usergroup AS usergroup ON (usergroupleader.usergroupid = usergroup.usergroupid)
            WHERE usergroupleader.userid = " 
$vbulletin->userinfo['userid'] . "
                AND usergroupleader.usergroupid = 
$usergroupid
        "
))
        {
            
print_no_permission();
        } 

Replace with:
PHP Code:

        // check permission to do authorizations in this group
        
if (!$leadergroup $db->query_first_slave("
            SELECT usergroupleader.usergroupleaderid, usergroup.title
            FROM " 
TABLE_PREFIX "usergroupleader AS usergroupleader
            LEFT JOIN " 
TABLE_PREFIX "usergroup AS usergroup ON (usergroupleader.usergroupid = usergroup.usergroupid)
            WHERE usergroupleader.userid = " 
$vbulletin->userinfo['userid'] . "
                AND usergroupleader.usergroupid = 
$usergroupid
        "
))
        {
            
$remove_selected_users '';
        } else {
            
$remove_selected_users '<input type="submit" class="button" value="Remove Selected Users(s)" />';
        } 

Find (line 937):
PHP Code:

$page_templater->register('oppositesort'$oppositesort); 

After Add:
PHP Code:

$page_templater->register('remove_selected_users'$remove_selected_users); 

Open Template: memberlist
Find:
HTML Code:

        <vb:if condition="$show['usergroup']">
            <input type="submit" class="button" value="{vb:rawphrase remove_selected_users}" />

Replace With:
HTML Code:

        <vb:if condition="$show['usergroup']">
            {vb:raw remove_selected_users}


Cody.9791 12-21-2015 01:47 AM

Quote:

Originally Posted by Dragonsys (Post 2560849)
Ok, this is a manual edit, so if you upgrade vBulletin you might have to reapply it, but here it is quick and dirty:

Open Template: modifyusergroups_nonmemberbit
Find:
HTML Code:

<vb:else />
        {vb:rawphrase anyone_free_to_join_group}
</vb:if>

After Add:
HTML Code:

        <a href="memberlist.php?usergroupid={vb:raw usergroup.usergroupid}">{vb:rawphrase list_members}</a>

EDIT:
Just noticed this gives a permission error. The permission is coded into memberlist.php, you can get around it by doing the following edits (These will be lost when upgrading vBulletin as this is editing a core file) Line numbers based on vB v4.2.3

Open: memberlist.php
Find (lines 358-368):
PHP Code:

        // check permission to do authorizations in this group
        
if (!$leadergroup $db->query_first_slave("
            SELECT usergroupleader.usergroupleaderid, usergroup.title
            FROM " 
TABLE_PREFIX "usergroupleader AS usergroupleader
            LEFT JOIN " 
TABLE_PREFIX "usergroup AS usergroup ON (usergroupleader.usergroupid = usergroup.usergroupid)
            WHERE usergroupleader.userid = " 
$vbulletin->userinfo['userid'] . "
                AND usergroupleader.usergroupid = 
$usergroupid
        "
))
        {
            
print_no_permission();
        } 

Replace with:
PHP Code:

        // check permission to do authorizations in this group
        
if (!$leadergroup $db->query_first_slave("
            SELECT usergroupleader.usergroupleaderid, usergroup.title
            FROM " 
TABLE_PREFIX "usergroupleader AS usergroupleader
            LEFT JOIN " 
TABLE_PREFIX "usergroup AS usergroup ON (usergroupleader.usergroupid = usergroup.usergroupid)
            WHERE usergroupleader.userid = " 
$vbulletin->userinfo['userid'] . "
                AND usergroupleader.usergroupid = 
$usergroupid
        "
))
        {
            
$remove_selected_users '';
        } else {
            
$remove_selected_users '<input type="submit" class="button" value="Remove Selected Users(s)" />';
        } 

Find (line 937):
PHP Code:

$page_templater->register('oppositesort'$oppositesort); 

After Add:
PHP Code:

$page_templater->register('remove_selected_users'$remove_selected_users); 

Open Template: memberlist
Find:
HTML Code:

        <vb:if condition="$show['usergroup']">
            <input type="submit" class="button" value="{vb:rawphrase remove_selected_users}" />

Replace With:
HTML Code:

        <vb:if condition="$show['usergroup']">
            {vb:raw remove_selected_users}


This is exactly what I was looking for! It works perfectly! Thank you very much!

Cody.9791 12-22-2015 06:52 PM

Quote:

Originally Posted by Dragonsys (Post 2560849)
Ok, this is a manual edit, so if you upgrade vBulletin you might have to reapply it, but here it is quick and dirty:

Open Template: modifyusergroups_nonmemberbit
Find:
HTML Code:

<vb:else />
        {vb:rawphrase anyone_free_to_join_group}
</vb:if>

After Add:
HTML Code:

        <a href="memberlist.php?usergroupid={vb:raw usergroup.usergroupid}">{vb:rawphrase list_members}</a>

EDIT:
Just noticed this gives a permission error. The permission is coded into memberlist.php, you can get around it by doing the following edits (These will be lost when upgrading vBulletin as this is editing a core file) Line numbers based on vB v4.2.3

Open: memberlist.php
Find (lines 358-368):
PHP Code:

        // check permission to do authorizations in this group
        
if (!$leadergroup $db->query_first_slave("
            SELECT usergroupleader.usergroupleaderid, usergroup.title
            FROM " 
TABLE_PREFIX "usergroupleader AS usergroupleader
            LEFT JOIN " 
TABLE_PREFIX "usergroup AS usergroup ON (usergroupleader.usergroupid = usergroup.usergroupid)
            WHERE usergroupleader.userid = " 
$vbulletin->userinfo['userid'] . "
                AND usergroupleader.usergroupid = 
$usergroupid
        "
))
        {
            
print_no_permission();
        } 

Replace with:
PHP Code:

        // check permission to do authorizations in this group
        
if (!$leadergroup $db->query_first_slave("
            SELECT usergroupleader.usergroupleaderid, usergroup.title
            FROM " 
TABLE_PREFIX "usergroupleader AS usergroupleader
            LEFT JOIN " 
TABLE_PREFIX "usergroup AS usergroup ON (usergroupleader.usergroupid = usergroup.usergroupid)
            WHERE usergroupleader.userid = " 
$vbulletin->userinfo['userid'] . "
                AND usergroupleader.usergroupid = 
$usergroupid
        "
))
        {
            
$remove_selected_users '';
        } else {
            
$remove_selected_users '<input type="submit" class="button" value="Remove Selected Users(s)" />';
        } 

Find (line 937):
PHP Code:

$page_templater->register('oppositesort'$oppositesort); 

After Add:
PHP Code:

$page_templater->register('remove_selected_users'$remove_selected_users); 

Open Template: memberlist
Find:
HTML Code:

        <vb:if condition="$show['usergroup']">
            <input type="submit" class="button" value="{vb:rawphrase remove_selected_users}" />

Replace With:
HTML Code:

        <vb:if condition="$show['usergroup']">
            {vb:raw remove_selected_users}


One thing was brought to my attention with this. Users that are already in a usergroup aren't able to see the "List Members" link. Is there some way to get this to show in the "You are a member of the following groups" section at the bottom of the page?

Dragonsys 12-22-2015 07:36 PM

Quote:

Originally Posted by Cody.9791 (Post 2560983)
One thing was brought to my attention with this. Users that are already in a usergroup aren't able to see the "List Members" link. Is there some way to get this to show in the "You are a member of the following groups" section at the bottom of the page?

Ok, i think this will do it:

Open Template: modifyusergroups_memberbit
Find:
HTML Code:

                                        <vb:if condition="$show['isleader']">
                                                ({vb:rawphrase leader_of_this_group})
                                        <vb:else />
                                                <label for="rb_leave_{vb:raw usergroup.usergroupid}"><input type="radio" name="usergroupid" id="rb_leave_{vb:raw usergroup.usergroupid}" tabindex="1" value="{vb:raw usergroup.usergroupid}" /> {vb:rawphrase leave_group}</label>
                                        </vb:if>

After Add:
HTML Code:

                                        <a href="memberlist.php?usergroupid={vb:raw usergroup.usergroupid}">{vb:rawphrase list_members}</a>

Cody.9791 12-22-2015 08:34 PM

Quote:

Originally Posted by Dragonsys (Post 2560990)
Ok, i think this will do it:

Open Template: modifyusergroups_memberbit
Find:
HTML Code:

                                        <vb:if condition="$show['isleader']">
                                                ({vb:rawphrase leader_of_this_group})
                                        <vb:else />
                                                <label for="rb_leave_{vb:raw usergroup.usergroupid}"><input type="radio" name="usergroupid" id="rb_leave_{vb:raw usergroup.usergroupid}" tabindex="1" value="{vb:raw usergroup.usergroupid}" /> {vb:rawphrase leave_group}</label>
                                        </vb:if>

After Add:
HTML Code:

                                        <a href="memberlist.php?usergroupid={vb:raw usergroup.usergroupid}">{vb:rawphrase list_members}</a>

Thank you for the quick solution! Works great!


All times are GMT. The time now is 04:48 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.01333 seconds
  • Memory Usage 1,875KB
  • 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
  • (16)bbcode_html_printable
  • (12)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (23)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