[solved][EventsManeger] Display events in a calendar view

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
clemmy
New Member
New Member
Posts: 9
Joined: Tue Aug 04, 2009 2:51 pm

[solved][EventsManeger] Display events in a calendar view

Post by clemmy »

Hello to everybody.

Hi have a website running cmsms and I'm currently experimenting a new functionality: I would like user to be able to make reservations for some events that i'm promoting. So far I've done some test with EventManager module and FrontEndUsers module, and it looks very promising.. I've got just one problem:

The summary template of EventManager displays the upcoming events in list view, but I would like to display them in calendar view (I like monthly calendars).

I've searched in the forum but have not found anything useful, a part from one user who tried to integrate the EventManager and CGCalendar modules... but he had no success and eventually gave up.

So far I had just one idea that could possibly solve this problem, but it's really inelegant! I can build a calendar table with a php script, and populate each day with the relative events by calling the EventsManager module multiple times with the syntax

Code: Select all

{EventsManager show='custom' start_datetime='$day'}
I don't know if it work, but in any case is look quite inelgant: it requires to call the module too much times! (once for every day of the month!)

I think there should be a better solution for this! And I think it's a feature that many user would appreciate.. it's quite surprising that I'm not finding any previous discussion about this on the forums...

Can somebody point me to a smarter solution?



Thank you very much for any help
Last edited by clemmy on Wed Jul 04, 2012 10:46 am, edited 2 times in total.
clemmy
New Member
New Member
Posts: 9
Joined: Tue Aug 04, 2009 2:51 pm

Re: [EventsManeger] Display events in a calendar view

Post by clemmy »

Well, some visits but no reply yet. I've tried my dirty hack of calling the EventManager module multiple times, once for every day of the month, and it is barelyworking.. (just one problem left, see end of the post)

To build the montly calendar view I could have used one of the php scripts that are available on internet, but since I just wanted to do a quick test I've installed CGCalendar and modified it's template, in order to call EventManager events rather than it's own events..

The relevant modification to the CGCalendar template is the following:
1. find and delete this lines:

Code: Select all

<td {if isset($day.class)}class="{$day.class}"{/if}>
{if isset($day.events.0)}<a href="{$day.url}">{$key}</a>
<ul>
{foreach from=$day.events item=event}
<li><a href="{$event.url}">{$event.event_title}</a></li>
{/foreach}
</ul>
{else}{$key}{/if}
</td>
2. Replace them as follows:

Code: Select all

<td>{$key}<br/>
{EventsManager lang="it_IT" summarytemplate="calendario" show='custom' start_datetime="$year-$month-$key 00:00:00" end_datetime="$year-$month-$key 23:59:59"}
</td>

As I said it is working, but a problem persist: if and event lasts more than one day, it is not displayed! I guess I should hack a little bit the start_datetime and end_datetime parameters... but I don't have any idea at the moment...
Last edited by clemmy on Wed Jul 04, 2012 10:44 am, edited 2 times in total.
clemmy
New Member
New Member
Posts: 9
Joined: Tue Aug 04, 2009 2:51 pm

Re: [EventsManeger] Display events in a calendar view

Post by clemmy »

Edit:

I'm sorry... there was a problem with the test event I made before.. now I've build a new one, and it seems that is correctly displayed on the calendar, for every day!



I guess that I can mark this thread as SOLVED, even if more elegant solutions are possibly feasible..
Locked

Return to “Modules/Add-Ons”