[ABD] Add groups in team page & Legend repositioning

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
Locked
User avatar
Prosk8er
Registered User
Posts: 1387
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

[ABD] Add groups in team page & Legend repositioning

Post by Prosk8er » Wed Aug 03, 2011 5:34 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.x. 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.12

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: http://gotskillslounge.com/downloads/ph ... _0.2.2.zip
Github: https://github.com/Prosk8er/Add_a_group_to_teampage

MOD Format:
Image
Image

FAQ:
Please note that when 3.1.0 has been released this mod will be abandoned since this function is already in 3.1.0
(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';
}
Last edited by Prosk8er on Thu Nov 06, 2014 5:58 pm, edited 15 times in total.
formerly bprsk8r4272 Proud Kiss Portal user on phpBB 3.0.14 + 1.0.20 (build 311-020)
Image
Validated Extensions, Mods, and Styles My Mods: Smashable Christmas Lights 3.0.x Add a group to teampage 3.0.x

User avatar
Brf
Support Team Member
Support Team Member
Posts: 50745
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: [RC] Add groups in team page & Legend repositioning

Post by Brf » Wed Aug 03, 2011 5:39 pm

Currently, the The Team page shows all moderators, regardless of their groups. Are you removing that functionality?

User avatar
Prosk8er
Registered User
Posts: 1387
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: [RC] Add groups in team page & Legend repositioning

Post by Prosk8er » Wed Aug 03, 2011 5:47 pm

Brf wrote:Currently, the The Team page shows all moderators, regardless of their groups. Are you removing that functionality?
i actually didnt even look into that til you just said something about it but yes it removes that instead any group you add in there will show and will show if there a moderator just like in phpbb 3.1.0-dev
formerly bprsk8r4272 Proud Kiss Portal user on phpBB 3.0.14 + 1.0.20 (build 311-020)
Image
Validated Extensions, Mods, and Styles My Mods: Smashable Christmas Lights 3.0.x Add a group to teampage 3.0.x

locoycabron
Registered User
Posts: 13
Joined: Thu Aug 04, 2011 7:58 am

Re: [RC] Add groups in team page & Legend repositioning

Post by locoycabron » Thu Aug 04, 2011 8:49 am

i just show The Team empty even though i have some groups there any ideas?

User avatar
Meis2M
Translator
Posts: 755
Joined: Wed Mar 03, 2010 11:32 am
Location: IR.Damghan
Name: میثم نوبری
Contact:

Re: [RC] Add groups in team page & Legend repositioning

Post by Meis2M » Thu Aug 04, 2011 3:02 pm

thank u.
very good MOD. with this MOD we can arrange the groups?

User avatar
Prosk8er
Registered User
Posts: 1387
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: [RC] Add groups in team page & Legend repositioning

Post by Prosk8er » Thu Aug 04, 2011 4:14 pm

locoycabron wrote:i just show The Team empty even though i have some groups there any ideas?
delete them all from showing in the team page then re add them see if that fixes it
formerly bprsk8r4272 Proud Kiss Portal user on phpBB 3.0.14 + 1.0.20 (build 311-020)
Image
Validated Extensions, Mods, and Styles My Mods: Smashable Christmas Lights 3.0.x Add a group to teampage 3.0.x

User avatar
Prosk8er
Registered User
Posts: 1387
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: [RC] Add groups in team page & Legend repositioning

Post by Prosk8er » Thu Aug 04, 2011 4:14 pm

Meis2M wrote:thank u.
very good MOD. with this MOD we can arrange the groups?
yup in both the team page and the legend
formerly bprsk8r4272 Proud Kiss Portal user on phpBB 3.0.14 + 1.0.20 (build 311-020)
Image
Validated Extensions, Mods, and Styles My Mods: Smashable Christmas Lights 3.0.x Add a group to teampage 3.0.x

locoycabron
Registered User
Posts: 13
Joined: Thu Aug 04, 2011 7:58 am

Re: [RC] Add groups in team page & Legend repositioning

Post by locoycabron » Thu Aug 04, 2011 4:53 pm

bprsk8r4272 wrote:
locoycabron wrote:i just show The Team empty even though i have some groups there any ideas?
delete them all from showing in the team page then re add them see if that fixes it
That is exactly the very first thing i have tried and it did not work.

User avatar
Prosk8er
Registered User
Posts: 1387
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: [RC] Add groups in team page & Legend repositioning

Post by Prosk8er » Thu Aug 04, 2011 5:28 pm

locoycabron wrote:
bprsk8r4272 wrote:
locoycabron wrote:i just show The Team empty even though i have some groups there any ideas?
delete them all from showing in the team page then re add them see if that fixes it
That is exactly the very first thing i have tried and it did not work.
did you install it with automod or did you manually install it? if you manually installed it double check all your edits. if you like i can take a look at your site but i'll need a admin account if you want me to pm me the details. ive done multiple tests on this mod as well did mike at stargate-portal.com and havent come across this problem.

Meis2M did you install this mod yet?

*added another screenshot with multiple groups with users http://gotskillslounge.com/downloads/ph ... groups.png
Last edited by Prosk8er on Sat Jan 28, 2012 7:01 pm, edited 1 time in total.
formerly bprsk8r4272 Proud Kiss Portal user on phpBB 3.0.14 + 1.0.20 (build 311-020)
Image
Validated Extensions, Mods, and Styles My Mods: Smashable Christmas Lights 3.0.x Add a group to teampage 3.0.x

locoycabron
Registered User
Posts: 13
Joined: Thu Aug 04, 2011 7:58 am

Re: [RC] Add groups in team page & Legend repositioning

Post by locoycabron » Thu Aug 04, 2011 5:47 pm

bprsk8r4272 wrote:
locoycabron wrote:
bprsk8r4272 wrote:
locoycabron wrote:i just show The Team empty even though i have some groups there any ideas?
delete them all from showing in the team page then re add them see if that fixes it
That is exactly the very first thing i have tried and it did not work.
did you install it with automod or did you manually install it? if you manually installed it double check all your edits. if you like i can take a look at your site but i'll need a admin account if you want me to pm me the details. ive done multiple tests on this mod as well did mike at stargate-portal.com and havent come across this problem.

Meis2M did you install this mod yet?

*added another screenshot with multiple groups with users http://ghostfacekillerclan.com/download ... groups.png
automod installed, i cant pm here anything, please log into msn messenger so i can send you the info. thanks.

User avatar
Jessica
Former Team Member
Posts: 4341
Joined: Sun Jul 18, 2010 2:53 pm
Location: Pennsylvania, USA
Name: Jessica
Contact:

Re: [RC] Add groups in team page & Legend repositioning

Post by Jessica » Thu Aug 04, 2011 6:15 pm

I already have installed a mod for Legend repositioning. is there any way I could install the Add groups in team page part of this mod?
Please do not PM me for support unless it is absolutely necessary
Pro-choice, Atheist, Pro-LGBT rights

Everybody is a genius. But if you judge a fish by its ability to climb a tree, it will live its whole life believing that it is stupid. - Albert Einstein

User avatar
Prosk8er
Registered User
Posts: 1387
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: [RC] Add groups in team page & Legend repositioning

Post by Prosk8er » Thu Aug 04, 2011 6:32 pm

jesschen wrote:I already have installed a mod for Legend repositioning. is there any way I could install the Add groups in team page part of this mod?
there both tied together it would involve some coding
formerly bprsk8r4272 Proud Kiss Portal user on phpBB 3.0.14 + 1.0.20 (build 311-020)
Image
Validated Extensions, Mods, and Styles My Mods: Smashable Christmas Lights 3.0.x Add a group to teampage 3.0.x

User avatar
Prosk8er
Registered User
Posts: 1387
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: [RC] Add groups in team page & Legend repositioning

Post by Prosk8er » Thu Aug 04, 2011 7:06 pm

locoycabron problem has been fixed he didnt do the edit to his style
heres ca_black/template/memberlist_leaders.html in case anyone else uses that style with this mod

Code: Select all

<!-- DEFINE $CA_PAGE = 'users' --><!-- INCLUDE overall_header.html -->

<h2 class="solo">{PAGE_TITLE}</h2>

<form method="post" action="{S_MODE_ACTION}">

<!-- BEGIN group -->
<div class="forumbg">
	{$CA_BLOCK_START}

	<table class="table1" cellspacing="{$CA_TABLE_SPACING}">
	<thead>
	<tr>
		<th class="name"><span class="rank-img">{L_RANK}&nbsp;</span><!-- IF group.U_GROUP --><a href="{group.U_GROUP}">{group.GROUP_NAME}</a><!-- ELSE -->{group.GROUP_NAME}<!-- ENDIF --></th>
		<th class="info">{L_PRIMARY_GROUP}</th>
		<!-- IF S_DISPLAY_MODERATOR_FORUMS --><th class="info">{L_MODERATOR}</th><!-- ENDIF -->
	</tr>
	</thead>
	<tbody>
<!-- BEGIN user -->
	<tr class="<!-- IF group.user.S_ROW_COUNT is even -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
		<td><!-- IF group.user.RANK_IMG --><span class="rank-img">{group.user.RANK_IMG}</span><!-- ELSE --><span class="rank-img">{group.user.RANK_TITLE}</span><!-- ENDIF -->{group.user.USERNAME_FULL}</td>
		<td class="info"><!-- IF group.user.U_GROUP -->
			<a<!-- IF group.user.GROUP_COLOR --> style="font-weight: bold; color: #{group.user.GROUP_COLOR}"<!-- ENDIF --> href="{group.user.U_GROUP}">{group.user.GROUP_NAME}</a>
			<!-- ELSE -->
				{group.user.GROUP_NAME}
			<!-- ENDIF --></td>
		<!-- IF S_DISPLAY_MODERATOR_FORUMS -->
			<td class="info"><!-- IF group.user.FORUM_OPTIONS --><select style="width: 100%;">{group.user.FORUMS}</select><!-- ELSEIF group.user.FORUMS -->{group.user.FORUMS}<!-- ELSE -->-<!-- ENDIF --></td>
		<!-- ENDIF -->
	</tr>
<!-- BEGINELSE -->
	<tr class="bg1">
		<td colspan="3"><strong>{L_NO_MEMBERS}</strong></td>
	</tr>
<!-- END user -->
	</tbody>
	</table>
	
	{$CA_BLOCK_END}
</div>
<!-- END group -->
</form>

<!-- INCLUDE jumpbox.html -->
<!-- INCLUDE overall_footer.html -->
noticed another problem im working on fixing which is when you try to delete a group it will throw a error

fixed the problem if anyone has this installed
open: includes/functions_user.php
find:

Code: Select all

	// Delete group from legend and teampage
	$legend = new phpbb_group_positions($db, 'legend');
	$legend->delete_group($group_id);
	unset($legend);
	$teampage = new phpbb_group_positions($db, 'teampage');
	$teampage->delete_group($group_id);
	unset($teampage);
replace with:

Code: Select all

	global $phpEx;
	include($phpbb_root_path . 'includes/group_positions.' . $phpEx);
	// Delete group from legend and teampage
	$legend = new phpbb_group_positions($db, 'legend');
	$legend->delete_group($group_id);
	unset($legend);
	$teampage = new phpbb_group_positions($db, 'teampage');
	$teampage->delete_group($group_id);
	unset($teampage);
zip updated github updated
formerly bprsk8r4272 Proud Kiss Portal user on phpBB 3.0.14 + 1.0.20 (build 311-020)
Image
Validated Extensions, Mods, and Styles My Mods: Smashable Christmas Lights 3.0.x Add a group to teampage 3.0.x

locoycabron
Registered User
Posts: 13
Joined: Thu Aug 04, 2011 7:58 am

Re: [RC] Add groups in team page & Legend repositioning

Post by locoycabron » Thu Aug 04, 2011 11:06 pm

Now works like a wild ponie!

Thanks a lot for all the help nice MOD good work!
You are the man :)

User avatar
Prosk8er
Registered User
Posts: 1387
Joined: Sun Mar 12, 2006 3:30 am
Location: Rochester, NY
Name: Tyler
Contact:

Re: [RC] Add groups in team page & Legend repositioning

Post by Prosk8er » Thu Aug 04, 2011 11:22 pm

locoycabron wrote:Now works like a wild ponie!

Thanks a lot for all the help nice MOD good work!
You are the man :)
yup np glad to help out the phpbb community
formerly bprsk8r4272 Proud Kiss Portal user on phpBB 3.0.14 + 1.0.20 (build 311-020)
Image
Validated Extensions, Mods, and Styles My Mods: Smashable Christmas Lights 3.0.x Add a group to teampage 3.0.x

Locked

Return to “[3.0.x] Abandoned MODs”

Who is online

Users browsing this forum: Bing [Bot], open-your-eyes and 11 guests

cron