Category Archives: amr ical events list

Posts related to Version Releases of amr ical events list

Complete multi-lingual event website

To achieve a complete multi-lingual website using amr-events and amr-ical-events-list, the following are required:

the wordpress language files

These are required for the day, month etc event time localisations.  See this post for instructions and links.

your theme language files

Some theme language files can be found at http://i18n.svn.wordpress.org/
. You may have to click down various paths as sometimes somelanguages are stored differently.
Danish example: http://i18n.svn.wordpress.org/da_DK/trunk/messages/twentythirteen/

Updated plugin language files

Some folks have kindly provided translations.  You can see the latest available here.   These are not always up to date.  See translation tools below.  If you need to update your language files, please send me the update and I’ll upload it.

If you do NOT send an update, your version may be overwritten in a plugin update unless you move it.

Custom Language File Location

For these two plugins, you can store your custom .mo and .po files in your WP-CONTENT languages subfolder.

Do not use the subfolder /plugins as wordpresss may one day be auto loading translations to that folder.

custom_language_file

Translation tools:

Finally a Language switcher and/or a multi-lingual language plugin. Some plugins that may help:

  • Xili (unverified in recent years)

Demonstration

lang.icalevents.com

Finding the Facebook events ics feed for subscribing or syncing

I’m not a fan of facebook…..however I get asked the questions, so have had to develop some familiarity, so here’s a quick reference until facebook changes things again.

Before you get too stuck in to facebook for your events,  look at oreilly.com’s advice on perhap not using facebook as the home for your public events.

Finding that public events ics feed in facebook

From a facebook ‘page’

They really do not make it easy do they ?  There is no obvious ‘Export all’ as there is in the personal page.  So…Pretend you’re only exporting one event from your page.

Example fb page
Example Facebook page – events page

Click the event

The facebook events lists, click export.

Click export.

Choose subscribe to all events, or right click and copy the link address

Copy that webcal ics address and use it wherever you need to subscribe to that set of events.

From a personal homepage

After logging in look for the export events option, not just for one event but ALL upcoming events.

Go to your all events page:   https://www.facebook.com/events/list.

Click "Export"In the top right corner, see the little gear icon, click it and click the export option.

 

You should get a popup window.

export facebook ics
export facebook ics

If you just want the url to subscribe to it from another application, right click and ‘copy the link address’. Paste it in to your calendars subscribe url option.

Alternatively if you just click on it, your calendar application should open up and hanlde the subscription process for you.

Use it in the ical events plugin?

facebook in shortcode
facebook in shortcode

Bear in mind that the plugin caches the url’s, so you may need to force a refresh (add ?refresh) to the calendar page url and refresh the page in your browser.

eg:

 

Other possibly useful references:

External ics files timing out?

Slow server? Ics refresh problems too frequent?

In version 4.0.24 of amr-ical-events-list, the default http timeout in wordpress can be extended for ics fetches.  5 is the wp default.

Note: using a large number may mean that your calendar page will be slow when it is time to refresh the ics files.  Consider the cache frequency too.

See also

Advanced admin settingfor timeouts

How to tell if necessary?

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.

Debug message for logged in admin users
Ics file does not exist

Problem with Dates/Time – Off by 1 Hour?

If you are using amr-events or amr-ical-events-list you will not have this problem!

Every time a zone somewhere in the world kicks on to daylight saving or off for that matter, I see a bunch of support questions popping up about their event times being off by an hour.    (I monitor wordpress support, stackexchange and wpquestions, and maybe a few more…..)

From a favourite cartoon source - thanks http://xkcd.com/673/

Imagine the confusion this can cause where clients may have subscribed to calendar feeds and have the wrong times.

PHP datetime objects and functions

If people are very lucky, the plugin that they are using has some good coding and is using php DateTime objects with timezone support, and the only problem is that their wordpress timezone is set as a GMT offset, not as a timezone.

That is easily fixed! (goto wordpress general settings)

However all too often the plugin developer has failed to appreciate

  • the complexities of times around the world,
  • timezones,
  • daylight saving and
  • most importance of managing recurring events in one timezone for a display in another where one zone changes daylight saving.  Very easy to generate the wrong times for a recurring event without realising it!
  • even worse governments sometimes change the date/time of the switchover (ok not that often, but it does happen, and then you hope your php installation gets updated with the timezone definitions)

Fixes:

If it is not a simple wordpress timezone setting, then these things are NOT easy to fix and will involve changes to code:

  1. Change to use php DateTime Classes for all date logic .If they are using unix time and not  php datetime objects, it is almost impossible to get it right.  It’s a fairly major rewrite to change all date logic to use the DateTime objects and functions.
  2. If already using, it maybe that the intricacies of recurring event logic have won out.  See below for logic help.

Developers and event website managers should read:

 

 

Horizontal Weekly Calendar

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.

Sydney Film Festival Schedule Styling
Sydney Film Festival Schedule Styling – possible with amr-events

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.)

Colour it 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 :) )

Maybe add some css like:

#events_wrap .eventscat,
#events_wrap table tr.eventscat td.amrcol1 {     
 border-left: solid 5px green;
}
#events_wrap table tr.t1 td.amrcol1 { 
 border-left: solid 5px red;
}

Have fun…

Oh, by the way, you always could do a weekly vertical agenda too, I’ve added a sample listtype for that too (no 12).

 

Events and css3 style columns

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

Using css3 multi columns

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

 

  • http://www.quirksmode.org/css/multicolumn.html,
  • http://www.standardista.com/css3/css3-columns-browser-support,
  • 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).

Html and Shortcode used:

<div id="multicolumn">[events listtype=6]</div>

Additional Css used:

#multicolumn{
 -moz-column-count: 2;
 -moz-column-gap: 20px;
 -webkit-column-count: 2;
 -webkit-column-gap: 20px;
 column-count: 2;
 column-gap: 20px;
}

The two shortcodes and some wrapping html way

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

Two columns using multiple shortcodes with selection by months

If months (note will show all events in the current month)

<div style="width:49%; float:left;">
[events months=1 events=bigenufno listtype=1 calendar_properties=0]
</div>
<div style="width:49%; float:right;">
[events months=1 monthsoffset=1 events=bigenufno listtype=1 calendar_properties=0]
</div>
Two columns with selection by number of days

If days (example with list type 4)

<div style="width:49%; float:left;">
[events days=20 events=100 listtype=4]
</div>
<div style="width:49%; float:right;">
[events days=20 startoffset=20 events=100 listtype=4]
</div>

The ‘Count the Events’ way

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:

  1. Copy the code, edit for you and put in your plugins folder.
  2. Deactivate amr-ical-events-list
  3. Activate amr-test-pluggable
  4. 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.

Proof of pluggable function
/*
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);
}

 

Export, import, copy, paste

A new page popped up where the  “configure list type”  page used to be.  This is a list type management overview page.  Click on a list type name to get to the configure list type page for that list.

List type overview screen

Now you can share your list type definition (or of course just copy and paste from your test site to your main site).

For example – would you like to try a daily, sort of vertical timetable like in the image below?

  • grouped by day
  • showing the title, but not the description
  • no start date  (no need because the date is in the grouping line)
  • show end date if it exists, in case it it is a multi day long event
  • showing all the icon links in one line (note recurring events have an individual ics, as well as the full series ics)
A configured list type to demonstrate the copy feature

Yes?

  1. select the FULL string below and copy it (Control C)
  2. paste it (Control V) into a ‘spare’ list type’s import field in the overview page.
  3. Update.
  4. Preview it or use it in a shortcode [events listtype=n].

Note:

  • Images and css are set at overall settings (see “listing Events”, not at individual list type.
  • Additional optional tweaks in the shortcode parameters if you want a clean/lean look
[events listtype=x show_month_nav=0 headings=0 calendar_properties=0 show_views=0]

Updated French, some minor changes

A quick release with an update to the French from fxbenard and for some minor glitches found in the update a couple of days ago. Download for amr-events or for amr-ical-events-list via the WordPress upgrade.

Have you ever wanted to keep your own translation and not have it overwritten by updates?
Maybe you have a special ‘tone’ to your site?

The plugin will check for a language file first in the wp-content/languages folder with the plugins text domain. If none found, then it will look in the plugins language folder. The wp-content/languages folder is where the general WordPress translations and localisations are stored.

ChangeLog:

  • Update: French translation files update from fxbenard for both amr-events and amr-ical-events-list
  • Change: Better detection of when a standard post is also an event, so should show event meta box even if you come upon editing the post another way than through the edit events.
  • Change: Removed ORGANIZER from the feed for now.  If anyone particularly needed this, please contact me asap fro prioritisation of method to optionallly allow inclusion of such fields – probably when ATTENDEE/ RSVP feature available.
  • Fix: Timezone of events was not being detected correctly – website timezone was being used.
  • Change: If NOT in a widget, then href title on event summary hyperlink will now have excerpt if using amr-events and if excerpt is availble else the word “more info”.  It used to hover the whole post content.
  • Fix:  remove htmlspecial chars from output of event summary – mucks up special chars now in latest wp

Truly individual event ics, choice of icon sizes and more

Css sprite
Version 2.0 is now available at http://webdesign.anmari.com/2078/amr-events-download/

In order to get some updates up sooner than later for some of you, it does not have everything I wanted to include (had to stop the feature creep!). There will be another update in a few weeks.

Key updates:

Larger Icons and Css sprite available.

  • Freshen up the look of your calendar with larger icons
  • For those doing their own css, a sample css file and css sprites are provided

Truly individual event ics now available.

  • The event series ics link is also there , so now you can offer users option of subscribing to a single event instance or to the recurring event series.

Other changes:

  • Add:  Truly individual event ics now available. The event series ics link is also there , so now you can offer users option of subscribing to a single event instance or to the recurring event series.
  • Add:  A choice of icon sizes 16×16 or 32×32 and many useful additional icons courest of famfam and fatcow.  Css sprites and suggested css code is provided for css experts who wish to make their site more efficient and include the css in their theme css.  At a later stage thsi will be integrated for less expert users.
  • Add:  if you wish to have additional information or links to files sent in the ics files in the ATTACH field, you can now add them as attachments to the post – upload the media.  You do not need to add it to the post content.  If the image url is not in the postcontent, it will be added to the event ics info.  If you choose to display attachments in the listtype, the plugin will do it’s best to do something sensibel. eg: if the attachment is an image, it will use the thumbnail not the full image, urls will be clickable etc.
  • Add: Attachments in ics files are now parsed a bit better. If a url is found, it will be made “clickable”.  A pluggable function added to allow you to override html produced for your partcular files. Note there can be multiple ATTACH in an ics file.
  • Add: the large calendar date number will offer a link to a list view for the day’s events if there are events
  • Add: made more of the admin text translateable
  • Add: a class was added to the “no events message” dummy hyperlink, so that you can style it should you wish. Note if the message is blank in the settings, then no message printed at all if no events returned.
  • Add: Added css classes to the box calendar events as per the list events
  • Change: exchange WP_SITEURL for get_option(‘siteurl’) – better
  • Change: changed translation text domain to plugin name to avoid confusion.  Tried to clean up language files, had some problems and do hope I have not lost any translations.  With every upgrade there are usually some new strings.
  • Fix: the date number is in the same place in the html if there were no events.
what is in the images directory
See the images directory
Sample css
Sample css for own css use with background images

Stay Tuned

Pluggable functions and minor fixes

Version 1.9.6 now available at http://webdesign.anmari.com/2078/amr-events-download/

  • Added: some functions are now pluggable – see post
  • Fix: in 1.9.5 a esc_url() was added when it was not necessary (data was already escaped).
  • Fix: an odd glitch in post type settings was fixed. one culd set or reset, but not untick.
  • Lost and then found: ability to override list type grouping by adding parameter to shortcode