We have made a fix for this. I post it here in case it helps anyone.
But I warn you our version of GJ is pretty old and has been hacked for our needs. So this might work with current versions. Make Backups !
First of all look for ...
components/com_groupjive/gj/core/groups.php
This is the file that has the particular list of menu options you want to change. Specifically we wanted to take out the option to invite new members and broadcast to group unless you were Group Admin.
The code for this is in a complex block that begins with
| Code: |
<ul id="gj_list_standard_funcs">
|
What follows is quite a complex piece of code to determine what is / and what is not in the menu that is shown for any user. Thankfully there is already an if statement that determines a regular user.
| Code: |
if ( ! ismoder( $gid, $_CB_framework->myId() ) )
|
What we did was move it so that this if statemnet only affected the 'unjoin' group link - and no other part of the code.
| Code: |
if ( ! ismoder( $gid, $_CB_framework->myId() ) ) {
$actions .= '<li><a href="' . cbSef( 'index.php?option=com_groupjive&action=gj.core.members.deletemember&groupid=' . $gid . '&userid=' . $_CB_framework->myId() . '&Itemid=' . $Itemid ) . '" onclick="return confirm(\
'' . GJ_DELETE_SELF_CONFIRM . '\')">' . GJ_LEAVE_GROUP . '</a></li>';
}
|
So long as none of the other menu items are wrapped in this If statement this single change will remove the offending menu options for non-Admin's.
But I wanted to go further. Having a single front end Group Admin was not enough. We have site publishers, and if they are in the Group they should also have Group Admin rights.
Therefore head over to ... components/com_groupjive/groupjive_func.inc
In here look for the 'function ismoder' definition. It determines who is Group Admin.
Only for the 'function ismoder' change ...
| Code: |
if (!$exist==0);
return 1;
else
return 0;
}
|
to
| Code: |
// Hack start to make all site Publishers and above as Group Admin
// IF they are a member of the Group ;
$user =& JFactory::getUser();
if ((!$exist==0) or ("{$user->gid}" > 20))
return 1;
else
return 0;
}
|
Like I said - use at your discretion and make backups beforehand.
Enjoy
