Add groups in team page & Legend repositioning

3.0.x Mods
Post Reply
User avatar
Prosk8er
Site Admin
Posts: 22
Joined: Tue Jul 04, 2017 9:51 pm
Location: Rochester, Ny
    Windows 10 Internet Explorer
Contact:

Add groups in team page & Legend repositioning

Post by Prosk8er » Sat Jul 08, 2017 8:08 pm

Modification Name: Add groups in team page & Legend repositioning
Author: bprsk8r4272, michaelo, phpBB Group

Modification Description: With this mod you have the ability to add a group to the team page and legend repositioning taken right out of phpbb 3.1.0-dev and made to work with phpbb 3.0.9. Thank phpbb for there awesome code and mike over at http://stargate-portal.com for his help with the umil installer.
Modification Version: 0.2.2
Works With: 3.0.14

Screenshots:
downloads/phpBB3/mods/screenshots/manage_groups.png
downloads/phpBB3/mods/screenshots/manag ... itions.png
downloads/phpBB3/mods/screenshots/teampage.png
downloads/phpBB3/mods/screenshots/multiple_groups.png

Demo URL: http://gotskillslounge.com
Demo Username: test
Demo Password: test123
Modification Download:
add_group_teampage_0.2.2.zip
(227.54 KiB) Downloaded 57 times
Github: https://github.com/Prosk8er/Add_a_group_to_teampage

MOD Format:
Image
Image

FAQ:
(1) By default the admin and global mod groups are added to the team page for this mod but if you converted from phpbb2 or maybe any other forum base the groups will be different but you can always change which ones are shown :)
(2) If you get a error when trying to move a group up in the legend just remove all groups from showing on the legend and re add them you should be all set after that :)
(3) for this to work with Stargate portal & Kiss portal theres one edit to be made to /portal.php
Find:

Code: Select all

// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
	$sql = 'SELECT group_id, group_name, group_colour, group_type
		FROM ' . GROUPS_TABLE . '
		WHERE group_legend = 1
		ORDER BY group_name ASC';
}
else
{
	$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type
		FROM ' . GROUPS_TABLE . ' g
		LEFT JOIN ' . USER_GROUP_TABLE . ' ug
			ON (
				g.group_id = ug.group_id
				AND ug.user_id = ' . $user->data['user_id'] . '
				AND ug.user_pending = 0
			)
		WHERE g.group_legend = 1
			AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
		ORDER BY g.group_name ASC';
}
Replace With:

Code: Select all

$order_legend = ($config['legend_sort_groupname']) ? 'group_name' : 'group_legend';
// Grab group details for legend display
if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel'))
{
	$sql = 'SELECT group_id, group_name, group_colour, group_type, group_legend
		FROM ' . GROUPS_TABLE . '
		WHERE group_legend > 0
		ORDER BY ' . $order_legend . ' ASC';
}
else
{
	$sql = 'SELECT g.group_id, g.group_name, g.group_colour, g.group_type, g.group_legend
		FROM ' . GROUPS_TABLE . ' g
		LEFT JOIN ' . USER_GROUP_TABLE . ' ug
			ON (
				g.group_id = ug.group_id
				AND ug.user_id = ' . $user->data['user_id'] . '
				AND ug.user_pending = 0
			)
		WHERE g.group_legend > 0
			AND (g.group_type <> ' . GROUP_HIDDEN . ' OR ug.user_id = ' . $user->data['user_id'] . ')
		ORDER BY g.' . $order_legend . ' ASC';
}
Image
Image

Post Reply