Kalendas – Plugin para WordPress

Los primeros días de Kalendas se remontan al tiempo en que desarrollé un sitio para una vicerrectoría de una universidad en mi ciudad. La lógica del sitio requería la visualización de eventos futuros, y dado que la arquitectura de datos personales de la Universidad corría sobre los servicios de Google fue lógico usar su herramienta de calendario para alimentar el listado de eventos.

Buscando entre los agregados de Wordpress que pudieran ayudarme con este requerimiento encontré wpng-calendar, un plugin que técnicamente hablando procede según los requerimientos básicos del sitio que estaba desarrollando, pero que carece de ciertos detalles que facilitarían el soporte técnico del proyecto a largo plazo, y como los requerimiento superaban la espera y la última versión del plugin se remontaba al primer semestre de 2008, decidí reusar el código y extenderlo.

Con el tiempo el nuevo agregado, que había nacido inicialmente como un fork de wpng-calendar, cambió radicalmente. Al alcanzar su primera versión estable apenas compartía unas pocas líneas de código con el plugin del que procedía.

Así nace Kalendas, un plugin que trata en lo posible de ser simple de usar. Tan fácil como agregar un widget a la barra lateral por cada calendario que se desee mostrar, declarar su título y el descriptor XML1 del calendario en Google.

Para la muestra, un botón. El calendario de eventos de tecnología de Austin – Texas2.

Eventos en Austin

feb 9

El plugin está en estado Beta, y hasta donde he visto es funcional, pero aun así recomiendo usarlo con cuidado porque puede alterar la visual de los temas y plantillas.

El plugin está bajo licencia GPL para que lo usen, abusen y descuarticen, solo recuerden dar los créditos del caso.

Ir a la página de descarga.

Características

  • Listado de eventos de calendarios en Google Calendar.
  • Puede seleccionar un margen de tiempo para mostrar eventos.
  • Puede seleccionar cuántos eventos mostrar como máximo.
  • Se actualiza diariamente o cada hora.
    • El administrador puede forzar la actualización.
  • La información de cada evento se amplía con una ventana emergente.
  1. La última imagen de la galería es un infograma que explica cómo hacer que un calendario sea público y cómo conseguir el URL de la fuente.
  2. No vivo en Austin, pero el calendario de esta comunidad es ideal para mostrar las capacidades de Kalendas.

100 comentarios para “Kalendas – Plugin para WordPress”

  1. Stef dice:

    Hello Sebastián,

    I’m getting this error message with Kalendas.
    ___
    The web service endpoint returned a “HTTP/1.0 415 Unsupported Media Type” response
    ___

    This is my site.
    http://treasury.we2you.com/opleidingen/

    Any ideas how to solve this?

    Thank you!

  2. Stef dice:

    .. and with an other agenda. I’m getting this message.

    Warning: fsockopen() [function.fsockopen]: php_network_getaddresses: getaddrinfo failed: Tijdelijke storing in naamsherleiding in /home/treasury/treasury.nl/wp-content/plugins/kalendas/kalendas.php on line 669

    Pretty weird huh?

  3. Stef dice:

    I see that my last comment ended up in your moderation queue. :)
    Just wanted to let you know that I installed Minimax.

    • sebaxtian dice:

      Hi Stef.

      The library Minimax isn’t required anymore.

      Also, I noticed in your page the function fsockopen is trying to connect to an HTML tag. Maybe the URL is edited in your text editor as a reference. Check if it is underlined, if it’s the case select the broken chain button to delete the reference.

  4. Stef dice:

    Hi Sebaxtian,

    I’ve deleted the reference. It was indeed a link.
    But now the “Unsupported Media Type” error is there for all the calendars.
    http://treasury.we2you.com/opleidingen/

    Is it an idea that I send you some login details so that you can take a look yourself?

    Thanks..

    • sebaxtian dice:

      Hi Stef.

      Maybe the default configuration isn’t well formed. Please, go to Options / Kalendas and edit it. If this is the situation is a bug that requires to be fixed ASAP.

      Thanks for any report about this situation.

  5. Stef dice:

    Hi Sebaxtian,

    These are my configurations
    http://img.skitch.com/20100615-x25rc5ga6hfjradn86xbuqucxg.jpg

    I’m not quite sure if this is ok.
    Thanks.

  6. Stef dice:

    Send via DM on twitter.
    I appreciate your help! Thanks a lot!
    I’ll speak with you tomorrow.. It’s almost 2 am here.
    thanks again!

  7. Stef dice:

    Fantastic!
    It works great now.
    thank you very much!

    Just one small question:
    Is it also possible to set the time of “Show Events Until” longer then one month? For example ‘a year’?

    Thanks!

    • sebaxtian dice:

      Great to hear it works!

      It is possible to make the time longer. I’m workig in this subject with the client that requires this plugin, but there would be changes in the user interface and I don’t want to write code in this subjet until we know exactly what we are going to do. Maybe in a week these changes will come.

      Big regards.

    • sebaxtian dice:

      Hi Stef.

      Kalendas has a new release. This is not the ‘final form’ my client wants, but I have added more months to the configuration form and solved 2 bugs.

      It is more like a ‘stable release’ than a final product. Kalendas is still in beta stage.

      Any observation would be welcome.

  8. Allen dice:

    Hello- I have kalendas and it successfully loads a list of events from the google calendar onto my site. When you click on the link for the event, though, you do not see the event details. Instead you see a kalendas screen. I havent modified the kalendas script, so this appears to be a minor bug. Any idea how to fix?

    Would also appreciate having ability to show events more than six months out.

    Thanks for a useful plugin.

    • Allen dice:

      I was able to fix the problem myself – it was not a problem with kalendas. Thanks.

    • sebaxtian dice:

      Hi Allen and thanks for using Kalendas.

      Do you have a page where I can see this situation? Or can you give me the XML to the Google calendar so I can test it locally.

      About the end time-out, it’s the most voted requirement so I think it will be in the next release.

      • Allen dice:

        Plugin working fine. I had messed up the xml, then I used an invalid date format. Thanks again and I will look forward to the next release.

  9. Allen dice:

    Thanks again for a great plugin. Is the minimax plugin still required, or can I remove it? I don’t think this plugin has any purpose except to support kalendas (is that right)?

    We’re all looking forward to the next release that allows events six months out. I’ve tried fiddling with the php but can’t get it to work…:(

    • sebaxtian dice:

      Hi Allen.

      Minimax were my general purpose library, and all my ajax-ready plugins used it: Lexi, Schreikasten, Mudslideshow, iRate and Kalendas.

      But now I use the internal WP ajax library, so Minimax in theory isn’t required anymore. But maybe there are still unresolved linked dependencies.

      I will check Kalendas again. Thanks for reporting the bug. Do you have a link where I can see this situation?

      About the 6 months time, the new release extended the end time, check it in the Configuration item.

      And check if the XML is edited in your text editor as a reference. Check if it is underlined, if it’s the case select the broken chain button to delete the reference.

      Big regards.

  10. Allen dice:

    It did not work before but seems to work now to show events six months out. Thanks again!

  11. Allen dice:

    Another question – is there a way to customize the way Kalendas displays start time and end time for an event? Right now events in the popup box look like this:

    MEETING
    When September, 2. 2010 8:00 pm
    September, 2. 2010 10:00 pm
    Where My house

    Can we make it say

    MEETING
    Begins September 2, 2010 8:00 pm
    Ends September 2, 2010 10:00 pm
    Where My house

    • sebaxtian dice:

      Yes. I quote from the FAQ: “Can I set my own template to show the events? – Yes. Copy the file templates/kalendas_event.tpl into your theme directory and edit it as you want”.

  12. Bryan dice:

    Hello Sebastian,

    Great plugin, it’s going to work great for my needs.

    When I initially started using the plugin it worked fine… now suddenly I’m getting an error:
    ‘Can’t create the events list. Check your options.’

    This error is occurring within the page using the shortcode. The same calendar shows up fine when using the widget.

    Any ideas?

    Thanks,
    Bryan

  13. Christoph dice:

    Hi,

    the plugin works so far and is very nice, but when i first enter my page, i get an error like:

    “Warning: kalendas_create() [function.kalendas-create]: Node no longer exists in…”

    When i refresh the page, the error is gone!

    Do you have a solution?

    Beste regards

    Christoph

  14. Laura dice:

    I am getting the following error:

    Fatal error: Cannot instantiate non-existent class: simplexmlelement in …/kalendas.php on line 309

    Here is kalendas.php from line 307-319:
    if($data = kalendas_readfile($url)) {
    if($data[0]==”<") {
    $data = new SimpleXMLElement($data); //Parse the XML
    $out="”;
    foreach($data->entry as $item) {
    $gd = $item->children(‘http://schemas.google.com/g/2005‘);
    $where_attr = $gd->where->attributes();
    $when_attr = $gd->when->attributes();
    $out.=”".htmlspecialchars($item->title).”{$where_attr->valueString}{$when_attr->startTime}{$when_attr->endTime}”.htmlspecialchars($item->content).”"; //Add the entry to the XML file
    }
    $out.=”";
    }
    }

    I don’t understand PHP and couldn’t find a reason above why this might not be working. I am really excited to use your plugin but have to be able to sort this error.

    • sebaxtian dice:

      Hi Laura.

      Simplexml is a library required by Kalendas to parse the data from the XML file. It is wide used in servers today.

      Ask your system admin to install it in your site.

      Kind regards.

  15. John Lovell dice:

    The plug-in works but when it shows the details of an event, the time that it displays is an hour behind my calendars timezone. Is there a way to fix this?

  16. Gabriel Fjellander dice:

    Hi Sebastian. Great plugin and just what I needed (is there a donation link somewhere?). However, i just don’t get the popup displaying events details to work. The calendar on my site is (presently) located at http://laurentiistiftelsen.se/hjelmseryd/?p=12

    I would be very grateful for any help regarding this matter!

    Regards
    Gabriel Fjellander

    • sebaxtian dice:

      Hi Gabriel.

      Unfortunatelly in Colombia we do not have paypal for donations. Thanks anyway.

      I see your site calls two times thickbox.js. Deactivate the plugin wpng-calendar and check again. If this is the reason, send a thicket to the plugin developer to use the wp_register_script and wp_enqueue_script functions to solve this situation.

      Tell me how it goes so far.

      Kind regards.

      • Gabriel Fjellander dice:

        Hi!

        Ok, sorry to hear that. I like to donate to stuff I like.

        Anyway, thanks for your help so far! Though, it didn’t work. I have now deleted wpng that anyhow didn’t work as advertised, but I still don’t get any popup box.

        Regards

        • sebaxtian dice:

          Hi!

          Now something is calling jquery two times. Disable the s3slider plugin and check. If this solved the situation send a thicket to the developer suggesting to use the functions I mentioned in the other comment.

          Regards.

  17. Gabriel Fjellander dice:

    Hi again Sebastian.

    Everything works as it should now. Thanks again for all your help!

    I have two feature wishes:

    * The ability to have different amount of events in the widget and the post. I would like to have the 5 upcoming events in the sidebar but all of them on a Events page. Now I have to have all events in the widget because I want to be able to display them all on the Events page.

    * That the listing would show events that last several days with both start- and end-date. Exemple: 4 oct – 6 oct. This would be great! Of course should they have no end-date displayed if it is a single day event.

    Once again: Great plugin!

    Regards.

    • sebaxtian dice:

      Hi Gabriel.

      Great to hear it works.

      About your request, is easy to modify the code to set different amount of time for each call to kalendas, and to modify the date if there is one event (and only one event) and it ends other day. But I wouldn’t work on kalendas for about 2 weeks.

      Any other ideas you have tell me about them.

      Kind regards.

  18. Dennis dice:

    The time information displayed by the kalendas widget is wrong. In google calendar, it says it start at 9:40 a.m. In kalendas in says 2:40 a.m.

    My timezone settings in wordpress are set to Los Angeles such that:
    UTC time is 2010-10-29 4:06:01 Local time is 2010-10-28 21:06:01

    My Google ones are GMT-8

    If you go to my site http://www.troop101-wa.org and look at the Nov 11 entry you can see when it starts. Then click on the Calendar on the top and go to november 11 and see that the google calendar has it correct.

    Any suggestions?

    • sebaxtian dice:

      Hi Dennis.

      I have never tested Kalendas using a time zone with summer time. Look if you have enabled the time change booth in Google Calendar and in your WordPress (I’m not sure how to do this because I live in a country without summer time).

      If you found a way to solve it, I will love to add it to the FAQ.

    • sebaxtian dice:

      Can’t see your site, it leads me to this message “Forbidden – Users from your country are not permitted to browse this site”.

  19. Dennis dice:

    Warning: kalendas_create() [function.kalendas-create]: Node no longer exists in /home/troop101/troop101-wa.org/wordpress/wp-content/plugins/kalendas/kalendas.php on line 323

    If I click refresh on the page it will go away, but if I click update, it show up again. I removed most of the plug-ins, to see if there was a conflict, but it still happens.

    Also, for today, it says on Nov 1 there is a troop meeting today, but if I click calendar on the top and actually look at the google calendar, there isn’t a meeting…don’t know where that is comign from. Link is http://www.troop101-wa.org (i removed all the country blocks)

    • Dennis dice:

      If I tell Kalendas to “Show events until:” two weeks after, it displays correctly. If I select one month after, I get the error. two months after = works. 6 months after = works. 1 year after works. 1 day after = no evets programmed. 2 days after = works. 1 week after = works. two weeks after = works.

      one month after = error

      consistantly errors with one month after

  20. Dennis dice:

    Right now its actually not display some items. Like I have an event on December 9 and it doesn’t show in the kalendas plugin, but if you click the calendar link, you can see it there.

  21. Dennis dice:

    I am using UTC-8. If I used anything else, it does not display the time properly when I select the items, which is unfortunate because other items do not display properly when I run with UTC-8 (like the Whose been online Widget).

    I added your e-mail address so you should be good to go.

    • sebaxtian dice:

      Thanks Dennis. First idea here, dec 9 and jan 13 meetings goes in the same feed (looks like one is a copy from the other) and kalendas treat it as only one feed, that’s why only display the first meeting in the feed list (jan 13) even it’s far away. I will work on this today.

    • sebaxtian dice:

      Solved the recurrence situation, and ready for next release.

      In the feed there is a meeting in Nov25 but there isn’t one in the calendar… but I see you create a meeting with recurrence to create a troop meeting every 4th Thursday in the month, and Nov25 should have one…. strange it doesn’t show in the calendar but displays correctly in the feed.

      Ok, the other question. Does the calendar use the (GMT+00:00) time zone or is just in my account?

      Kind regards.

  22. Dennis dice:

    Google Calendar does use GMT+00:00

  23. Dennis dice:

    I changed calendar.google.com to use GMT+8. I changed the setting in WP to use Los Angeles.
    I redid the entries in calendar.google.com. They look correct in calendar.google.com put the Kalendas display has them incorrect. For example the Troop PLC Meeting in google calendar starts at 6:30 p.m., but Kalendas says it starts at 10:30 a.m. 8 hours early.

    • sebaxtian dice:

      I have an hypothesis. Go to your WP general settings (the same page where you can change the time zone) and see if the two times at the right side from the time zone selector (the UTC and the local time) are correct.

  24. Dennis dice:

    My current time is 6:37 a.m. The display looks correct:

    UTC time is 2010-11-18 14:37:30 Local time is 2010-11-18 6:37:30

  25. Dennis dice:

    Good job — THe December 9th event now shows up!!!!!!

    Don’t know why the November 25th event shows up twice. Time still is incorrect when I set the Timezone as Los Angeles in WP settings If I set it as UTC-8 it displays correctly.

  26. Dennis dice:

    Great job — Time Zone Solved!!!!!!!!!!

    Still a problem with reoccuring events. Like on November 25th, I deleted the reoccuring event for that day, so on the Google Calendar it doesn’t display, but on the Kalendas Calendar it is there. So to remove the confusion, I added a event that says “Thanksgiving – No Meeting”.

  27. Dennis dice:

    You’re the man! All problems solved!

  28. Hola. Acabo de tener un accidente informático grave, creo que mucho y no sé cómo intentar resolverlo. Me he acordado de ti.. Verás, trabajo con un blog de wordpress y al actualizar un pluggin de calendario me ha salido este error : Fatal error: Cannot redeclare class wp_locale in /h2/ecoasis.es/home/html/wp-includes/locale.php on line 14. A partir de aquí ya no me es posible entrar en la página. No tengo ni idea de qué puedo hacer. ¿alguna sugerencia? No tengo copia de seguridad y el pluging subido era event-calendar 6.5.2.1
    Gracias
    SALID

  29. Hola, ante todo gracias por tu respuesta, decirte que el problema es que no puedo acceder a ningún sitio, si pichas en http://www.ecoasis.es verás que automáticamente sale el mensaje de error. Igualmente al acceder a wordpress/admin y poner la contraseña me sale el mismo error. No sabemos qué hacer.
    gracias

    • sebaxtian dice:

      Si tienes acceso FTP al directorio donde está el sitio, modifica el nombre del directorio del plugin que te está poniendo problema (wp-content/plugins/event-calendar). Eso hará que se elimine el plugin de la base de datos.

  30. funciona perfecto!! gracias y gran idea!

  31. Dennis dice:

    This just started….I didn’t notice it when I went to RC1, but when I went to RC2 I noticed it.

    http://www.troop101-wa.org if you go to the site, the events look okay…
    Upcoming Events
    Today
    Troop PLC Meeting
    Cancelled – Troop PLC Meeting
    Jan 8
    Fundraiser
    Christmas Tree Pickup

    But if I click the update button, extra information appears:
    Upcoming Events
    TodayTroop PLC MeetingTroop PLC Meeting

    When
    Thursday, Jan 6. 2011 06:30 PM

    Thursday, Jan 6. 2011 07:30 PM

    Where
    Old South Bay Fire Department

    Cancelled – Troop PLC MeetingCancelled – Troop PLC Meeting

    When
    Thursday, Jan 6. 2011 06:30 PM

    Thursday, Jan 6. 2011 07:30 PM

    Where
    Old South Bay Fire Department

    Jan 8FundraiserFundraiser

    When
    Saturday, Jan 8. 2011

    Sunday, Jan 9. 2011

    That information is in the Google Calendar entry, but usually doesn’t display.

    • sebaxtian dice:

      Hi Dennis and happy new year.

      Looks like a theme’s bug. I saw it because I was the first reader of the day and the calendar gets updated while I read the page. But I have updated the page and I lost the code with the problem.

      Can you please set kalendas to get updated every hour, to get a way to see the bug myself.

  32. Dennis dice:

    I updated it to update on the hour. It will always display incorrectly for me.

    • sebaxtian dice:

      Hi Dennis. We are in our ‘feria’ here in Manizales (my little city) and I didn’t have time until today to check the bug.

      Looks like some plugin you use is applying a filter deleting the format that hide the ‘window’. The strange thing here is the filter gets applied only when calling the ajax functions.

      Try to find which plugin is responsible of this filter (maybe cache, security check, comment format or CEO plugin) and I will check what’s going wrong.

  33. Andreas dice:

    Hola! I have made a translation of your nice plugin into german. Would you like to get the files?

    Saludos de la Suiza..

    -Andreas

    • sebaxtian dice:

      Hi Andreas and thanks for the translation. I will add them into the plugin inmediatly.

      Send them to baxtian dot echeverry at gmail dot com.

      Also, I will add a link to your page from kalendas’ pages. I need a description of your site to add the link.

      Danke schön!

  34. Dennis dice:

    Lately when I try to click on a Kalendas calendar entry on my website, I just get a progress bar to display and the detail information does not show up. Site is http://www.troop101-wa.org I am running 3.3 of wordpress. Happens on Safari and IE browsers. Any suggestions?

  35. Dennis dice:

    Does this mean anything? I opened a ticked on th WordPress 3.3 beta forums and someone said this was the issue: Confirmed with a test on the site linked in the description (modified thickbox.css/js with chromium inspector).
    “In thickbox.css display:none was replaced by visibility:hidden (line 52). The thickbox will not be displayed if there is no property ‘display’, because thickbox checks the property ‘display’ (line 208 in thickbox.js). If you use e.g. tb_show in a javascript, it will not show the thickbox.

    • sebaxtian dice:

      Well, yes, this is how it happens, but as you use a beta I will wait until the official release. To solve your bug go to /wp-includes/js/thickbox/thickbox.css and change visibility:hidden with display:none (line 52).

  36. Dennis dice:

    That did the trick! It works fine now. Thanks.

  37. Dennis dice:

    I added some bad data in my google calendar entry and now my kalendas entry won’t display correctly. I deleted the bad data, but I can’t get the kalendas entry to display at all. I deleted the plug-in and readded it, but it still won’t display correctly.

    website is http://www.troop101-wa.org the bad data I believe is the & sign in description field. The error I am getting is:
    Warning: SimpleXMLElement::__construct() [simplexmlelement.--construct]: Entity: line 1: parser error : xmlParseEntityRef: no name in /home/dennis/public_html/wordpress/wp-content/plugins/kalendas/kalendas.php on line 405

Escriba su comentario