Customization/Feature Questions

Home Forums Calendar Products Filter Bar Customization/Feature Questions

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1296605
    Daniel
    Participant

    Hi,

    Above the customized filters is the bar with date, search and near. We haven’t been able to identify how the near is set-up. Is it based on location by zip, by name, by country, etc.

    Another question is when they sort by say state, if nothing is in there state, is there a way to have it show the nearest event to that state versus displaying “no result.”

    Can we modify the generic “no result” message that appears when no results are generated – though this may be solved by the above question.

    Thanks 🙂 Loving the capabilities thus far!

    Daniel

    #1297627
    Cliff
    Member

    Hi, Daniel.

    We call this the Tribe Bar.

    The Near search box comes from PRO: /wp-content/plugins/events-calendar-pro/src/Tribe/Geo_Loc.php and other files.

    Unfortunately, each of your questions is in the customization realm. I think pointing you to look to PRO is about as much as I can help toward these questions.

    Also, the “No results…” messaging is different per view (Month, List, etc.) and therefore would be a bit of a customization as well.

    If you need some coding help, you may want to ask your developer or reference our documentation and list of known customizers.

    Please let me know if you have any follow-up questions on this topic.

    #1298414
    Daniel
    Participant

    Ok – in regards to this though, what exactly is near meant to search by? Or is this again based upon the view.

    Also, how do we go about changing the label? I have found a few threads but they’re older and don’t appear to be working at this point in time (I could be referencing the wrong ones). We want to change ‘Date’ to ‘Application Deadline’.

    Thanks!

    #1298418
    Daniel
    Participant

    * Set up the date search in the tribe events bar.
    *
    * @param array $filters The current filters in the bar array.
    *
    * @return array The modified filters array.
    */
    public function setup_date_search_in_bar( $filters ) {
    global $wp_query;
    $value = apply_filters( ‘tribe-events-bar-date-search-default-value’, ” );
    if ( ! empty( $_REQUEST[‘tribe-bar-date’] ) ) {
    $value = $_REQUEST[‘tribe-bar-date’];
    }
    $caption = esc_html__( ‘Application Deadline’, ‘the-events-calendar’ );
    if ( tribe_is_month() ) {
    $caption = sprintf( esc_html__( ‘%s In’, ‘the-events-calendar’ ), $this->plural_event_label );
    } elseif ( tribe_is_list_view() ) {
    $caption = sprintf( esc_html__( ‘%s From’, ‘the-events-calendar’ ), $this->plural_event_label );
    } elseif ( tribe_is_day() ) {
    $caption = esc_html__( ‘Day Of’, ‘the-events-calendar’ );
    $value = date( Tribe__Date_Utils::DBDATEFORMAT, strtotime( $wp_query->query_vars[‘eventDate’] ) );
    }
    $caption = apply_filters( ‘tribe_bar_datepicker_caption’, $caption );
    $filters[‘tribe-bar-date’] = array(
    ‘name’ => ‘tribe-bar-date’,
    ‘caption’ => $caption,
    ‘html’ => ‘<input type=”text” name=”tribe-bar-date” style=”position: relative;” id=”tribe-bar-date” value=”‘ . esc_attr( $value ) . ‘” placeholder=”‘ . esc_attr__( ‘Date’, ‘the-events-calendar’ ) . ‘”><input type=”hidden” name=”tribe-bar-date-day” id=”tribe-bar-date-day” class=”tribe-no-param” value=””>’,
    );
    return $filters;
    }

    I’ve added this to my functions.php file in the theme and it crashes the page to where it loads empty. I also tried it in the plugins functions general.php file to same affect.

    I appreciate your assistance!

    #1298680
    Cliff
    Member

    In our forums we keep our threads focused on just one issue at a time to ensure we fully answer each of your questions/issues. Please keep this in mind for the future. Thanks for your understanding.

    1) I’d recommend taking a look at this thread, where they manually created some links to search specific areas (e.g. Los Angeles). They generated these links (to copy/paste from) by using the Tribe Bar’s “Near” search.

    2) Please note that our forums don’t handle code well unless you wrap the snippet in the appropriate tags for code… or you could just share a link to it on gist.github.com

    Anyway, it looks like you copied setup_date_search_in_bar() from /wp-content/plugins/the-events-calendar/src/Tribe/Main.php — but that’s not how to do this. It’s okay that you’re not a PHP expert, but I’ll again suggest referencing the list of customizers I shared before if you need such customizations.

    However, I don’t think you need such code. We have this information regarding translations:

    Please let me know if you need any further assistance.

    #1317432
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Customization/Feature Questions’ is closed to new replies.