Hi there,
I need to insert a full calendar into our home page template. I used <?php echo eo_get_event_fullcalendar();?>
but I am unsure how to achieve the same setup as with the shortcode I used on another page. The shortcode I used is
[eo_fullcalendar headerLeft=’prev,next today’ headerCenter=’title’ headerRight=’venue,month,agenda Week’].
How can I achieve the same when inserting PHP into the template as with the shortcode?
Currently the calendar shows as per the follwing screenshot when using PHP: http://glui.me/?i=z0b4eny8x5star3/2016-03-15_at_22.13.png/
With the shortcode the calendar shows as follows: http://glui.me/?i=lncz1bxat60evra/2016-03-15_at_22.14.png/
Would it be possible for you to assist?
Kind regards
Francois Wessels

Francois Wessels
Hi Francois,
You can pass an array as an argument. The array contains the same key-value pairs as the shortcode’s attribute-value pairs, except the keys are lowercased. See the codex for more details..

Stephen Harris
Hi there,
Thanks for the reply, as a non-programmer this is very confusing — would it be possible to give me an aexample of usage to achieve this?
Any help will be greatly appreciated.
Kind regards
Francois Wessels

Francois Wessels
Try:
<?php
echo eo_get_event_fullcalendar( array(
'headerleft' => 'prev,next today',
'headercenter' => 'title',
'headerright' => 'venue,month,agendaWeek',
) );
?>

Stephen Harris
Hi Stephen,
Thank you very much, that worked perfectly. Just one more question if I may — if i were to disable tooltips on this calendar in the template would I pass that as part of the array?
‘tooltip’ => ‘false’
Thanks in advance.
Francois Wessels

Francois Wessels
Hi Stephen,
Thanks for your assistance sofar — I have now placed the suggested code below in our template:
<?php echo eo_get_event_fullcalendar( array(
‘headerleft’ => ‘prev,next today’,
‘headercenter’ => ‘title’,
‘headerright’ => ‘venue,month,agendaWeek’,
‘tooltip’ => ‘false’,
) );
Unfortunately tooltips are still showing. Could you possibly just advise what we are doing wrong.
Also, the calendar does not resize at all for mobile devices — is there something specific that we need to eanble to ensure that the calendar is responsive?
Kind regards
Francois Wessels

Francois Wessels
It should be automatically responsive for Event Organiser 3.0.0 (or later).
Do you have a link to the page?

Stephen Harris
Hi Stephen,
Thanks for all your help on this — we are still on version 2 but on a page where the calendar is embedded via shortcode it does resize although not fully responsive.
We did upgrade to version 3 earlier but had to revert to version 2 as some of the layout broke with our theme…
The tooltip that is still showing is also something that I am unsure how to handle.
URL is http://andrekocklimpopo.co.za.
Kind regards
Francois

Francois Wessels
Sorry, when used in the function, 'false'
must be a boolean, not a string. So false
(without the quotation marks). I’ve just tried the following on a test site with 2.13.7 enabled, it works for me:
<?php
echo eo_get_event_fullcalendar( array(
'headerleft' => 'prev,next today',
'headercenter' => 'title',
'headerright' => 'venue,month,agendaWeek',
'tooltip' => false,
) );
?>
Also I noticed in the above you have what look like backtics rather than single quotation marks.
Yes, the calendar is not particular responsive on versions older than 3.0.0 (it resizes, to a point).

Stephen Harris