Hello All,
I want to customize the blog module such that only admin users can create blogs. I have been able to do this by using the admin gatekeeper function. However, I do not want to show the button "Add blog post" to non-admin users since they wont be able to create blogs anyway. I will appreciate if any body can point me towards how to achieve this.
Many thanks.
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.
- Matt Beckett@Beck24

Matt Beckett - 0 likes
- iionly@iionly

iionly - 0 likes
You must log in to post replies.The function you want is elgg_is_admin_logged_in()
http://reference.elgg.org/sessions_8php.html#a53c6256e03ff06499e017c37ffc7fd3b
By coincidence I've just uploaded a plugin you might be interested in: http://community.elgg.org/plugins/1640707/1.8.0/elgg-1819-news.
It's a "News" plugin - based on the Blog plugin - that only allows admins and group owners to post news / announcements (separate from blogs). You could still use the Blog plugin to allow normal members to make blog postings. Or you could take a look at the code of my plugin to see how the restriction to admin postings only is done. If you want to disallow group owners (who are no admins) to make postings you would need to make some additional modifications though.