Add groups in team page & Legend repositioning

3.0.x Mods
Site Admin
Posts: 41
Joined: Tue Jul 04, 2017 9:51 pm
Location: Rochester, Ny

    Windows 10 Internet Explorer

Add groups in team page & Legend repositioning

Post by Prosk8er »

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:
http://gotskillslounge.com/downloads/ph ... groups.png
http://gotskillslounge.com/downloads/ph ... itions.png
http://gotskillslounge.com/downloads/ph ... ampage.png
http://gotskillslounge.com/downloads/ph ... 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 1107 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

Who is online

Users browsing this forum: No registered users and 3 guests