crboakes
Forum Replies Created
-
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Crashing in Chrome (Android)Just incase anyone stumbles across this.
The issue is to do with Android Chrome’s ‘Touch to Search’ feature. You can disable it using this technique.
For me I just added
-webkit-user-select: none;
To .gce-page-grid .gce-calendar
Hope this helps
For anyone stumbling across this thread, I thought I’d post the solution. This will likely apply to the new version of the plugin too if no events are displaying.
The issue comes down to account type. The instructions on making the calendar public work perfectly for personal Google accounts. However if you are using a premium Google account e.g. Google Apps For Business. There’s another setting that you’ll need to change. You need to change the admin settings for your calendars to allow outsiders to see event information. This can be done by:
- Visiting https://admin.google.com
- Login and navigate Apps > Google Apps > Setting for Calendar
- Below ‘Sharing settings’, you’ll likely have ‘Only free/busy information’ selected. Change this to the option below ‘Share all information, but outsiders cannot change calendars’
- Save this and wait (it can take up to 24 hours to propagate apparently)
After this change has propogated go back to your Google Calendar, select ‘Share this Calendar’ under the calendar you want to be publicly viewable. Select ‘Share this calendar with others’, then ‘Make this calendar public’.
Now the important part – from the select box drop-down, select ‘See all event details’ which should no longer be greyed out (if you’ve followed the above steps correctly).
You should now see your events.
Hope this helps.
Hi Fulvio,
Thank you for your speedy response.
The other options in the drop-down were greyed out but I’ll leave it for now and wait until the new version comes out which I’m looking forward to integrating.
Thanks again,
Chris
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Manually Enqueuing ScriptsSure, makes sense. Thank you very much for your help.
For anyone stumbling across this thread, the final solution that I’m running with is:
function manually_enqueue_google_calendar_events() { // Enqueue Google Calendar Events CSS wp_enqueue_style( 'google-calendar-events-public' ); // Enqueue Google Calendar Events QTip wp_enqueue_script( 'google-calendar-events-qtip' ); // Enqueue Google Calendar Events JS wp_enqueue_script( 'google-calendar-events-public' ); // Use admin-ajax in the frontend wp_localize_script( 'google-calendar-events-public', 'gce', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'loadingText' => __( 'Loading...', 'gce' ), ) ); } add_action( 'wp_enqueue_scripts', 'manually_enqueue_google_calendar_events' );
Now marking this topic as resolved.
Chris
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Manually Enqueuing ScriptsAh okay, I’ve just had a look and I can see that you’re storing the gce_grid within the ‘data-feed’ tag (where it used to see within the footer script tags) right?
I can see that when I check the option ‘Always Enqueue Scripts & Styles’ it adds everything needed including:
<script type='text/javascript'> /* <![CDATA[ */ var gce = {"ajaxurl":"http:\/\/localhost\/test\/www\/wp-admin\/admin-ajax.php","loadingText":"Loading..."}; /* ]]> */ </script>
However when I uncheck ‘Always Enqueue Scripts & Styles’ and manually enqueue it doesn’t include the above which it seems to rely on this for the calendar to change months.
Basically what I’m trying to achieve is this: https://gist.github.com/nickyoung87/f32de613864c073028fe
But I think enqueueing it like so:
wp_enqueue_style( 'google-calendar-events-public' ); wp_enqueue_script( 'google-calendar-events-qtip' ); wp_enqueue_script( 'google-calendar-events-public' );
Doesn’t enqueue the gce line above and stops the calendar from being able to change months.
However, I could be missing something obvious? Happy to play around with the git branch – thanks for the link.
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Manually Enqueuing ScriptsHi Fulvio,
Thanks for your reply.
I’ve installed the update and it’s not loading the scripts on other pages where I don’t want them enqueued which is great so thanks for fixing that. It’s also not sending me to the top of the page (with a #) when I change month which it was previously doing. But unfortunately it’s still not changing month on the calendar. If I manually add:
<script type='text/javascript'> /* <![CDATA[ */ var gce_grid = {"gce-1":{"target_element":"gce-1","feed_ids":"409","title_text":null,"type":"page","show_tooltips":"true"}}; var gce = {"script_debug":"","ajaxurl":"http:\/\/localhost\/test\/www\/wp-admin\/admin-ajax.php","loadingText":"Loading..."}; /* ]]> */ </script>
To the footer the month changing works again. For now I can manually enqueue this code but that’s what seems to stop it working.
Many thanks,
Chris
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Manually Enqueuing ScriptsNice work, thanks a lot – I’ll check it out!!
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Manually Enqueuing ScriptsHey Fulvio,
Thanks for your reply and offering to fix it. I’ll checkout your branch this weekend/Monday and see if there’s anything I can add.
Thanks again.
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Manually Enqueuing ScriptsHi Fulvio,
Thanks for your reply.
I’ve dropped that in but weirdly still getting the same issue. I’ve had a look myself to see what’s causing it – it appears as though when I uncheck ‘Enqueue this plugin’s scripts and styles on every post and page.’ it doesn’t load the styles (as it should do) but still loads these scripts:
<script type='text/javascript' src='https://localhost/test/www/wp-content/plugins/google-calendar-events/js/jquery.qtip.min.js?ver=2.2.7'></script> <script type='text/javascript' src='https://localhost/test/www/wp-content/plugins/google-calendar-events/js/gce-script.js?ver=2.2.7'></script>
When I check ‘Enqueue this plugin’s scripts and styles on every post and page.’ it adds an extra script tag which it seems to need to solve the issue:
<script type='text/javascript'> /* <![CDATA[ */ var gce_grid = {"gce-1":{"target_element":"gce-1","feed_ids":"409","title_text":null,"type":"page","show_tooltips":"true"}}; var gce = {"script_debug":"","ajaxurl":"http:\/\/localhost\/test\/www\/wp-admin\/admin-ajax.php","loadingText":"Loading..."}; /* ]]> */ </script>
If I manually add this to the footer and manually enqueue the styles (as above) it works. Is there a way to integrate this script into the above function?
Many thanks,
Chris
Forum: Plugins
In reply to: [Simple Calendar - Google Calendar Plugin] Manually Enqueuing ScriptsThanks for getting back to me Fulvio.
I’ve given that a go. I was getting an error because there’s an extra closing bracket on each of the enqueue lines. I took those out but unfortunately I’m still getting the same issue as before whereby it’s inheriting the style but none of the JS functionality seems to be working.
Thanks,
Chris