News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Group Moderators 1.4

Started by Dannii, July 25, 2005, 04:24:08 PM

Previous topic - Next topic

Dannii

The uninstall file is outdated, and was only for use after the package manager anyways.

And it should support 1.1.7 already!
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Kinesthesia

I was a little concerned when I hit "Apply Mod" and saw:

!!
Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
Installation Readme
Install Group Moderators version 1.4

Written by Eldacar Labs - [email protected]
Copyright 2006 - Please see licence.txt for details.

SMF Mods page: http://mods.simplemachines.org/index.php?mod=171
Project home: http://code.google.com/p/smfgroups/
Support: http://www.simplemachines.org/community/index.php?topic=43396

This mod will allow you to add Group Moderators: members of your forum who have control of the specific groups you set them over. They can add and remove members from only these specific groups. Essential for large forums with multiple private boards and groups.

Install Actions
Installations actions for "Group Moderators":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Execute Modification    ./index.php    Test successful
2.    Execute Modification    ./Sources/ManageMembergroups.php    Test successful
3.    Execute Modification    ./Sources/ManagePermissions.php    Test successful
4.    Execute Modification    ./Themes/default/index.template.php    Test failed
5.    Execute Modification    ./Themes/default/../babylon/index.template.php    Test successful
6.    Execute Modification    ./Themes/default/ManageMembergroups.template.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
8.    Execute Modification    ./Themes/default/languages/Modifications.swedish.php    Skipping file
9.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful
10.    Execute Modification    ./Themes/default/languages/Help.swedish.php    Skipping file
11.    Extract File    ./Sources/Groups.php    
12.    Extract File    ./Themes/default/Groups.template.php    
13.    Extract File    ./Themes/default/languages/Groups.english.php    
14.    Extract File    ./Themes/default/languages/Groups.swedish.php    
15.    Extract Tree    ./Themes/default/../babylon/images    
16.    Execute Code    GroupMods_install.php

Dannii

That just means the menu button won't get added. You can go ahead and add the button manually, or just access it by URL (action=groups).
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

heavyccasey

#603
Adding members requires their log-in name, not their display name. So people won't be able to add members who've changed their names unless they know their original.

It's probably at Groups.php, find:

$request = db_query("
SELECT ID_MEMBER, ID_GROUP, additionalGroups
FROM {$db_prefix}members
WHERE memberName IN ('" . implode("', '", $memberQuery) . "')", __FILE__, __LINE__);

and change "memberName" to "realName" or something like that.

EDIT: It worked.

I think the groups interface should only be visible if you actually have a group to moderate.

Dannii

Well the visibility is based on a permission. I had orginally planned on having extra features for non moderators, like requesting group membership etc.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

heavyccasey

Oh, is that on your to-do list? Because that would be a great feature to have. Take your time :)

Dannii

I haven't been working on this mod in years sorry. You're free to do so though!
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Kinesthesia

Quote from: Dannii on January 10, 2009, 10:08:07 PM
That just means the menu button won't get added. You can go ahead and add the button manually, or just access it by URL (action=groups).

Forgive me, but I do not know how to do either of these things.  Can anyone explain exactly how to add the button manually ?  Or alternately exactly what the url would be ?

I tried forum/Sources/Groups.php and got an Internal Server Error.

redone

As for the question on the button as Danni mentioned you can do two things with this:

1. type the url manually and it would look like this:(your url)/index.php?action=groups
2. look at your current index.template.php file

Find
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))


Replace with
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'groups')))


Find the following
// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
</td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Add this before
// View Groups Interface... [groups]
if (allowedTo('view_groups'))
echo ($current_action == 'groups' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'groups' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=groups">' , $txt['elgm4'] , '</a>
</td>' , $current_action == 'groups' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

redone

Quote from: Kinesthesia on January 09, 2009, 09:30:43 AM
Any chance of this mod being updated for 1.1.7 ?
This modification installs just fine for 1.1.7 actually. The only issues you may have are if you have other mods installed which is the same for any mod.

;)

heavyccasey

Quote from: Dannii on January 11, 2009, 06:16:24 AM
I haven't been working on this mod in years sorry. You're free to do so though!
Here's a quick hack to hide the button if they don't actually moderate any groups:

Load.php
Find:
function loadPermissions()
{
global $user_info$db_prefix$board$board_info$modSettings;


Replace:
function loadPermissions()
{
global $user_info$db_prefix$board$board_info$modSettings$ID_MEMBER;


Find:
if (isset($cache_groups) && !empty($board) && $modSettings['cache_enable'] >= 2)
cache_put_data('permissions:' $cache_groups ':' $board, array($user_info['permissions'], null), 240);


Add before:
// Do they have a group mod permissions?
if ($key array_search('view_groups'$user_info['permissions'])) {
$request db_query("
SELECT count(ID_MEMBER) 
FROM `
{$db_prefix}groupmods` 
WHERE ID_MEMBER = 
$ID_MEMBER");
$count mysql_fetch_row($request);

if ($count[0] < 1) {
unset($user_info['permissions'][$key]);
}

mysql_free_result($request);
}

Dannii

"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Kinesthesia

I haven't tried editing any code yet, but I did some testing with the url and I just want to say thank you for developing this mod and for all the assistance getting it working (getting me to understand).  It has taken a huge load off of my shoulders.

forepro

Hi

I saw in the changelog the latest version is 1.5 but in mod site it looks like v.1.4. Did I miss anything?

Thanks for the mod!  :)

Dannii

I had only started 1.5 and never finished or released it.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

kenrank

This Mod is exactly what we need!

But...!   (there's always a "but"   lol)

When I tried to install from the Package Mgr, it gives me:
The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

When I downloaded the package and try to install from Package Mgr's upload, I get:
The package you tried to upload either is not a valid package or has become corrupted.

We're running SMF 1.1.8
Can you think of any reason I'm getting these errors?

Thanks in advance!

Dannii

There could be lots of reasons. Check you error logs.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

kenrank

OK.  I checked both the error log from cPanel as well as the Forum Error Log and there are no errors at all related to this!

The only errors in there are from a few days ago and, if it helps, the error is:

Ken Rank       April 14, 2009, 04:53:42 PM
74.234.158.42���      
http://discoverhebrewroots.com/index.php?action=smileys;sa=editsmileys
Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LENGTH(code) DESC' at line 2
File: /home/dhr/public_html/Sources/ManageSmileys.php
Line: 654
   
Ken Rank    April 14, 2009, 04:51:45 PM
74.234.158.42���      
http://discoverhebrewroots.com/index.php?action=smileys;sa=addsmiley
No code for this smiley was given.

Dannii

There's probably a problem with permissions. Try asking for help in the smf help boards, as I don't have the time to support this mod anymore sorry.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

den2

Quote from: Lynx123 on June 15, 2008, 12:39:07 AM
Hey guys when i try to add a new group i get this this error.

Field 'GroupModOptions' doesn't have a default value
File: C:\vg\Sources\ManageMembergroups.php
Line: 255

I am using SMF 1.1.5

Help is appreciated

same problem.. I cant uninstall

Advertisement: