[resolved] Calendar personnalised with 2 pages ...
[resolved] Calendar personnalised with 2 pages ...
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
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.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Calendar personnalised with 2 pages ...
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.
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.
Re: Calendar personnalised with 2 pages ...
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

Page2

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
)
thanks to give me the way to realize this

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

Page2

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

thanks to give me the way to realize this
Re: Calendar personnalised with 2 pages ...
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)
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)
Re: Calendar personnalised with 2 pages ...
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
Re: Calendar personnalised with 2 pages ...
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"
(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
. Thank you for your help.
thank you so much. That works very well. But now I want to show the passed event. Is there a param like display="downcominglist"

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

Re: Calendar personnalised with 2 pages ...
How about a list of events by year
Create a page with this tag:
And a list by month
Create a page with this tag:
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
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Calendar personnalised with 2 pages ...
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.
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.
Re: Calendar personnalised with 2 pages ...
Can you explain more please. This is really intersting !calguy1000 wrote: In SVN I Modified Calendar to have a display=pastlist parameter.

Re: Calendar personnalised with 2 pages ...
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
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.
Re: Calendar personnalised with 2 pages ...
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.
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.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Calendar personnalised with 2 pages ...
svn checkout http://svn.cmsmadesimple.org/svn/calendartrunk Calendar
That'll do what you want.
BTW, are you using CMS Made simple 1.0B6 ?
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.
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.
Re: Calendar personnalised with 2 pages ...
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
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.
Re: Calendar personnalised with 2 pages ...
try: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...
Code: Select all
svn checkout http://svn.cmsmadesimple.org/svn/calendar/trunk Calendar
Re: Calendar personnalised with 2 pages ...
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 :
In this file, we can see the from line 77 :
It seems that this function is not defined for me (and maybe for everybody). Or maybe cmsms wants to waiste my time 
I use CMS Made Simple 0.13 "Canary"
Thanks for keeping this module working.

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
Code: Select all
$this->CreateEvent('EventAdded');
$this->CreateEvent('EventEdited');
$this->CreateEvent('EventDeleted');
$this->CreateEvent('CategoryAdded');
$this->CreateEvent('CategoryEdited');
$this->CreateEvent('CategoryDeleted');

I use CMS Made Simple 0.13 "Canary"
Thanks for keeping this module working.
