Need to customize the file: organizer.php

Home Forums Calendar Products Events Calendar PRO Need to customize the file: organizer.php

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1356695
    Joseph Crestuk
    Participant

    Hello, i need to customize the organizer.php file, (the correct way within the theme).
    Path: plugins/the-events-calendar/src/functions/template-tags/organizer.php
    I tried adding it to the folder mytheme/tribe-events/

    I referred to https://theeventscalendar.com/knowledgebase/themers-guide/ and did not see a solution for this.

    Additionally, the reason I am editing this file, is due to an error within the plugin that causes a broken link. The plugin adds a closing “a tag” within an “a href” for the organizers’ website, which when crawled by a bot can be seen as an error. If a developer could look into this and fix it on the next update, would be appreciated too.

    -Thanks

    • This topic was modified 8 years, 7 months ago by Joseph Crestuk. Reason: Typeo: "a tag" was stripped
    #1356702
    Joseph Crestuk
    Participant

    This reply is private.

    #1357186
    Cliff
    Member

    Hi, Joseph.

    1)

    Only files in the /wp-content/plugins/the-events-calendar/src/views/ directory (including its subdirectories) can be overridden via the Themer’s Guide

    2)

    This is the latest release of that organizer.php file: https://github.com/moderntribe/the-events-calendar/blob/4.6/src/functions/template-tags/organizer.php

    You’re welcome to submit a pull request or point out the specific line number(s) that you’re having an issue with.

    #1358237
    Joseph Crestuk
    Participant

    Thanks for the response. Here is the code causing a broken link to pass along to the plugin developers.

    Line 305:
    $html = sprintf(
    ‘<a_ href=”%s” target=”%s”>%s‘,
    esc_attr( esc_url( $url ) ),
    apply_filters( ‘tribe_get_organizer_website_link_target’, ‘_self’ ),
    apply_filters( ‘tribe_get_organizer_website_link_label’, esc_html( $label ) )
    );
    } else {
    $html = ”;

    When line 306 is commented out the “broken link” is fixed
    // ‘<a_ href=”%s” target=”%s”>%s‘,

    Here is the before:
    <a_>www.dansvilledental.com“>
    <a_ href=”http://www.dansvilledental.com&#8221; target=”_self”>www.dansvilledental.com

    Here is the after:
    <a_>www.dansvilledental.com”

    -Thanks

    • This reply was modified 8 years, 7 months ago by Joseph Crestuk. Reason: a hrefs were being turned into links so i added _ after a
    • This reply was modified 8 years, 7 months ago by Joseph Crestuk.
    #1358589
    Cliff
    Member

    Joseph, none of that code looks to have come through cleanly so I can’t understand exactly the issue.

    However, looking at Line 306, it’s one line of a multi-line sprintf so commenting it out would cause a PHP error.

    Feel free to submit a pull request. Here are guidelines how to do this: https://moderntribe.github.io/products-engineering/git/branching/

    #1368721
    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 ‘Need to customize the file: organizer.php’ is closed to new replies.