If you occasionally see a little exclamation mark on your calendar page – this is an attempt to warn you that a cached version of the ics file is being used and events may be out of date. Hover over it to see the message.
Want more info ?
If you are a logged in admin user, add ?debug&refresh to the url and hit refresh. A debug listing will be produced while it tries to refresh. Scroll down to see the result.
Some applications will cope with the html, but there are other applications which do not. EG: Google calendar – does not faciliate html nor issue it in feed.
HTML in the description field is not explicitly forbidden, however it is probably not recommended. There is some provision for html to be explicitly allowed for, either:
in the description using an ALTREP parameter,
or in an ‘experiemental’ X field, X-ALT-DESC,
WordPress allows us to create events with html in them. So what to do when the ics feed is generated?
Retaining the html – two possibilties:
Link to the html representation:
DESCRIPTION;ALTREP="http://www.example.com/somepath/":This is an example description.
Provide separate field with html representation:
Outlook will recognise:
X-ALT-DESC;FMTTYPE=text/html:<p>This is an example description.</p>
This update does both, as well of course ,as stripping the html from the description field in the ics file. This means images will be stripped too (only for the feed – do not panic!)
Interestingly one commenter offers the google ‘ figure it out from the text’ method. Perversely that does not work for me. I have been influenced by my husband to get in the habit of recording the planned date and time in th text as well as in the date fields as a ‘backup’. Too many tools make it so ‘easy’ to shift an event, that it sometimes happens inadvertently…. If you haven’t recorded the original somewhere… you’re in trouble!
Any way point of the post was to give you all a place to offer any suggestions. Yes please comment meaningfully if you want to. If you like the current interface and prefer it to stay that way, please say so too. (hard to please everyone all the time, but I try)
Quite some thought did go into the current amr-events interface:
datepicker for dates, but not a time picker (too limiting, not enough value added)
flexible date entry if you want – it’ll do its best guess to figure out what you want rather than insisting how you should enter the date.
flexible time entry – lots of logic to work out what you want – it is not going to insist on 10:00, you can enter just 10
if no time – will assume all day (you don’t have to tick the all day)
it’ll echo back the day of week to you when saved for confirmation
This events or calendar plugin offers various ways to ‘page’ or navigate events in time. One can also navigate or filter by other ways(categories, taxonomies, authors etc):
I like to call it “semi-pagination” because it is not normal pagination like the WordPress listing of posts. Normal pagination has one parameter – the number of pages and the number of events. Event lists need two ‘drivers’
a time period – the number of days, weeks, or months
the number of events to show
It is dynamically generated based on the parameters you used. If you used days, then it will use days etc
The text will be translated if the language translation exist
Its links allow the user to vary
the time periods
the number of events
and when to start (ie one can go back and forward in time)
Switch it on/off by adding the parameter to the shortcode:
[events pagination=1] or [events pagination=0]
Look for more
a simpler google style “look for more”
also dynamic in that it will remember the last date displayed and will offer a link to view more events from that date on
The default text will be translated if the language translations exist.
the text can be customised in the settings. Multi language sites should leave the default text and rather use the translation files. To do this for english see “an accent for your website”
Can be added manually by using additional shortcodes before / after
[month_year_dropdown] – displays the month and year drop down box where ever you put the shortcode.
[month_prev_next] – displays the next and previous month links where ever you put the shortcode – eg: after the events shortcode maybe? eg [month_prev_next][events]
Note some additional shortcodes only available with amr-events plugin. For the free version see ‘write your own html links’ below.)
Write your own html links
Linking to the event list and passing parameters, one can alter the display. Use the offset parameters to shift the start of the display, either forwards or backwards in time
startoffset=n, or startoffset=-n
daysoffset=n, or daysoffset=-n
monthsoffset=n, or monthsoffset=-n
To show more or less events, or other components the parameters that could be useful, possibly in combination are:
and know how the plugin uses the various time and number of event parameters to navigate through time
See the existing function amr_semi_paginate in amr-ical-events-list/includes/amr-pluggable.php. Note the global variable to receive the parameters or limits used.
First published Jan 2010, now updated and republished.
to greatly simplify the event information master data displayed (no recurring next dates)
and surround the whole lot with h3 heading tags
Steps:
Change (or create a custom list type). Yes I know we are not showing the next dates, but it gives us control over the date and time formats
Change the event information settings
The list type
Easy way: just grab the code at the bottom of the post and paste it in to the appropriate list type in the ‘manage list type’ screen. It is better if you have already added a new list type or change the existing one.
Do it your self:
set the date and time formats – that’s the main thing! If you do not want time to show, just blank out the time format
Update
The Event information
Choose the list type created above
Set the Before /after html with the h3 open and closing tags
Choose DTSTART and EndDate (requires latest version of amr-events or fix as noted in forum)
Switch everything else off
and that should do it.
Notes:
If it is a one day all day, the EndDate will be blank.
DTEND is not good for ‘all day’ events as it is the ‘technical’ DTEND as per ics spec. All day eventss will appear one day longer than you think (they ‘end’ at the start of the next day :) )
Appendix:
Optional: Copy and Paste ALL of this text string into a list type import field in your “manage listtypes” screen:
Update fields to show so that only Starttime and Summary have column = 1, all else =0.
Update StartTime order = 1, Summary order = 2
Add a ‘space’ either “ ” (non breaking space) or “ ” a normal space.
If you anticipate a very large number of events per month, go to the “Define maximums” and enter a max number of events approx double what you expect.
Click ‘Update’ to Save your listtype.
Shortcode parameters
In your largecalendar page, enter the shortcode, using your list type number. Optional: Decide whether to you want a dropdown box or not. See parameters available.
[largecalendar listtype=13 show_month_nav=1]
The css
The default css will allow the full event title to be displayed. If you want to trim it so the event stays on one line, you need to add some custom css.
#events_wrap .largecalendar tbody td div.event {
overflow:hidden;
white-space:nowrap;
font-size:10px; /* make text smaller - depends on your theme */
}
Appendix:
Option: Copy and Paste ALL of this text string into a list type import field in your “manage listtypes” screen:
A horizontal weekly calendar is now possible (in a few hours anyway).
It was requested a while back by autrice. Then I saw the Sydney 2011 film festival schedule and I thought…
… hmmmm we could do that.
From amr-ical-events-list version 4.0.5 onwards use shortcode [weekscalendar]. You will need the new list type 11. It is not exactly the same as above. If you really want the sff.org style, only show the summary and the event date and times. Set all other columns to 0.
Don’t panic if you do not want to reset your list types to get the new defaults. Simply use your local test server (You do have one don’t you? you don’t do everything live …. no of course not, I didn’t really think so.)
In your test server, reset the list types, then copy list type 11 over to your main server (after suitable testing etc.)
Colourit with some category, tag or taxonomy styling.
Version 4.0.5 also offers css classes by id, – so that you can change the category slug with breaking your styling. All id’s will be prefaced with ‘t’ (for term,tag, or taxonomy or caTegory :) )
I had a request recently about being able to list the events in ‘columns’. I took this to mean the css3 idea of columns, as of course in many list types, the event details are in columns.
After allowing the brain to ferret away at the idea, it turns out there are a few different ways to do this with the plugin.
The css 3 way
Limited browser support, however you could decide to go with the graceful degradation idea where it will still look okay in the other browsers, just not two columns. See
and http://thebrowsereview.com/2011/css3-multi-column-layout-browser-support/
For this to work
choose your list type’s ‘html style’ carefully. If you started with the plugin a while back and have saved options, you may not be aware of what is all possible now. check out a clean install or test.icalevents.com
Remove the groupings – they look weird in columns. If the grouping was days, and you removed it, you may want to add back in the EventDate field.
The HTML5 style looks quite nice, as does the lists style, see widget style (listtype4) (without groupings).
If the regularity of events, or their number within a grouping and their content length are consistent, this could work. Choose a way to ‘group’ the events – eg: month? , number of days, category? etc
If months (note will show all events in the current month)
Only do this if your listing requirements are simple, your events similar in the fields that they have AND you know php well. You may be better off letting the plugin do the hard work and use a list type than re-inventing the wheel and trying to anticipate all the sorts of event data and conditions (all days, no end times? etc). The main part of the plugin has been around for years now and is pretty stable – why start afresh?
If you still want to know how you’d do it….
Many of the plugin functions are now ‘pluggable’. Simply override the amr-list-events function. If using another plugin to do this, activate your plugin first before activating the events plugin.
Your function will be passed a sorted list of events where the recurring events have already been exploded out. var_dump each event to see what fields you can use. You’ll still use the shortcodes and the parameters.
To test a pluggable:
Copy the code, edit for you and put in your plugins folder.
Deactivate amr-ical-events-list
Activate amr-test-pluggable
Reactivate amr-ical-events-list
Go to your calendar page to see the simple list. Note this example is just a proof of pluggable concept. I have not done the columns – all you’d require is a for loop for each ‘half’ of events and a floated div for each loop.
/*
Plugin Name: amr_test_pluggable
Author: anmari
Author URI: http://anmari.com/
Plugin URI: https://icalevents.com
Version: 1.0
Description: test the amr-events and amr-ical-events-list pluggable functions.
*/
function amr_list_events ($events, $id, $class, $show_views=true) {
global $amr_listtype;
$no_events = count($events);
$half = $no_events/2; //
$html = 'I have got '.$no_events.' to deal with. They are already in date time order!';
$html .='<div id="mylist">';
// you could do a for i=0 to $half in one div and then the rest in another
foreach ($events as $i=>$event) {
$html .= '<h3>';
$html .= $event['EventDate']->format('d-m-Y'). ' ';
$html .= $event['SUMMARY'];
$html .= '</h3>';
$html .='<p>'.$event['DESCRIPTION'].'</p>';
}
$html .= '</div><!--id="mylist" -->';
return($html);
}