Groupleader needed

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28508
Joined: Sat Aug 16, 2003 7:36 am

Groupleader needed

Post by Extensions Robot »

Modification name: Groupleader needed
Author: vindex
Modification description: Displays the number of pending members for all groups the user is leader of next to the User Control Panel link on the index page of the forum
Modification version: 1.0.1
Tested on phpBB version: 3.0.4

Download file: groupleader_needed.zip
File size: 34.01 KiB

Modification overview page: View

The phpBB Team is not responsible nor required to provide support for this modification. By installing this MOD, you acknowledge that the phpBB Support Team or phpBB Extension Customisations Team may not be able to provide support.

-->Modification support<--
Last edited by Extensions Robot on Mon Sep 14, 2020 12:37 pm, edited 11 times in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 26731
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Groupleader needed

Post by Paul »

Modification validated/released

Notes:
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development
User avatar
vindex
Registered User
Posts: 38
Joined: Tue Feb 12, 2008 1:56 pm

Groupleader needed

Post by vindex »

This post has been reserved for the MOD author.
User avatar
RMcGirr83
Former Team Member
Posts: 21472
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Groupleader needed

Post by RMcGirr83 »

Congrats vindex!!

Something in your mod looks vaguely familiar. ;)
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
User avatar
vindex
Registered User
Posts: 38
Joined: Tue Feb 12, 2008 1:56 pm

Re: Groupleader needed

Post by vindex »

yes, thank you! Your mod was my model ;)
And I mentioned you in my author-notes :D
Kharon
Registered User
Posts: 235
Joined: Thu Oct 26, 2006 5:27 pm

Re: Groupleader needed

Post by Kharon »

very nice mod .. some error ..

I do not approve members ..I am deleting members ..

thanks for reply
sorry my english

/ucp.php?i=groups&mode=manage&action=list_pending&confirm_key=

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_groups.php on line 1023: Undefined variable: group_row
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_groups.php on line 1023: Undefined variable: group_row

ucp/ucp_groups.php on line 1023:

Code: Select all

$group_row['group_name'] = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
User avatar
vindex
Registered User
Posts: 38
Joined: Tue Feb 12, 2008 1:56 pm

Re: Groupleader needed

Post by vindex »

the variable $group_row is defined before, it has nothing to do with my mod.

You should get the same error with almost every group-action you do if $group_row is not defined =/
User avatar
Eragon
Registered User
Posts: 218
Joined: Tue Oct 07, 2008 1:57 pm

Re: Groupleader needed

Post by Eragon »

I installed this modification to pure phpbb 3.0.4

When I delete a member (I do not approve, and delete members) .. it is not working

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_groups.php on line 1023: Undefined variable: group_row
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_groups.php on line 1023: Undefined variable: group_row
ucp_groups.php on line 1023:

Code: Select all

$group_row['group_name'] = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
usergroups - manage groups - remove member from group
User avatar
RMcGirr83
Former Team Member
Posts: 21472
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr

Re: Groupleader needed

Post by RMcGirr83 »

Eragon wrote:I installed this modification to pure phpbb 3.0.4

When I delete a member (I do not approve, and delete members) .. it is not working

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_groups.php on line 1023: Undefined variable: group_row
[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_groups.php on line 1023: Undefined variable: group_row
ucp_groups.php on line 1023:

Code: Select all

$group_row['group_name'] = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
usergroups - manage groups - remove member from group
$group_row is not defined within your code vindex, probably should be something like this

Code: Select all

$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] :
...but, again $group_row is still not defined for the GROUP_SPECIAL declaration.

FWIW, under "manage" these two are defined

Code: Select all

					$group_name = $group_row['group_name'];
					$group_type = $group_row['group_type'];
which I believe is all you need?
Appreciate the extensions/mods/support then buy me a beerImage
Former Modifications/Extensions Team Member | My extensions | github | All requests for support via PM will be ignored
User avatar
vindex
Registered User
Posts: 38
Joined: Tue Feb 12, 2008 1:56 pm

Re: Groupleader needed

Post by vindex »

uhm.. Sorry guys, that happens when you copy stuff from other functions.

I am actually wondering why it worked on my forum, now I understand that bug..

Well, this should solve it:

OPEN /includes/ucp/ucp_groups.php

FIND

Code: Select all

									$user_id[$group_count]	= array();				//each group gets one array filled with the UserIDs
ADD AFTER

Code: Select all

									$sql = 'SELECT group_name, group_type
											FROM ' . GROUPS_TABLE . '
											WHERE group_id = ' . $current_group_id;
									$result = $db->sql_query($sql);
									$result = $db->sql_fetchrow($result);
									$group_name[$group_count] = ($result['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $result['group_name']] : $result['group_name'];

FIND and REMOVE

Code: Select all

								$group_row['group_name'] = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];


								if (!$group_id)
								{
									trigger_error($user->lang['NO_GROUP'] . $return_page);
								}
Please be sensitive about the tabs on removing! this code is also in other parts of the php-file, but with less tabs!
Make sure you only delete it from the "case 'deleteusers_multigroups'"-part!

FIND

Code: Select all

								$error = group_user_del($group_id[$x], $user_id[$x], false, $group_row['group_name']);
REPLACE WITH

Code: Select all

								$error = group_user_del($group_id[$x], $user_id[$x], false, $group_name[$x]);
User avatar
vindex
Registered User
Posts: 38
Joined: Tue Feb 12, 2008 1:56 pm

Re: Groupleader needed

Post by vindex »

EDITED: of course it has to be group_type that is being compared with GROUP_SPECIAL !!

update is on its way
User avatar
Eragon
Registered User
Posts: 218
Joined: Tue Oct 07, 2008 1:57 pm

Re: Groupleader needed

Post by Eragon »

I did your solution .. but it is not working ( http://www.phpbb.com/community/viewtopi ... 5#p9548315 )

my problem link ( http://www.phpbb.com/community/viewtopi ... 5#p9546945 )

Code: Select all

[phpBB Debug] PHP Notice: in file /includes/ucp/ucp_groups.php on line 1033: Undefined variable: group_name
ucp_groups.php on line 1033:

Code: Select all

 $error = group_user_del($group_id[$x], $user_id[$x], false, $group_name[$x]);

thanks for reply
User avatar
vindex
Registered User
Posts: 38
Joined: Tue Feb 12, 2008 1:56 pm

Re: Groupleader needed

Post by vindex »

uhm.. try this:

FIND

Code: Select all

					case 'deleteusers_multigroups':

						$user->add_lang(array('acp/groups', 'acp/common'));

						if (confirm_box(true))
						{
							$marked				= $_POST['mark'];
							$current_group_id	= -1;
							$group_id			= array();
							$user_id			= array();
							$group_count		= 0;
ADD AFTER

Code: Select all

							$group_name			= array();

If this does not help, please post the whole "deleteusers_multigroup"-case here, from

Code: Select all

					case 'deleteusers_multigroups':
to the next

Code: Select all

					break;
User avatar
Eragon
Registered User
Posts: 218
Joined: Tue Oct 07, 2008 1:57 pm

Re: Groupleader needed

Post by Eragon »

I did make a mistake ..I was doing wrong correction :?

this link is working ,
http://www.phpbb.com/community/viewtopi ... 5#p9548315


thanks vindex
sorry my poor english
User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 17314
Joined: Thu Jan 06, 2005 1:30 pm
Location: Fishkill, NY
Name: David Colón
Contact:

Groupleader needed

Post by DavidIQ »

MOD Updated to version 1.0.1
See first post for Download Link
Apply to become a Jr. Extension Validator
My extensions | In need of phpBB services? | Was I helpful today?
No unsolicited PMs unless you're planning on asking for paid help.
Locked

Return to “[3.0.x] MOD Database Releases”