WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: The Events Calendar] Patch to fix: Event Options, Event Metabox and HTML Validation issues (4 posts)

  1. Azizur Rahman
    Member
    Posted 4 years ago #

    NOTE: This is a patch to development version and it may or many not work on other versions. Use this patch at your own risk.

    After my initial post at: http://wordpress.org/support/topic/373434?replies=9 .

    I thought I would share my patch back here for main developers to apply them.

    Issues Fixed by this patch:
    -> Donate Button (Hide Ajax endpoint)
    -> Embedded Map HTML URL Encoding so its w3c compatible
    -> Usability issue: Is this post an event? Yes/No -- now you can click the text and it will select your choice.
    -> Also fix http://wordpress.org/support/topic/381757

    And now the patch (please read the note above)
    ------------------------------------

    Index: the-events-calendar.php
    ===================================================================
    --- the-events-calendar.php (revision 229826)
    +++ the-events-calendar.php (working copy)
    @@ -1460,10 +1460,10 @@
    $province = get_post_meta($postId, '_EventProvince', true );
    $zip = get_post_meta( $postId, '_EventZip', true );
    $country = get_post_meta($postId, '_EventCountry', true );
    - $google_url = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=";
    + $google_url = "http://maps.google.com/maps";

    if ( !empty( $zip ) ) {
    - return $google_url . urlencode( $address . " " . $city . " " . $state . " " . $zip . " " . $country);
    + return $google_url . urlencode( "?f=q&source=s_q&hl=en&geocode=&q=" . $address . " " . $city . " " . $state . " " . $zip . " " . $country);
    }
    return "";
    }
    Index: views/events-meta-box.php
    ===================================================================
    --- views/events-meta-box.php (revision 229826)
    +++ views/events-meta-box.php (working copy)
    @@ -164,8 +164,8 @@
    ?>
    <p>
    <?php _e('Is this post an event?',$this->pluginDomain); ?> 
    - <input tabindex="<?php $this->tabIndex(); ?>" type='radio' name='isEvent' value='yes' <?php echo $isEventChecked; ?> /> <b><?php _e('Yes', $this->pluginDomain); ?></b>
    - <input tabindex="<?php $this->tabIndex(); ?>" type='radio' name='isEvent' value='no' <?php echo $isNotEventChecked; ?> /> <b><?php _e('No', $this->pluginDomain); ?></b>
    + <label><input tabindex="<?php $this->tabIndex(); ?>" type='radio' name='isEvent' value='yes' <?php echo $isEventChecked; ?> /> <b><?php _e('Yes', $this->pluginDomain); ?></b></label>
    + <label><input tabindex="<?php $this->tabIndex(); ?>" type='radio' name='isEvent' value='no' <?php echo $isNotEventChecked; ?> /> <b><?php _e('No', $this->pluginDomain); ?></b></label>
    </p>
    </div>
    <div id='eventDetails' class="inside eventForm">
    @@ -479,7 +479,7 @@
    padding-bottom: 10px !important;
    }
    </style>
    -</div><!--//eventDetails-->
    +<!-- //eventDetails -->
    <?php
    try {
    do_action( 'sp_events_details_bottom', $postId );
    Index: views/events-options.php
    ===================================================================
    --- views/events-options.php (revision 229826)
    +++ views/events-options.php (working copy)
    @@ -6,7 +6,7 @@
    jQuery('#secondDonateRow').show();
    }
    jQuery('#hideDonateButton').click(function() {
    - jQuery.post( '<?php bloginfo('url'); ?>/wp-admin/admin-ajax.php', { donateHidden: true, action: 'hideDonate' }, theEventsCalendarHideDonateButton, 'json' );
    + jQuery.post( '<?php bloginfo('wpurl'); ?>/wp-admin/admin-ajax.php', { donateHidden: true, action: 'hideDonate' }, theEventsCalendarHideDonateButton, 'json' );
    });

    function displayOptionsError() {
    @@ -34,7 +34,7 @@
    #hideDonateButton {}
    #checkBoxLabel {}
    .form-table form #secondSubmit {
    - background:#f2f2f2 url(<?php bloginfo('url'); ?>/images/white-grad-active.png) repeat-x scroll left top;
    + background:#f2f2f2 url(<?php bloginfo('wpurl'); ?>/wp-admin/images/white-grad-active.png) repeat-x scroll left top;
    text-decoration: none;
    font-size: 11px;
    line-height: 16px;
    @@ -56,11 +56,11 @@
    text-transform: uppercase;
    }
    .form-table form #secondSubmit {
    - background: #f2f2f2 url(<?php bloginfo('url'); ?>/wp-admin/images/white-grad.png) repeat-x scroll left top;
    + background: #f2f2f2 url(<?php bloginfo('wpurl'); ?>/wp-admin/images/white-grad.png) repeat-x scroll left top;
    }

    .form-table form #secondSubmit:active {
    - background: #eee url(<?php bloginfo('url'); ?>/wp-admin/images/white-grad-active.png) repeat-x scroll left top;
    + background: #eee url(<?php bloginfo('wpurl'); ?>/wp-admin/images/white-grad-active.png) repeat-x scroll left top;
    }

    .form-table form #secondSubmit:hover {

    ------------------------------------

  2. Shane Pearlman
    Modern Tribe
    Posted 4 years ago #

    Hey azizur,

    I passed this thread along to Justin, one of the contributors. If these have not been solved in 1.6 (which is coming along nicely), we will add them in.

    Thanks for contributing!

    -S

    For updates, release information and tips about our open source plugins, follow us on twitter @justlikeair.

  3. justinendler
    Member
    Posted 4 years ago #

    Thanks azizur,

    This is all added.

    With the Google map url, FYI for your dev site, running a portion of the Google query string through urlencode() was breaking the link for me. Simply hard-coding html entities for the & symbol fixed the W3C errors and is what will appear in the next release.

    With your other suggestions, we went with exactly what you gave us. Thanks for the improvements.

    Justin

  4. TriangleAE
    Member
    Posted 4 years ago #

    I'm one of the bold and have used 1.6

    editing the original files to make my changes

    Thanks, Azizur. I used your info to make changes.

    I've moved the event info to the bottom and added my left sidebar successfully.

    By my footer with ads at the bottom are not below the event content

    Can anyone offer assistance?

    http://triangleartsandentertainment.org/2010/04/jazz-by-the-lake-may-15-16/

Topic Closed

This topic has been closed to new replies.

About this Topic