• Resolved Mudplugger

    (@mudplugger)


    A Few people including me have asked the plugin author if this is possible and while it is not a feature of the plugin itself I have a work around that enables the requested functionality.

    This information is supplied as is and does not come with any warranty. Basically the information here allows for a greater level of control over which users of your site can add events to the Spider Calendar Plugin. If you are in any doubt as to what you are doing you might not want to attempt these changes but in the very least back-up your site before you try.

    Step 1
    Download and install the Advanced Access Manager Plugin.

    Step 2
    In the WP-Content\Plugins folder of your WP site find the spider-event-calendar folder. Within this folder you are going to edit the following files.

    • Calendar_functions.html.php
    • calendar_functions.php
    • preview.php
    • preview_widget.php
    • Theme_function.html.php
    • Theme_functions.php
    • widget_Themes_function.html.php
    • widget_Theme_functions.php

    In each of these files locate the line If (!current_user_can('manage_options')) { and change it to If (!current_user_can('edit_posts')) {

    This will allow users of Contributor level and above the ability to use the calendar plugin functionality.

    Step 3
    In the same spider-event-calendar Plugin folder edit the folowing file.

    • calendar.php

    Locate the function call for add_menu_page (At the time of writing it is on line 465 of the file). Review the arguments supplied to this function and you will find the ‘manage_options’ capability check is here as well. Once again change ‘manage_options’ to ‘edit_posts.

    Repeat this change for the next 7 lines (466 through 473) which create the submenu items using the function add_submenu_page.

    This will allow anyone of Contributor level and above to see the calendar menu in their dashboard admin menu bar.

    Step 4
    Now Use the AAM plugin to restrict those menu items which you feel are not appropriate for your contributors to have access to. i.e. change theme, uninstall etc.

    If you have followed this correctly you should now find that contributors and above can use the plugin.

    You can restrict or allow the plugin to a wider or narrower group by reviewing the capabilities section of the WP codex and selecting a capability appropriate to the role you want to have access. In this example I have used ‘edit_posts’ which is available to contributors and above, but you could use any other role that allows the level of access you want.

    It is also possible to allow or restrict which roles can use the calendar and menu items using capabilities alone, I preferred to open the calendar up to anyone contributor level and above and use AAM to apply restrictions but you could do it without using AAM.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Making Spider Event Calendar available to users other than Admins’ is closed to new replies.