Change "Organizer" Details to "Contact" Details (Just the Word)

Home Forums Calendar Products Community Events Change "Organizer" Details to "Contact" Details (Just the Word)

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #956921
    stephenschildbach
    Participant

    My client wants the “Organizer” on the front end form in Community Events to say “Contact” instead. This would be applied to many cases. On the New Event Form is “Use New Organizer”, “Use Saved Organizer”, “My Organizers”, etc… It is represented as %s in the code. Temporarily I hacked in to the plugin and replaced “Organizer” with “Contact” in the file the-events-calendar.class.php under the free plugin: the-events-calendar in the folder: the-events-calendar > lib. I tried putting this file in my theme in tribe-events > lib and making the same changes, but that didn’t work.

    #957030
    Brian
    Member

    Hi,

    Thanks for using our plugin.

    I can help point you in the right direction on this without having to modify the core of the plugin.

    We have this guide for changing words:

    https://theeventscalendar.com/knowledgebase/changing-the-word-events-to-something-else/

    And we have our themer’s guide which can show you how to move and edit the Community Event Templates to your theme to edit there:

    https://theeventscalendar.com/knowledgebase/themers-guide/

    Let me know if you have any follow up questions.

    Thanks

    #957080
    stephenschildbach
    Participant

    Thank you for the quick reply, but unfortunately neither solutions work. 1. The function you talk about seems to only work for display to the general public. I’m needing to change a word on the community events member form “Organizers” to “Contacts”. It is a field on the form. 2. And, overwriting files seems to only work when the files are in the views folder. I tried moving the-events-calendar.class.php from the lib folder in the plugin to a lib folder in the theme and the file did not overwrite. I need further help.

    #957083
    stephenschildbach
    Participant

    The code is in the free events calendar plugin in the folder LIB. The file is the-events-calendar.class.php. The code I want to change is below:

    if ( $organizers || $my_organizers ) {
    				echo '<select class="chosen organizer-dropdown" name="' . esc_attr( $name ) . '" id="saved_organizer">';
    				echo '<option value="0">' . sprintf( __( 'Use New Contacts', 'tribe-events-calendar' ), $this->singular_organizer_label ) . '</option>';
    				if ( $my_organizers ) {
    					echo $organizers ? '<optgroup label="' . apply_filters( 'tribe_events_saved_organizers_dropdown_my_optgroup', sprintf( __( 'My Contacts', 'tribe-events-calendar' ), $this->plural_organizer_label ) ) . '">' : '';
    					echo $my_organizers_options;
    					echo $organizers ? '</optgroup>' : '';
    				}
    				if ( $organizers ) {
    					echo $my_organizers ? '<optgroup label="' . apply_filters( 'tribe_events_saved_organizers_dropdown_optgroup', sprintf( __( 'Available Contacts', 'tribe-events-calendar' ), $this->plural_organizer_label ) ) . '">' : '';
    					foreach ( $organizers as $organizer ) {
    						$organizer_title = wp_kses( get_the_title( $organizer->ID ), array() );
    						echo '<option value="' . esc_attr( $organizer->ID ) . '"';
    						selected( ( $current == $organizer->ID ) );
    						echo '>' . $organizer_title . '</option>';
    					}
    					echo $my_organizers ? '</optgroup>' : '';
    				}
    				echo '</select>';
    			} else {
    				echo '<p class="nosaved">' . sprintf( __( 'No saved %s exists.', 'tribe-events-calendar' ), strtolower( $this->singular_organizer_label ) ) . '</p>';
    			}
    #957139
    Brian
    Member

    Yep, only moving files in the view directory work. It is not possible in any plugin to just move files and have them work, php does not work that way.

    Why don’t you try moving this file to your theme to edit:

    the-events-calendar-community-events\views\community\modules\organizer.php

    There on line 20 change this:

    $organizer_label_singular = tribe_get_organizer_label_singular();

    to this:

    $organizer_label_singular = 'Contact';

    #957159
    stephenschildbach
    Participant

    You are getting closer, but the one item that still says “Organizer” is the dropdown menu found on line 40:
    <?php tribe_community_events_organizer_select_menu( $event ); ?>
    in organizer.php in the folder community > modules folder. Could I have further help with this? Thank you Brian.

    #957320
    Brian
    Member

    I got that text to change by use this in my theme’s function.php:

    https://gist.github.com/jesseeproductions/6d4a0c3ba0c936508aac

    #957421
    stephenschildbach
    Participant

    Thank you Brian for all of your attempts. I do really appreciate your help. Unfortunately, these functions are not effecting the drop down menu containing “Use Saved Organizer” and “New Organizer” and “My Organizer” in the drop down. But, let’s stop. This is not so important. I simply removed the drop down menu altogether. Entering a new contact in the input field is how most forms are configured anyway. This is not worth spending hours working on when there is a simpler solution — taking it out altogether.

    #957529
    Brian
    Member

    Ok sounds good. It is strange it worked for me and not you.

    Glad I was able to get it most of the way though.

    I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.

    Thanks

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Change "Organizer" Details to "Contact" Details (Just the Word)’ is closed to new replies.