iCalendar to Google Calendar
Page: 1, 2
Ilija Studen
on Dec 30. 2006. 11:04 am
Easy: just use User::isAdministrator() method to do the check.
activeCollab team member
tjsingleton
on Jan 3. 2007. 6:26 am
You make this too easy!
Code with administrator check added.
Code with administrator check added.
/**
* Show calendar for active milestones
*
* @param void
* @return null
*/
function active_ical() {
$this->setLayout('ical');
$user = $this->loginUserByToken();
if(!($user instanceof User)) {
header('HTTP/1.0 404 Not Found');
die();
} // if
if(!$user->isAdministrator()) {
header('HTTP/1.0 404 Not Found');
die();
} // if
$this->renderCalendar($user, lang('active milestones'), ProjectMilestones::getActiveMilestones());
} // active_ical
Ilija Studen
on Jan 3. 2007. 6:47 am
tjsingleton:You make this too easy!
Things are not always that easy, but I try to make them as easy to use as possible :)
activeCollab team member
tjsingleton
on Jan 3. 2007. 7:51 pm
Did anything change between .7.0 and .7.1 that would have effected this? for some odd reason it stopped working after I upgraded to .7.1 last night. I haven't had time to debug it yet, but was just curious.
tjsingleton
on Jan 12. 2007. 4:32 am
My bad. I forgot that I added a method to the model!
That was added to models/project_milestones/ProjectMilestones.class.php
/**
* Return active milestones that are active
*
* @return array
*/
static function getActiveMilestones() {
return self::findAll(array(
'conditions' => array('`completed_on` = ?', EMPTY_DATETIME),
'order' => '`due_date`'
)); // findAll
} // getActiveMilestonesThat was added to models/project_milestones/ProjectMilestones.class.php
wobster.de
on May 12. 2007. 9:19 pm
Thanks for that great pice of code - both the big part and the smal part ;)
Just wanted to let you know that the tutorial links seems to be dead - maybe you could supply the tutorial again?
http://www.focusedtutorials.com/2006/12/29/sync-your-activecollab-with-your-google-calendar/
greetings
Sebastian
Just wanted to let you know that the tutorial links seems to be dead - maybe you could supply the tutorial again?
http://www.focusedtutorials.com/2006/12/29/sync-your-activecollab-with-your-google-calendar/
greetings
Sebastian
Link update http://www.focusedtutorials.com/misc/sync-your-activecollab-with-your-google-calendar/
Robert Stevenson-Leggett
------------------------------
==Developer
==Student
------------------------------
==Developer
==Student
ideamarket
on Nov 8. 2007. 4:31 pm
Is this tutorial still relevant to the latest version of AC? I'm not seeing any links to iCalendar anywhere that I can then import into Google Calendar.



