Events plugin

Creating and modifying plugins.
Post Reply
MrDoom
Regular
Posts: 7
Joined: Mon Apr 07, 2008 1:41 am

Events plugin

Post by MrDoom »

I installed the events plugin but it doesn't seem to want to show my events.

This is the microformat code I entered:

Code: Select all

<events>
<event summary="Games Grads 08" location="Manchester" url="http://www.gamesgrads.co.uk/" dtstart="20080429T1100" dtend="20080429T1630" />
<event summary="Download Festival 2008" location="Donington Park" url="http://downloadfestival.co.uk/home/" dtstart="20080613T0001" dtend="20080615T2359" />
<event summary="Midlands MCM Expo" location="International Centre Telford" url="http://www.mcmexpo.net/midlandsmcmexpo/index.html" dtstart="20080913T1100" dtend="20080913T1700" />
</events>
But nothing shows up, it doesn't even work with the example code.

Anyone got any ideas?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Events plugin

Post by garvinhicking »

Hi!

Which events plugin are you referring to? serendipity_event_mycalendar? serendipity_event_microformats?

Which PHP version are you using, does it have "--with-xml" enabled properly?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
MrDoom
Regular
Posts: 7
Joined: Mon Apr 07, 2008 1:41 am

Re: Events plugin

Post by MrDoom »

garvinhicking wrote:Which events plugin are you referring to? serendipity_event_mycalendar? serendipity_event_microformats?
Dunno, all it's called in my admin panel is "events" but I think I called it that.

The two eventy sounding plugins I have are "serendipity_event_microformats" and "serendipity_plugin_eventwrapper".
garvinhicking wrote:Which PHP version are you using, does it have "--with-xml" enabled properly?
PHP 4.4.4 and yes.

If it helps, this is the description for the plugin:
Display upcoming and recommended events in the sidebar and apply the hCalendar microformat to them.
MrDoom
Regular
Posts: 7
Joined: Mon Apr 07, 2008 1:41 am

Post by MrDoom »

So no-one knows?

I think there is something wrong with the "serendipity_event_microformats" plugin since I get this warning from PHP when adding an article.
Warning: Wrong parameter count for range() in /blog/plugins/serendipity_event_microformats/serendipity_event_microformats.php on line 249
I have tried re-downloading the plugin from this site and re-uploading it replacing the original but the message still appears.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

I'll try to nudge mattsches into this direction. But I believe that he has created a new version of the plugin that completely replaces the old one.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 9:35 pm
Location: Wiesbaden, Germany
Contact:

Post by mattsches »

Hey MrDoom,

I think it's got something to do with your PHP version. The behavior of the range() function changed in PHP5, this is a bug that has been reported before, sorry. I'm about to commit an update to this plugin within the next weeks - however, it will then unconditionally require PHP5.

One thing you can try to do now is change the code in serendipity_event_microformats.php, line 249 from

Code: Select all

$ratings    = array('hReview' => range(1.0, $this->get_config('best'), $this->get_config('step')));
to

Code: Select all

$ratings    = array('hReview' => range(1.0, $this->get_config('best')));
Hope that helps
- Mattsches
MrDoom
Regular
Posts: 7
Joined: Mon Apr 07, 2008 1:41 am

Post by MrDoom »

Hmm, that fixed the warning message but I still don't see any events.

I also get two more warnings when previewing a post:
Warning: Invalid argument supplied for foreach() in /blog/plugins/serendipity_event_microformats/serendipity_event_microformats.php on line 128

Warning: Invalid argument supplied for foreach() in /blog/plugins/serendipity_event_microformats/serendipity_event_microformats.php on line 233
If it's too much trouble to fix those on PHP4, my host should be upgrading to PHP5 soon so I can use your new version then.
mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 9:35 pm
Location: Wiesbaden, Germany
Contact:

Post by mattsches »

I think that would be the best way to go, sorry. However, the new version will not present events in the sidebar. If that's what you want, please tell me, and I will try to take that into account for the next update :wink:

I've already got sth. like that up and running on my blog (right sidebar, scroll down), but these events are fetched from external services like upcoming.org or last.fm events.

Regards
- Mattsches
MrDoom
Regular
Posts: 7
Joined: Mon Apr 07, 2008 1:41 am

Post by MrDoom »

Yeah, that's kind what I was hoping to use it for. If you could incorporate that into the release, that would be great. Thanks :D
Post Reply