Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)Help needed with plugin to retrieve events from a different calendar
Pages: [1]   Go Down
Print
Author Topic: Help needed with plugin to retrieve events from a different calendar  (Read 833 times)
0 Members and 1 Guest are viewing this topic.
Tanus
New Member
*

Karma: 0
Offline Offline

Posts: 15


WWW
« on: December 30, 2007, 05:59:00 PM »

I am considering making my own plugin to get a set of particular events from one calendar to show up in another calendar.

I feel confident enough on how to start my work on this plugin, except that I will need one advise on how to populate the selected events back to the main event-variables in the calendar.cgi-file? I am planning to use the 'display_before_getEvents'-handle to select the events from the other calendar.

As far as I can see, the getEvents-procedure will overwrite whats already put in there if I am using $Template::EVENTS? As calendar.cgi is doing this:
Code:
$Template::EVENTS = $events;
Any suggestions? Rewrite this one line in the calendar.cgi-file?

Otherwise I could end further processing from my plugin and do it all inside my plugin... This does not seems like an good option to me as it might cause problems with other plugins in the future.

(I am already using Meta Calendar, to gather info from several calendars including those in question. In this case I will only select a set of events matching a given criteria).
Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: December 30, 2007, 10:50:17 PM »

** In this case I will only select a set of events matching a given criteria **

The Meta Calendar 2 plug-in allows that or you might be able to use the Different categories idea mod in conjunction with the original Meta Calendar plug-in. The Search Link plug-in might also be able to be used if the events can be displayed as search results.

** I need advise on how to populate the selected events back to the main event-variables in the calendar.cgi file? **

How is it done in the Meta Calendar plug-in? (I can't remember, it's been so long since I looked at its code).

Dan O.

Logged
Tanus
New Member
*

Karma: 0
Offline Offline

Posts: 15


WWW
« Reply #2 on: December 31, 2007, 04:34:21 AM »

After a bit more of thinking during the night, and your referral to the Meta Calendar, I think I will base my own little plugin on the Meta Calendar. I think it has basically all the features I need with just a few rather small modifications.

Thank you for the quick answer!
Logged
Tanus
New Member
*

Karma: 0
Offline Offline

Posts: 15


WWW
« Reply #3 on: January 03, 2008, 09:56:08 AM »

Just for information purposes. My first own little plugin doing this stuff is now finished Smiley

(But as I needed the same hook as MetaCalendar (v1), I created my own little hook in the calendar.cgi-file... This was the easy way out from the problem raised in the next topic: http://www.calendarscript.com/support/forum/using-same-hook-for-two-or-more-plugins-t1842.0.html)

Logged
Pages: [1]   Go Up
Print
Jump to: