Forum Replies Created
-
AuthorPosts
-
March 27, 2015 at 9:23 am in reply to: Imported event has different time than Facebook event #951523
Barry
MemberApologies, I missed your followup:
Also, am I right in thinking that once an event is imported it does not update to match any changes made to the event on Facebook, i.e. if the start time is changed on Facebook, it doesn’t automatically change in WordPress?
That’s correct.
March 27, 2015 at 9:22 am in reply to: Imported event has different time than Facebook event #951522Barry
MemberOK, so those events all seem to be set to UTC or UTC+1 (mostly the latter).
GMT time is 2015-03-27 15:33:14 Local time is 2015-03-27 15:33:14
Unless I’m mistaken, BST is equivalent to UTC+1 and GMT is effectively the same us UTC. Is it the case that this issue surfaces only for the events set (on Facebook) to UTC+1? The adjustment would certainly be the expected behaviour in such a case, as your WordPress site appears to be operating in GMT.
March 27, 2015 at 8:26 am in reply to: Imported event has different time than Facebook event #951505Barry
MemberHi Adam,
I’m sorry to hear you are hitting difficulties.
Certainly if the difference is exactly an hour in each case your theory about the change to summer time seems like a plausible one. I wonder if you can you confirm a couple of things for me:
- When you say your WordPress site is set to London time, do you mean “Europe/London” or are you using an offset such as “UTC +0”?
- Can you provide the Facebook URL for one of the events in question so we can double check if it is set to, for example, GMT (in which case the adjustment would be expected)?
Thanks!
Barry
Memberbut every time I choose another month in events bar calendar is generated again. Is a possibility to cache ajax parts?
You’re right – unless you can configure your caching plugin to capture and cache month view ajax requests (however, you’d need to proceed cautiously to avoid impacting on other legitimate admin-ajax.php requests that should not be cached) these will be unaffected.
Really though that’s something you’d need to explore under your own steam – and hopefully our own improved month view caching will anyway make for a significant improvement when it arrives 🙂
Barry
MemberSo I’m not quite sure that this relates to the state/province field, unless I’m misunderstanding, but in the interim if you need to fine tune the longitude or latitude of venues you can use this third party plugin (not supported here on the theeventscalendar.com forums) which adds a coordinate metabox to the venue editor.
Would that provide you with what you need?
March 27, 2015 at 7:49 am in reply to: Displaying events in list view makes calendar look out of date. #951453Barry
MemberDoes this snippet (you could add it to your theme’s functions.php file) achieve your aims?
function sp950680_modified_list_headers( $html ) { static $opened = false; // We're not interested in past event views if ( tribe_is_past() ) return $html; // Did the current event start today/later? if ( tribe_get_start_date( null, false, 'Y-m' ) > date_i18n( 'Y-m' ) ) { remove_filter( 'tribe_events_list_the_date_headers', 'sp950680_modified_list_headers' ); return $html; } // If we already opened and are still in the opening range, return nothing if ( $opened ) return ''; // Otherwise, provide a header covering all events starting in the current month or earlier $opened = true; return sprintf( "<span class='tribe-events-list-separator-month'><span>%s</span></span>", date_i18n( tribe_get_option( 'monthAndYearFormat', 'F Y' ) ) ); } add_filter( 'tribe_events_list_the_date_headers', 'sp950680_modified_list_headers' );Barry
MemberIt’s been a while so I’m going to go ahead and close this topic – but if we can answer any other questions please don’t hesitate to post them in fresh topics!
Barry
MemberNot really, the general concept is a WordPress one and is well covered in the Codex – but the basic form is like this:
add_filter( 'tribe_get_cost', 'custom_cost_filter' ); function custom_cost_filter( $cost ) { return 'Modified ' . $cost; }The actual logic to conditionally strip decimals is something we’d leave to you 🙂
Barry
MemberIt’s probably possible to craft a SQL statement to do this work if you’re comfortable with that sort of work? I would of course recommend you make a full and complete backup – and ensure you know how to restore the backup – before carrying out such an operation.
Here’s the SQL I’m thinking of:
DELETE FROM wp_posts WHERE ID IN ( SELECT post_id FROM wp_postmeta WHERE meta_key = '_EventEndDate' AND meta_value < CURDATE() ) AND post_type = 'tribe_events';This will “orphan” a number of post meta table entries which could be cleaned up with some further SQL:
DELETE FROM wp_postmeta WHERE post_id NOT IN ( SELECT ID FROM wp_posts );Again, apply with caution and only if you are comfortable operating directly on the database!
Barry
MemberOK. Are you able to check in with the theme author and ask what the trigger is for those header elements to display?
March 26, 2015 at 10:37 am in reply to: Missing events in sitemap, 404 error in GWT, 500 error importing facebook #951205Barry
MemberAh, ok.
In that case I’ll go ahead and close out this topic. If we can help with anything else, though, then as always please don’t hesitate to post a new topic and one of the team will be only too happy to assist 🙂
Barry
MemberApologies, my link to the Themer’s Guide (which explains how to set up template overrides) was missing from my last reply. Please see:
Barry
MemberIf I select “Default Page Template” it DOES work.
I suspect because an element with an ID of main-content is then present (your theme’s page template adds this). With that being the case, is there some reason you can’t use that template setting?
If you really need to use the default events template I’d recommend overriding it (see here) and adding an additional wrapper, ie instead of the following (which you will find in events/default-template.php):
<div id="tribe-events-pg-template"> <?php tribe_events_before_html(); ?> <?php tribe_get_view(); ?> <?php tribe_events_after_html(); ?> </div> <!-- #tribe-events-pg-template -->Wrap it as follows:
<div id="main-content"> <div id="tribe-events-pg-template"> <?php tribe_events_before_html(); ?> <?php tribe_get_view(); ?> <?php tribe_events_after_html(); ?> </div> <!-- #tribe-events-pg-template --> </div> <!-- #main-content -->However, using the default page template is arguably preferable since there may be other elements, classes and IDs besides this one that various theme scripts expect.
Does that help?
March 26, 2015 at 10:03 am in reply to: Displaying events in list view makes calendar look out of date. #951191Barry
MemberThanks for the explanation – I think I see what you’re driving at, here, but just to confirm:
- The actual result set should remain the same (ie, you don’t want to change the range of events that are included)
- Any events that started prior to the current month should be grouped under the current month heading (March 2015 at time of writing, for instance)
Is that an accurate summary?
Barry
MemberHi Krzysztof – great question!
We don’t actually have a specific tutorial for that and I imagine it might work without any specific-to-The Events Calendar configuration, unless you have already hit difficulties with this?
There are a couple of other things I would like to note:
- One is that the next release should see a marked improvement in month view load times, due to internal caching
- The other is that – just in case you were not aware – it is possible to configure and limit the number of events shown per day in month view (via the Events → Settings screen) – so that could prove useful here
Does that help?
-
AuthorPosts
