Hi, I am trying to modify the elgg plugin “Pages” and I would like to remove write access menu and set on private( so no one can edit or remove someone else’s page). Is it possible and how should I proceed?
thank you in advance
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.
What version of elgg are you using. Let me see if i can help
it's 1.8.
Hi,
I've managed to remove the pulldown menu “write access” but I can not remove the title or label that is attached to this menu. I also do not know how to set access on private because default write access is public. please help!!
I have only modified the code in: mod/page/views/default/input/ write_access
You can remove the form elements by overwriting the form view - create your replacement view in the same directory structure as the original, just in your plugin. eg. if the original is at mod/pages/views/default/forms/pages/add.php you would create a modified version at mod/<myplugin>/views/default/forms/pages/add.php
Secondly, you can hook into the action where the page is saved and hard code the write access.
Note that this isn't copy/paste code, it's an example. You'll have to look to find the real location of the view, name of the action, and name of the input variable.
So I should not directly modify the code of the plugin ‘page’, but create a new plugin (with another name) and hook into the page. is it valid for all other modifications I intend to do to this plugin?And if it's not to mutch to ask,could you explain it a little bit more to me.
You are correct, you shouldn't modify the pages plugin directly: http://docs.elgg.org/wiki/Dont_Modify_Core
If you didn't understand the above description then you probably need to familiarize yourself with Elgg views and actions
http://docs.elgg.org/wiki/Engine/Views
http://docs.elgg.org/wiki/Actions
http://docs.elgg.org/wiki/Extending_actions
ok,thanks.