[resolved] Calendar personnalised with 2 pages ...

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
tynmar

[resolved] Calendar personnalised with 2 pages ...

Post by tynmar »

Hi,

I'm happy (and proud) tu use CMS Made simple. I'm french, I want to do something very simple. I can do that with a simple database & php but with templates, I'm lost.

Here is what I want : 2 pages with events sorted by date :
- the first page will show the events in the futur
- the second page will show the events passed

For example :

Futur events :
10 september 2006 > Faire la fête toute la nuit

... 1 week later >>

Passed events :

10 september 2006 > Faire la fête toute la nuit


Is there a module which could do this or will I do this by myself ?

PS : excuse my frenglish ..


Thanks a lot
Last edited by tynmar on Mon Sep 11, 2006 2:54 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Calendar personnalised with 2 pages ...

Post by calguy1000 »

Check out the calendar module, I'm fairly confident that with the calendar module you can do most of what you want.  and it wouldn't take much to add this functionality if it's not there already.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
tynmar

Re: Calendar personnalised with 2 pages ...

Post by tynmar »

Ok, I worked all night.  :'( I dont know PHP object & method ... I can't learn it because I have to do this before wednesday, time missing.
I began to create a module with module maker, & skeleton. I am really stupid and I don't understand at all how to do something really simple.

I want this :

Page1
Image

Page2
Image

This is not moon ? I can't do this with calendar because you can't show events of 2 - 3 or more months in the same time.

(ps : I hope you can understand my approximative english :D )

thanks to give me the way to realize this
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Calendar personnalised with 2 pages ...

Post by Dr.CSS »

You can use the calendar mod. to do this, these are the parameters it takes...
note the display options, the upcominglist one can be used for the future and all the rest can be called with other parameters...

What Parameters Exist?
display Acceptable values:
"calendar" - displays events for the current month in a traditional grid. Inclues links to prev. and next months.
"list" - displays events for the current month as a list. Includes links to prev. and next months.
"yearlist" - displays events for the current year in a list. Includes links to prev. and next years.
"upcominglist" - displays all upcoming events. No prev/next links.
Defaults to "calendar" (optional)
category Only display items for that category. Leaving unset, will show all categories. Note that you can limit to muliple categories by separating each one with a comma.(optional)
month Display entries for a particular month. If year is not set, then the current year is assumed. This option only works if display is set to "list" or "calendar". (optional)
year Display entries for a particular year. This option only works if display is set to "list" or "calendar". (optional)
limit Set to the maximum number of events to display. This option only works if display is set to "list" or "upcominglist". (optional)
first_day_of_week Set to the first day of the week as a number between 0 and 6 (0 = Sunday). Default is 1 (Monday). This option only works if display is set to "calendar". (optional)
summaries Set to 1 to display the summary information or 0 to not display it in calendar mode. Default is 1. (optional)
detail Set to 1 to display the detail information or 0 to not display it in list mode. Default is 0. (optional)
table_id Id to set for this calendar or list. This is useful for applying CSS styling. Default is "calendar-". (optional)
date_format Format to display the event's date (as used in strftime()). Default is "%d/%b/%Y". (optional)
use_session Use a session variable to store the current month of the calendar. Default is ture. (optional)
compact_view Set to 1 to hide the navigation links. Helpful to show current month's events on the home page. Default is 0. (optional)
reverse Set to true to display events in reverse chronological order. Applicable to list and upcominglist displays. Default is false. (optional)
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada

Re: Calendar personnalised with 2 pages ...

Post by Greg »

Put this in the 'List Template'

{if $compact_view neq 1}
{$lang.prev}
{if $day > 0}{$day} {/if}{$month_names[$month]} {$year}
{$lang.next}{/if}
Event{$lang.date}Summary
{foreach from=$events key=key item=event}

    {$event.event_title}
   

{assign var=month_number value=$event.event_date_start|date_format:"%m"}
{assign var=end_month_number value=$event.event_date_end|date_format:"%m"}
{if $event.event_date_start == $event.event_date_end || $event.event_date_end == ""}
{$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y"}
{else}
{if $event.event_date_start|date_format:"%d%m%Y" == $event.event_date_end|date_format:"%d%m%Y"}
{$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y %H:%M"} {$lang.to} {$event.event_date_end|date_format:"%H:%M"}
{else}
{$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y %H:%M"} {$lang.to} {$event.event_date_end|date_format:"%d"} {$month_names[$end_month_number]} {$event.event_date_end|date_format:"%Y %H:%M"}
{/if}
{/if}
   
   
{if $event.event_summary !="" && ($detail != 1 || ($event.event_details =="" ||  $event.event_details == "
"))}
{$event.event_summary}
{/if}
   
   
{/foreach}

{if $return_url != ""}
{$return_url}
{/if}
Greg
tynmar

Re: Calendar personnalised with 2 pages ...

Post by tynmar »

Ok,

thank you so much. That works very well. But now I want to show the passed event. Is there a param like display="downcominglist"   ;D (that doesn't work).

Will I need to modify or create a template ?
I suppose I have to change this :
{foreach from=$events key=key item=event}
- - - -
{/for}


I'm not a template master  :D . Thank you for your help.
Greg
Power Poster
Power Poster
Posts: 598
Joined: Sun Sep 26, 2004 6:15 pm
Location: Saskatchewan - Canada

Re: Calendar personnalised with 2 pages ...

Post by Greg »

How about a list of events by year
Create a page with this tag:

Code: Select all

{cms_module module='Calendar' table_id='cmscaly' display='yearlist' first_day_of_week='0'}

And a list by month
Create a page with this tag:

Code: Select all

{cms_module module='Calendar' table_id='cmscalm' display='list' first_day_of_week='0'}
Greg
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Calendar personnalised with 2 pages ...

Post by calguy1000 »

In SVN I Modified Calendar to have a display=pastlist parameter.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
tynmar

Re: Calendar personnalised with 2 pages ...

Post by tynmar »

calguy1000 wrote: In SVN I Modified Calendar to have a display=pastlist parameter.
Can you explain more please. This is really intersting !  :)  How can I do this, what is SVN ?
Pierre M.

Re: Calendar personnalised with 2 pages ...

Post by Pierre M. »

SVN is the development version of cmsms. (alpha software).
See http://wiki.cmsmadesimple.org/index.php ... vn_version
Our devs are responsive, aren't they ?-)

PM
Last edited by Pierre M. on Thu Sep 07, 2006 2:29 pm, edited 1 time in total.
tynmar

Re: Calendar personnalised with 2 pages ...

Post by tynmar »

I downloaded the SVN with this command (I'm with linux ubuntu)
svn checkout http://svn.cmsmadesimple.org/svn/calendar
Then I have 3 folders "branches", "tags" & "trunk".

What should I do now ?
I took the version "0.7alpha2" and uploaded it. But the  display=pastlist  does not work. Then I took all the files in the Trunk folder and uploaded it. Then, I got this :
Fatal error: Call to undefined function: createevent() in /home/tynmar/www/centreduson/modules/Calendar/method.upgrade.php on line 46

I don't know where I'm wrong. Thanks a lot for your help.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Calendar personnalised with 2 pages ...

Post by calguy1000 »

svn checkout http://svn.cmsmadesimple.org/svn/calendartrunk Calendar

That'll do what you want.

BTW, are you using CMS Made simple 1.0B6 ?
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
tynmar

Re: Calendar personnalised with 2 pages ...

Post by tynmar »

svn: Échec de la requête PROPFIND sur '/svn/calendartrunk'
svn: Could not open the requested SVN filesystem

??? ??? ???
I only use linux svn command. 'dont understand...

I'm on cmsms 0.13. Once downloading file with svn, what should i do ? I have tu Paste the Calendar folder into my Module folder of cmsms ?


Edit : I think you wanted to write /svn/calendar/trunk. I can not install this. When I click Install in module, I've got that :
Fatal error: Call to undefined function: createevent() in /home/martyn/www/centreduson/modules/Calendar/method.install.php on line  77
Last edited by tynmar on Thu Sep 07, 2006 3:19 pm, edited 1 time in total.
alby

Re: Calendar personnalised with 2 pages ...

Post by alby »

tynmar wrote: svn: Échec de la requête PROPFIND sur '/svn/calendartrunk'
svn: Could not open the requested SVN filesystem

??? ??? ???
I only use linux svn command. 'dont understand...
try:

Code: Select all

svn checkout http://svn.cmsmadesimple.org/svn/calendar/trunk  Calendar
Alby
tynmar

Re: Calendar personnalised with 2 pages ...

Post by tynmar »

I'm sorry, I'm really really really really stupid.  :-\
Please, read all this
- The SVN work perfectly. OK
- I don't work on my server, so I must upload the folder Calender on my server (in the modules folder) OK
- I go in my cmsms admin, in the module section. OK
- I see Calendar (all right), but Calendar is not installed. I cannot use Calendar if this is not installed !
- I click "Install" > error !!!

Here is the error I see :

Code: Select all

Fatal error: Call to undefined function: createevent() in /home/martyn/www/centreduson/modules/Calendar/method.install.php on line  77
In this file, we can see the from line 77 :

Code: Select all

$this->CreateEvent('EventAdded');
$this->CreateEvent('EventEdited');
$this->CreateEvent('EventDeleted');
$this->CreateEvent('CategoryAdded');
$this->CreateEvent('CategoryEdited');
$this->CreateEvent('CategoryDeleted');
It seems that this function is not defined for me (and maybe for everybody). Or maybe cmsms wants to waiste my time  :D

I use CMS Made Simple 0.13 "Canary"

Thanks for keeping this module working.  ;)
Locked

Return to “Modules/Add-Ons”