Home › Forums › Calendar Products › Community Events › Only Display a User's Organizers and Venues (Redux)
- This topic has 11 replies, 3 voices, and was last updated 10 years, 2 months ago by
Support Droid.
-
AuthorPosts
-
January 12, 2016 at 9:26 am #1054691
Mad Dog
ParticipantAbout six months ago I asked about this and even added votes to a “Suggest a Feature.” I’m hoping something has changed or someone has a way to do this:
It’s confusing to Users to see all venues and organizers in their dropdown when creating a new Event. Even though theirs are listed first, some people get confused….not to mention they don’t need to see anyone else’s Organizers or Events. Is there any way to limit this so users only see their own Organizers and Venues? It seems odd to me that it would be any other way anyway!
THANKS
Mad DogJanuary 12, 2016 at 3:15 pm #1054889Hunter
ModeratorHey Mad Dog,
Welcome back 🙂
I completely understand where you’re coming from. Unfortunately, not much has changed in the dropdown capabilities on the Submit an event page. Admittedly, the Venue dropdown is not as in-depth as it probably could be because it isn’t able to be filtered with a function. This means it comes down to building a replacement dropdown which would be a fairly advanced level of customization.
I apologize I can’t give you an easier solution to going about accomplishing what you describe! Thanks for understanding and if you have any more questions or concerns, feel free to open a new thread.
January 13, 2016 at 2:20 pm #1055586Mad Dog
ParticipantCan you tell me what file creates this dropdown? I know it’s not good form to change a core file that I can’t put in a new theme directory (updates and all that) but if I could just attach a class to “My Venues” and another class to “Available Venues” I could use display:none for the second class or at least change the appearance so My Venues stands out.
MD
January 15, 2016 at 8:56 am #1056682Hunter
ModeratorMD,
I’d be happy to point you in the right direction. Check out plugins/the-events-calendar-community-events/src/views/community/modules/venue.php. It looks like you’ll need to explore the Technical Docs, more specifically tribe_community_events_venue_select_menu.
Good luck with it and thanks again for adding it to the UserVoice! Have a great weekend, Mad Dog 🙂
January 15, 2016 at 11:37 am #1056761Mad Dog
ParticipantThanks for the head start. Do you know in which file(s) the Organizer and Venue selects are actually “constructed”?
THANKS
January 20, 2016 at 4:09 pm #1059505Mad Dog
ParticipantHi…still hoping you can point me to the file that actually “builds” the drop-down selector.
Thanks!
January 25, 2016 at 11:27 am #1062042Hunter
ModeratorHey Mad Dog,
Apologies for the delay on getting back to you. The relevant code you’ll need to look into is located in plugins/the-events-calendar/src/admin-views/events-meta-box.php.
Good luck in achieving the desired functionality and thanks for choosing PRO! Have a great week 🙂
January 26, 2016 at 4:33 pm #1062778Mad Dog
ParticipantI’m not seeing any code in that file that will form an Organization or Venue dropdown menu. I’m looking for where that dropdown is actually created hoping I can assign a class to the options that aren’t owned by the logged in user.
Am I missing that somewhere in the file?
THANKS
January 27, 2016 at 3:55 pm #1063441Hunter
ModeratorWelcome back,
It looks like you’ll need to explore the-events-calendar/src/admin-views/venue-meta-box.php.
I wish I could provide more support, however, these types of customizations extend beyond the scope I’m able to provide through the forums. Keep your eyes peeled to the new release changelogs; hopefully it’ll be added into an upcoming version.
Good luck with everything and thanks again for choosing PRO 🙂
January 28, 2016 at 9:37 am #1063907Mad Dog
ParticipantI finally found it. It’s in
the-events-calendar\src\Tribe\Main.php. I commented out this section for venues and the similar section for organizers.if ( $venues ) { //echo $my_venues ? '<optgroup label="' . esc_attr( apply_filters( 'tribe_events_saved_venues_dropdown_optgroup', sprintf( esc_html__( 'Available %s', 'the-events-calendar' ), $this->plural_venue_label ) ) ) . '">' : ''; //foreach ( $venues as $venue ) { //$venue_title = wp_kses( get_the_title( $venue->ID ), array() ); //echo '<option data-address="' . esc_attr( $this->fullAddressString( $venue->ID ) ) . '" value="' . esc_attr( $venue->ID ) . '"'; //selected( ( $current == $venue->ID ) ); //echo '>' . $venue_title . '</option>'; //} //echo $my_venues ? '</optgroup>' : ''; } echo '</select>';I know this is bad form to do this by hacking a core file, and it will likely be overwritten with an update, but for now it works and the client is happy that Community Users won’t see everyone else’s Venues and Organizers which seems to be the way this *should* work by default.
If you see anything odd or know of any reason I shouldn’t be doing this, please let me know.
Thanks!
Mad DogJanuary 29, 2016 at 8:30 pm #1064756Hunter
ModeratorHello Mad Dog,
Thanks for sharing the solution. Don’t forget to back the customized files up before updating. I’ll close this thread out for now, but go ahead and open a new one should you have any more questions.
Have a good weekend 🙂
February 21, 2016 at 8:35 am #1079324Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Only Display a User's Organizers and Venues (Redux)’ is closed to new replies.
