I want only the admin to create groups, how do I acheive this?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
Hi, I also looking for the same solution, but everything that discussed above were not working for me. I am using version 1.7.10.
As I seen on this community, their is not 'create a new group' section so this is practically achievable. Anybody know how the development team did this? Perhaps, the admin for this community can disclose the solution?
Quick solution : in the mod/groups/new.php change gatekeeper(); to admin_gatekeeper ();
For a better solution, use the above code and try to troubleshoot it, if its not working.
Hi,
Thanks Webgalll
I am now able to prevent the non-admin user to create a group by using the solution above. The problem now is that I can't hide the 'create a new group' option on the menu for the regular user.
I had tried the solution that gnyma given, but it seem doesn't work for me.
Ok, I figure it out how to hide 'create a new group' on the page.
gnyma's solution is for the 'pg/groups/all/' page which is located at mod/groups/start.php.
But there are other page that shows the 'create a new group' in 'pg/groups/all/' page. So to hide the option in this page, goto mod/groups/views/default/groups/side_menu.php
change the code like below:
<div class="sidebarBox">
<div id="owner_block_submenu"><ul>
<?php
if(isloggedin()){
echo "<li><a href=\"{$vars['url']}pg/groups/member/{$_SESSION['user']->username}\">". elgg_echo('groups:yours') ."</a></li>";
echo "<li><a href=\"{$vars['url']}pg/groups/invitations/{$_SESSION['user']->username}\">". elgg_echo('groups:invitations') ."</a></li>";
}
if(isadminloggedin()){
echo "<li><a href=\"{$vars['url']}pg/groups/new/\">". elgg_echo('groups:new') ."</a></li>";
}
?>
</ul></div></div>
That's all.
- Previous
- 1
- 2
- Next
You must log in to post replies.