WordPress.org

Ready to get started?Download WordPress

Forums

creating custom capability with role manager fails (7 posts)

  1. psychomachine
    Member
    Posted 6 years ago #

    hi
    i am using wp 2.3.3 with the latest available version of role manager plugin. i am trying to create a castom capability, but when i submit it, using the appropriate form on the manage capabilities page, nothing happens.

    the new capability does not show up in the section "unused capabilities" nor on the role page.

    has anybody successfully created custom capabilities using this plugin with 2.3.3?

    all best,
    tench

  2. ClaytonJames
    Member
    Posted 6 years ago #

    I am using WP 2.3.3 and the Role Manager plugin (version 2.0.9). I have not had the need to create a new role for some time, but I just went and tested it. I created the new role, hit the create button and it appeared at the bottom of the existing roles. I then set the user level to my desired number, created a new user account and assigned it to the new role. I then logged in as the new user, and all was working as expected. I could not duplicate your concern. I will upgrade to Roll Manager version 2.2.1, and see if my results are any different.

  3. ClaytonJames
    Member
    Posted 6 years ago #

    I just updated to Roll Manager version 2.2.1 and repeated the steps outlined above. I can not duplicate the concern. The latest version of the plugin is functioning properly for me on WordPress 2.3.3. Perhaps you have a confilcting plugin. Time for some "process of elimination" it seems.

    I'm sorry I could not be of assistance.
    Best of luck.

    Cj

  4. psychomachine
    Member
    Posted 6 years ago #

    thanks a lot clayton -- your're probably right, must be another plugin. the thing is, it's not practical for me to turn off the plugins, because i need them all. and i can't afford to turn them off sporadically in the future -- when the site goes live, because i will also need to ocasionally add new capabilities.

    so the solution is really to manually add a new capability in wp_options. i'm also interested in figuring this out for the heck of it, but my attempt so far has not been successful.

    i was wondering if somebody could help me with the format of IWG_RoleMan_CapList., clearly i's are ids so some_new_capability should get the i:55. but i can't figure out what s's are. Any idea?

    a:44:{i:0;s:21:"access_on_maintenance";i:1;s:16:"activate_plugins";i:2;s:15:"configure_gengo";i:3;s:12:"create_users";i:4;s:16:"delete_languages";i:5;s:19:"delete_others_pages";i:6;s:19:"delete_others_posts";i:7;s:12:"delete_pages";i:8;s:12:"delete_posts";i:9;s:20:"delete_private_pages";i:10;s:20:"delete_private_posts";i:11;s:22:"delete_published_pages";i:12;s:22:"delete_published_posts";i:13;s:12:"delete_users";i:14;s:10:"edit_files";i:15;s:17:"edit_others_pages";i:16;s:17:"edit_others_posts";i:17;s:10:"edit_pages";i:18;s:12:"edit_plugins";i:19;s:10:"edit_posts";i:20;s:18:"edit_private_pages";i:21;s:18:"edit_private_posts";i:22;s:20:"edit_published_pages";i:23;s:20:"edit_published_posts";i:24;s:11:"edit_themes";i:25;s:10:"edit_users";i:26;s:6:"import";i:38;s:17:"manage_categories";i:39;s:12:"manage_links";i:40;s:14:"manage_options";i:41;s:17:"moderate_comments";i:42;s:23:"modify_gengo_exclusions";i:43;s:21:"modify_gengo_settings";i:44;s:13:"publish_pages";i:45;s:13:"publish_posts";i:46;s:4:"read";i:47;s:18:"read_private_pages";i:48;s:18:"read_private_posts";i:49;s:25:"set_blog_default_language";i:50;s:13:"switch_themes";i:51;s:15:"unfiltered_html";i:52;s:17:"unfiltered_upload";i:53;s:15:"uninstall_gengo";i:54;s:12:"upload_files";}

  5. rdobes
    Member
    Posted 6 years ago #

    I think you two are talking about 2 different things. CJ, you might have misunderstood his question. Psychomachine is asking about capabilities while you were testing roles.

    Anyway I could create custom capabilities without a problem on WP 2.1 with role manager 2.2.1. They show just fine and I can assign them to roles.

    The only question I have is how do I add a capability to a particular role so they can use installed plugin (AdServe)?
    Can it be done?

  6. nopuck4you
    Member
    Posted 6 years ago #

    I'm having the same problem with adding custom capabilities. I type in a name, hit submit and nothing happens. It goes back to the capabilities page without creating one.

    Here are the WP settings:


    WordPress-Version : 2.5.1
    WordPress-Db-Version : 7796
    Role-Manager-Version : 02.02.02 (131586)
    PHP-Version : 5.2.5

  7. superdude
    Member
    Posted 6 years ago #

    Hello, i can create a custom capability, and assign it to a role no problem. Now i am trying to do the following And it doesnt work, can anyone help, how do i access this custom capability. Basically what i want to do is check if a user has that capability assigned to him or not, and then i am going to use if else statements like below to set a value depending on whether he have access or not and return that value somewhere else and do whatever i like with it, has anyone done this? I have search far and wide, no luck :(.

    if ( current_user_can('Hbpediapublisher') )
    {
    $myHbPediaLevel = "12";
    }
    elseif( current_user_can('Hbpediaeditor') )
    {
    $myHbPediaLevel = "11";
    }
    ?>
    </p>
    </form>

Topic Closed

This topic has been closed to new replies.

About this Topic