Assigning Event to Another Author

Home Forums Calendar Products Community Events Assigning Event to Another Author

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1140979
    Michael Burke
    Participant

    Hi.

    A while back I started this thread: https://theeventscalendar.com/support/forums/topic/admin-on-frontend/

    When I choose to show the Author on the event screen, I do see the dropdown box near the bottom. However, when I click on the dropdown, I (myself) am the only available option to choose from the dropdown, despite having multiple users on my site.

    Can you explain why the other users are not showing up?

    Thanks
    Mike

    #1141306
    Cliff
    Member

    Hi.

    There might be some new updates available. Could you please make sure all your Modern Tribe plugins (and WordPress core) are at their latest versions?

    Once you verify you’re on the latest versions, please test to see if the issue is still happening for you.

    If it is, please follow our Testing for Conflicts Guide and see if that helps narrow down the cause of this.

    If it doesn’t, please share your System Information. That will give me a lot of extra information to help diagnose the problem.

    Let us know what you find out.

    Thanks.

    #1141388
    Michael Burke
    Participant

    Hi Cliff.

    -I updated all plugins (and core)
    -I disabled all plugins except TEC plugins
    -I switched to TwentySixteen

    The problem still persists. Then a thought occurred to me: I am using the plugin “User Role Editor” to create customer roles for my client (Volunteer, Team Coordinator, etc) instead of “Editor”, “Contributer,” etc. I tried creating a user with one of those standard roles, and it worked. Popped right up in the Author box.

    So my question is – is there some way to make TEC recognize my custom user roles? Specifically the role of “Team Coordinator” ?

    Thanks.

    #1141417
    Cliff
    Member

     

    Thank you for your excellent reply.

    Since the Add/Edit Events wp-admin screen is just like editing other Pages or Posts, the Author metabox should work the same as on those other editing pages if the user has the proper credentials.

    I’d suggest referring to this information:

    I hope that helps you determine what capabilities you need to assign to your custom roles to allow selecting them in the Author metabox when editing an Event in wp-admin.

    Please let me know how it goes for you.

    #1141507
    Michael Burke
    Participant

    Ok. Based on the suggestion of your article, I switched to the “Members Plugin”

    I have granted the customer role of “Team Coordinator” all permissions pertaining to TEC.

    Unfortunately, the user I created with this role does not show up in the Author drop down box on events. Am I doing something wrong?

    I would be happy to provide admin credentials to the site if that would help.

    #1141598
    Cliff
    Member

    Sorry you’re still having trouble.

    Did you go through the “Full list of capabilities” from our help article?

    Please provide me some screenshots of your Members setup (we try to not ever login to customers’ sites).

    Thank you.

    #1141614
    Michael Burke
    Participant

    Hi Cliff,

    I know that if I assign a user the role of “Editor” then they show up in the Author box. So, I Members plugin to clone the Editor role and called “Team Coordinator1”

    I created a user and assigned it this role, but no luck. It still doesn’t appear in the Author box. 🙁

    I’d be happy to provide screen shots, can you be more specific of what you want screen shots of?

    #1141701
    Cliff
    Member

    Please send me a screenshot of your setup in the Members plugin for the custom role you’ve created — so I can see all the permissions granted to that role.

    #1141834
    Michael Burke
    Participant

    Here you go:

    Note: it wouldnt let me upload the last screen shot, but I’ll tell you that no permissions were granted and these were the capabilities:

    update_plugins
    update_themes
    upload_files
    ure_create_capabilities
    ure_create_roles
    ure_delete_capabilities
    ure_delete_roles
    ure_edit_roles
    ure_manage_options

    #1142091
    Cliff
    Member

    Hi Michael. Thanks for all that information.

    I tried getting it to work via capabilities (similar to how you did) and couldn’t get it working either.

    I believe the author box comes from this code in WordPress core: https://github.com/WordPress/WordPress/blob/4.5.3/wp-admin/edit-form-advanced.php#L310-L313

    Anyway, here’s a code snippet that will make it so ANY registered user of any role/capability will be selectable via the Author metabox on the wp-admin edit screens (not just for Events).

    function expand_author_selection_list( array $user_args ) {
    $user_args[ 'who' ] = '';
    return $user_args;
    }
    add_filter( 'wp_dropdown_users_args', 'expand_author_selection_list' ); // https://developer.wordpress.org/reference/hooks/wp_dropdown_users_args/

    I hope this helps you get closer to what you’re wanting. If you need some coding help, you may want to ask your developer or reference our list of known customizers.

    #1142128
    Michael Burke
    Participant

    Hi Clif,

    Ok I realize you don’t want to delve deep into coding help and I completely respect that – but just a little guidance?

    This is what I did:
    I downloaded the file wp-includes/user.php to my local system
    I added the snippet of code you provided to bottom of the file
    I uploaded the file into my child-theme in a folder called ‘wp-includes’

    It had no effect so obviously I did something wrong. Can you provide any help? (by the way, I AM the developer LOL, but I’m a designer, I don’t know PHP)

    #1142183
    Cliff
    Member

    Welcome to WordPress customizing!

    Best practice for adding custom code (like to implement a PHP snippet to modify The Events Calendar) is to create a functionality plugin, unless it’s something specific to your theme, in which case best practice is to make sure you’re using a child theme, then add the customization to your child theme’s functions.php file.

    You definitely should NOT touch/copy/anything with the /wp-includes/user.php file.

    You should simply copy the code snippet I provided into either a functionality plugin or your child theme’s functions.php file.

    As always, you should consider all code you enter into your site (i.e. no guarantees from us).

    I hope this information helps!

    #1142233
    Michael Burke
    Participant

    SUCCESSSSSSSSS!

    I dropped the snippet into the functions.php file of my child theme as per your instructions. It worked.

    Cliff – thank you very much for your help and patience with this matter, it is greatly appreciated!

    #1142240
    Cliff
    Member

    Awesome! Glad to hear. Have a great evening.

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Assigning Event to Another Author’ is closed to new replies.