I'm trying to override the core engine/lib/access.php with a plugin. I get an error message resulting from code in my start.php. Here my start.php:
function nopublic_init() {
// Extend system CSS with our own styles
extend_view('css','nopublic/css');
// Replace the default index page
register_plugin_hook('access_list','system','new_access_list');
}
function new_access_list() {
if (!@include_once(dirname(dirname(__FILE__))) . "/nopublic/access.php") return false;
return true;
}
// Make sure the plugin has been registered
register_elgg_event_handler('init','system','nopublic_init');
What am I doing wrong?
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 evan
thanks for the quick reply.
My problem was that annotations that i coded myself only were visible to the user that posted this comment. That was due to some access restrictions in the function mentioned above. here's my new function:
for my own comment, here's some of the code i used:
the problem was in myplugin/views/river/comment (copied from other plugins)
as mentioned above: due to access restriction only the annotation owned by $_SESSION['user'] are displayed.
Do you have any advise how to accomplish that without changing the core?
Create the annotation with public access. See create_annotation().
cool, that's what I was looking for!
thanks a lot!
- Previous
- 1
- 2
- Next
You must log in to post replies.