Topic RSS
11:27 am
26 September, 2009
OfflineRight now when a subscriber logs into my site to view or update their profile, they can see the "Sermons" button on the left navigation menu along with the help submenu. Is it possible to change the permissions so that this button does NOT show to subscribers?
If you can give me the code to change, I can edit the php file. Thanks.
12:47 am
14 December, 2005
OfflineThe code you need is in the sb_add_pages function in sermon.php (around line 291).
The fourth parameter of add_submenu_page describes the level of permissions required to show the menu. You'll see the help menu is set to 'read'. It would perhaps be more logical for it to be 'edit_posts', which is essentially 'Contributor'.
Markp,
I'm sure that you have already figured it out, but I thought that I would post what I ended up doing for those who are still working on it.
This may not be a fix for everyone, but it worked for me.
/**
* Add Sermons menu and sub-menus in admin
*/
function sb_add_pages() {
global $sermon_domain;
add_menu_page(__('Sermons', $sermon_domain), __('Sermons', $sermon_domain), 'publish_posts', __FILE__, 'sb_manage_sermons', SB_PLUGIN_URL.'/sb-includes/sb-icon.png');
I changed the bolded section to publish_posts instead of edit_posts. This enabled an Author or above to work with the sermon plug-in but not the contributor or subscriber.
I hope this helps and doesn't mess up anything for others.
Nick
EDIT: This did not remove the Sermon menu from the side menu, but it did remove the permissions to edit/view/delete sermons.
Most Users Ever Online: 40
Currently Online: 0be1
14 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
malpan - 2453
jogen - 2440
VanWatterson - 652
GeraldSebring - 364
LucasWoltman - 362
RandellFeenstra - 362
Member Stats:
There have been 7 guest posters
There are 1936 members
There are 1 moderators
There are 1 admins
Forum Stats:
Groups: 1
Forums: 2
Topics: 971
Posts: 3747
Newest Members: twinton, ellison13579, Daigh, mchunful, jesua, LGRG Design
Moderators: Ben Miller (383 )
Administrators: Mark Barnes (425)
Log In
Register
Home



