Hi all :)
any ideas on how to limit the pages creation to just admins (so non-admins, regular users cannot create pages?)
i am trying to make pages and groups admin onl, I got group mderation with Leo de Carvalho's
Group access plugin ((http://community.elgg.org/mod/community_plugins/read.php?guid=504214)
But now Im trying with pages, not moderation but completely block/disable user creation
I think adding this helps, but not sure where to add :P in actions.php of pages ?
or may not I amay be totally wrong ..
// block non-admin users
admin_gatekeeper ();
action_gatekeeper ();
$guid = get_input ( 'guid' );
$obj = get_entity ( $guid );
Can anyone help me out :)
HaPPy ElGGInG :)
Do GooD :)
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.
- Trajan@Trajan
Trajan - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- Trajan@Trajan
Trajan - 0 likes
- jaxcatz@jaxcatz
jaxcatz - 0 likes
- jaxcatz@jaxcatz
jaxcatz - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- Trajan@Trajan
Trajan - 0 likes
- Georges Gillard@gillardg
Georges Gillard - 0 likes
You must log in to post replies.admin_gatekeeper ();
There are two ways of doing this.
1) use the gatekeeper in the form file of pages
2) hide the sidebar link to create a new page from any user who isn't an admin
不用擔心這 .. 賈克斯是我的朋友我給他這個已經重新
LOLZ ;-)
D , nice Chinese, shame google translator can't deal with syntax properly. LOL
@ D我问疑虑
思维
答案在这里
帮助他人
寻找相同的答案 :)
@Trajan
Here ?
1) use the gatekeeper in the form file of pages
$new_page = false;
if (!$vars['entity']) {
$new_page = true;
// bootstrap the access permissions in the entity array so we can use defaults
if (defined('ACCESS_DEFAULT')) {
$vars['entity']->access_id = ACCESS_DEFAULT;
$vars['entity']->write_access_id = ACCESS_DEFAULT;
} else {
$vars['entity']->access_id = 0;
$vars['entity']->write_access_id = 0;
2) hide the sidebar link to create a new page from any user who isn't an admin
How :(
Anyone knows the solution ??? :)
@Jax EMail SkypE me dumkopf ;-) hum hai tumhara Elgg ke liye code walla guru..
skype the master...saves me time....
mod/pages/new.php
line 13 change gatekeeper();
to admin_gatekeeper ();
that should do the trick :)
you should also look at the edit.php as limiting creation to admin is nice but if common people can edit the page it'll be funny:)
knowledge is the only thing that grows when you share it !!!