This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Agenda/Event Calendar required

Requests for new symfony features.

Agenda/Event Calendar required

by pachocho » Wed Sep 10, 2008 11:21 am

Hello guys,

am I the only one who needs a calendar plugin?
I tried so many searches on this forum but I couldnt find anything usefull.

What I need to do, and I'm pretty sure many other people would use it, is a plugin to manage events.

The features I'm interested in are:

1) daily (with hours), weekly, monthly and yearly views
2) more than one event per day
3) events that repeat every day-week-month (I have no clue about how to do that...)
4) an easy way to manage them
5) maybe AJAX navigation and popups?

Years ago I used to build websites with dreamweavers and the interakt tools, does anyone remember interakt?
The calendar tool was great, and its exactly what i need....just based on symfony.

Thank you everybody
have a great day
Ernesto

[Mod: sensible title]
pachocho
Member
 
Posts: 87
Joined: Mon May 26, 2008 9:18 am
Location: Italy

Re: Agenda/Event Calendar

by halfer » Wed Sep 10, 2008 11:52 am

I had a month-based AJAX/jQuery one in development, although I broke something and haven't gone back to fix it. I will do so eventually but it's on a personal project and the event manager is not the biggest priority. If by the time I look at it again (few months time) there is no similar plugin, I will try to release some code. But don't hold your breath!

As you know there is another thread on this topic. Perhaps you could obtain the codebase for the demo that someone there was working on? If you create a plugin in the plugins section of this site, you may get assistance.
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Agenda/Event Calendar - am I the only one who needs that???

by michael.piecko » Wed Sep 10, 2008 11:59 am

This is a huge project for a plugin IMO. Maybe this is the reason why no one will do it for "free" ... :roll:

Michael
michael.piecko
Faithful Member
 
Posts: 624
Joined: Fri Jun 30, 2006 5:56 pm
Location: Germany

Re: Agenda/Event Calendar - am I the only one who needs that???

by pachocho » Wed Sep 10, 2008 12:24 pm

All rite, maybe it is a huge project...but this is a community, isnt it?
I thought that the meaning of a community is to split a huge job into several smaller jobs so that anyone can give a bit of help without leaving the massive job to one person...

I can understand if you say "its a massive job and is not on the top of the priority list", and maybe not many people would be interested in it...but I would have thought this is something quite common for a website so...

Anyway, what do you guys think I could do for this situation?
I can try and do it myself, but I really dont know how to manage repeated events (daily, weekly and so on...)

Thanks again
Ernesto
pachocho
Member
 
Posts: 87
Joined: Mon May 26, 2008 9:18 am
Location: Italy

Re: Agenda/Event Calendar - am I the only one who needs that???

by halfer » Wed Sep 10, 2008 1:19 pm

Hmm. Sounds like your understanding of community is: you have a requirement and you insist that everyone help you with it! As Michael's message implies, you can't do that if you're not paying people.

In general you'll find that plugins have been written to "scratch an itch" i.e. the programmer needed some functionality, wrote it in a generalised way, and was then kind enough to donate it to the community. If what you need is not already there, either (a) write it yourself, (b) collaborate with someone who also needs the same functionality, or (c) pay someone to write it for you.

If you decide to tackle it yourself, remember you can always ask for help in the General forum.
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Agenda/Event Calendar - am I the only one who needs that???

by weaverryan » Wed Sep 10, 2008 1:37 pm

Yea, like anything, it's really less of a problem with "need" and more of a problem with time. I'd love to have an event calendar, and I know a client of mine who would like one as well. If someone ever has enough time to put one together well AND share it, that'll be great. The additional time it takes to properly prepare something to the end of sharing it with the community has always been the biggest road block for me.
Ryan Weaver - CEO of KnpLabs US
Offering Symfony2 training May 19th & 20th - Nasvhille, TN and June 6th & 7th - New York, NY

http://www.thatsquality.com
@weaverryan
User avatar
weaverryan
Faithful Member
 
Posts: 784
Joined: Sat Nov 10, 2007 1:50 am
Location: Nashville, TN

Re: Agenda/Event Calendar - am I the only one who needs that???

by halfer » Wed Sep 10, 2008 1:43 pm

@weaverryan: I agree entirely. I have got my boss to agree in principle to my open-sourcing a few plugins, but the problem is I don't have time to package them up and write the README! I will try to one of these days...
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Agenda/Event Calendar - am I the only one who needs that???

by michael.piecko » Wed Sep 10, 2008 1:51 pm

And this is just the beginning ... Think of support, bugfixing, feature requests, etc. ... :shock:

Michael
michael.piecko
Faithful Member
 
Posts: 624
Joined: Fri Jun 30, 2006 5:56 pm
Location: Germany

Re: Agenda/Event Calendar - am I the only one who needs that???

by pachocho » Wed Sep 10, 2008 1:54 pm

I know, and I agree with you halfer.

Because there is nothing already made here in the symfony website, and I need a calendar like that in several websites, I'll have to creat one myself.

Now, I dont know how to pakage it up as a plugin, but I'll be happy to share my code with the rest of the community.

As I said before, the only thing I dont know how to implement, is the recurrency of an event.
If anyone can halp me understanding how to put that in place, that would be great.

Ernesto
pachocho
Member
 
Posts: 87
Joined: Mon May 26, 2008 9:18 am
Location: Italy

Re: Agenda/Event Calendar - am I the only one who needs that???

by halfer » Wed Sep 10, 2008 3:35 pm

OK great. You could make this into two plugins for flexibility: one to prove the various read screens (month, week, year etc) and another optional one to do the write stuff. Or these could be added into one plugin and an options mechanism (possibly involving sfGuard credentials) to determine who can add/edit/delete etc.

Personally I'd concentrate on the big structure stuff, and then work your way down to smaller things. Recurrent events should be implemented using a special table reserved for them - the alternative (creating lots of real events) is not possible for infinitely recurring events, and not a good idea if you need to exec more than a handful of inserts inside a web process.

Perhaps you could leave out recurrent stuff in the first cut, then add that later?
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Agenda/Event Calendar - am I the only one who needs that???

by halfer » Wed Sep 10, 2008 3:38 pm

michael.piecko wrote: And this is just the beginning ... Think of support, bugfixing, feature requests, etc. ... :shock:

Michael

True, although they aren't strictly necessary. To my mind, one can donate code to the community (which is a nice thing in itself) without feeling required to do all those extra things :)~ :-)~ :smile:
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Agenda/Event Calendar - am I the only one who needs that???

by pachocho » Thu Sep 11, 2008 10:37 am

Hello Halfer,
could you please be more specific about recurrent events?
They are so important in my project that I need to understand how to plan the calendar around them.
Do you know a good tutorial about that, even if is not made using symfony?
thanks
E
pachocho
Member
 
Posts: 87
Joined: Mon May 26, 2008 9:18 am
Location: Italy

Re: Agenda/Event Calendar - am I the only one who needs that???

by halfer » Thu Sep 11, 2008 2:53 pm

Well, I haven't given it much thought - I simply suggested that it will probably require a separate table. It is however too specific a problem for a tutorial to be available on it, in all likelihood. Why not download a random open-source calendar application and see how it is done there?
halfer
Faithful Member
 
Posts: 10148
Joined: Mon Jan 30, 2006 1:16 pm
Location: West Midlands, UK

Re: Agenda/Event Calendar - am I the only one who needs that???

by pachocho » Fri Sep 12, 2008 12:34 pm

do you already know one that I can "trust"?
pachocho
Member
 
Posts: 87
Joined: Mon May 26, 2008 9:18 am
Location: Italy

Re: Agenda/Event Calendar - am I the only one who needs that???

by jillelaine » Mon Sep 15, 2008 3:39 pm

I have a decent event calender working on my site. I'm using code from activecalendar http://www.micronetwork.de/activecalendar/ It appears to be cleanly written and well-documented.

Activecalendar has example code to read data from a mysql table http://www.micronetwork.de/activecalendar/demo/data/showcode .php?page=mysqlevents.php to display on 'event days'. I created a 'view' table as the data I want to display on 'event days' came from many tables, but I could have just used joins.

I initialized a new module, calendar, and made an indexSuccess.php template. I modified activecalendar's example mysql code to use criteria in my actions.class.php index function, and then added start and end date criteria to reduce the result set. I also optionally 'filter' (with buttons) by group to reduce results further.

I put the file activecalendar.php in my frontend/lib directory (this is the only file I needed from the activecalendar download...I think it could be modified to be a plugin?) and requireonce to load it in my actions.class.php . I modified the CSS to pretty things up.

I'm happy to share more of what I've done if it could be of use. (More code examples here: http://www.micronetwork.de/activecalendar/demo/examples.php )
jillelaine
Faithful Member
 
Posts: 230
Joined: Sun Jan 06, 2008 10:45 pm
Location: West Coast

Re: Agenda/Event Calendar - am I the only one who needs that???

by Kelta » Thu Feb 26, 2009 4:35 pm

jillelaine wrote: I have a decent event calender working on my site. I'm using code from activecalendar http://www.micronetwork.de/activecalendar/ It appears to be cleanly written and well-documented.

Activecalendar has example code to read data from a mysql table http://www.micronetwork.de/activecalendar/demo/data/showcode .php?page=mysqlevents.php to display on 'event days'. I created a 'view' table as the data I want to display on 'event days' came from many tables, but I could have just used joins.

I initialized a new module, calendar, and made an indexSuccess.php template. I modified activecalendar's example mysql code to use criteria in my actions.class.php index function, and then added start and end date criteria to reduce the result set. I also optionally 'filter' (with buttons) by group to reduce results further.

I put the file activecalendar.php in my frontend/lib directory (this is the only file I needed from the activecalendar download...I think it could be modified to be a plugin?) and requireonce to load it in my actions.class.php . I modified the CSS to pretty things up.

I'm happy to share more of what I've done if it could be of use. (More code examples here: http://www.micronetwork.de/activecalendar/demo/examples.php )


if you wouldn't mind, i would love to see your code for this (calendar module). :)~ :-)~ :smile:
Kelta
Junior Member
 
Posts: 18
Joined: Fri Oct 24, 2008 10:46 pm

Re: Agenda/Event Calendar required

by Kelta » Thu Feb 26, 2009 11:08 pm

never mind i got it to work!

thanks for the idea :)~ :-)~ :smile:

to save other people some time here is my code from my module:

action

Code: Select all
  public function executeCalendar()
  {
   /*
   ********************************************************************************
   Calendar Navigation variables
   ********************************************************************************
   */
   $this->myurl=$_SERVER['PHP_SELF']."?css=".@$_GET['css']; // the links url is this page
   $yearID=false; // GET variable for the year (set in Active Calendar Class), init false to display current year
   $monthID=false; // GET variable for the month (set in Active Calendar Class), init false to display current month
   $dayID=false; // GET variable for the day (set in Active Calendar Class), init false to display current day
   extract($_GET);
   /*
   ********************************************************************************
   Create a calendar object
   ********************************************************************************
   */
   $this->cal=new activeCalendar($yearID,$monthID,$dayID);
   /*
   ********************************************************************************
   Gets all dates from your database and set the calendar events html classes (for the layout)
   ********************************************************************************
   */
   
   $c = new Criteria();   
   $user = $this->getUser()->getGuardUser()->getId();
   
   $subSelect = "sf_guard_event_calendar.ID IN (SELECT sf_guard_event_calendar.ID
                  FROM sf_guard_user_group, sf_guard_group_event, sf_guard_event_calendar
                  WHERE sf_guard_user_group.USER_ID = $user
                    AND sf_guard_user_group.GROUP_ID = sf_guard_group_event.GROUP_ID
                    AND sf_guard_group_event.EVENT_ID = sf_guard_event_calendar.ID)";
   
   $c1 = $c->getNewCriterion(sfGuardEventCalendarPeer::USER_ID, $user);
   $c2 = $c->getNewCriterion(sfGuardEventCalendarPeer::ID, $subSelect, Criteria::CUSTOM);
   
   $c1->addOr($c2);
   
   $c->add($c1);
   $c->setDistinct();
   
   $eventList = sfGuardEventCalendarPeer: :doSelect($c);
      
   $eventID="event"; // sets the name of the generated HTML class on the event day (css layout)   
   foreach($eventList as $event)
   {
      $mysqlDay=$event->getEventDate('d'); // makes a day out of the database date
      $mysqlMonth=$event->getEventDate('m'); // makes a month out of the database date
      $mysqlYear=$event->getEventDate('Y'); // makes a year out of the database date
      $mysqlContent=$event->getEventTitle(); // gets the event content
      $mysqlLink= $this->generateUrl('event', array('id'=>$event->getPrimaryKey())); // gets the event link
      $this->cal->setEvent($mysqlYear,$mysqlMonth,$mysqlDay,$eventID); // set the event, if you want the whole day to be an event
      $this->cal->setEventContent($mysqlYear,$mysqlMonth,$mysqlDay,$mysqlContent,$mysqlLink); // set the event content and link
    }
  }


template

Code: Select all
<?php
$cal->enableDatePicker(); // this enables the month's datepicker (year range 2002 - 2010)
$cal->enableMonthNav($myurl); // this enables the month's navigation controls
echo $cal->showMonth(); // this displays the month's view
?>


activeCalendar.php renamed to activeCalendar.class.php and put in an autoloading lib dir
Kelta
Junior Member
 
Posts: 18
Joined: Fri Oct 24, 2008 10:46 pm

Re: Agenda/Event Calendar required

by vishant » Thu Mar 04, 2010 2:53 pm

You need to add events right?
How does your database look like?
vishant
Junior Member
 
Posts: 14
Joined: Thu Jan 14, 2010 1:08 pm
Location: suriname

Re: Agenda/Event Calendar required

by lucasaba » Thu Mar 04, 2010 3:31 pm

I used this: http://wiki.github.com/robmonie/jquery-week-calendar/

I think it's the best looking calendar I've seen.
Tehre are two problems:
1) it isn't very symfony-friendly
2) it displays only a weekly calendar

All the management is done via javascript. But, at least, it was the best looking of all.

As soon as Google will release google-calendar source... I'll switch to it :D~ :-D~ :grin:
It is easier to move a problem around (for example, by moving the problem to a different part of the overall network architecture) than it is to solve it.
6th truth - rfc1925
User avatar
lucasaba
Senior Member
 
Posts: 106
Joined: Tue Jun 12, 2007 5:33 pm

Re: Agenda/Event Calendar required

by hiad » Mon May 24, 2010 12:59 am

plz help me i dont know too much symfony and i need a groupware calendar , can someone copy full code and instructions
fffffffff
hiad
Junior Member
 
Posts: 5
Joined: Mon May 24, 2010 12:16 am
Location: colobmia