Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Anleitungen Kalenderfunktion
#1
Die Kalenderfunktion ist ein Plugin und muss über CM-Simple gepflegt werden. Einfach nach dem Login das Calendar-Plugin auswählen und auf Kalender-Einstellungen gehen. Die Eingabe erfolgt immer nach dem gleichen Schema:

Datum ; Termin ; Ort ; Link ; Zeit

Datumsbeispiel: 24-12-2007 oder auch 24-12-2007,27-12-2007
Linkbeispiel: http://www.WEBSEITE.xxx), Linktext
Zeitbeispiel: 14:25
Grüße von Oliver
#2
Version 0.7
This version of Svarrers Calendar is modded by Tory, based on Svarrers Version 0.5

New functionality compared to the original version are:

* Nextevent Function gives the possibility to display the next coming event compared to current time-day.
* Changed way of sorting events, so that several events on the same day are sorted by day AND time.
* Changed way of handling events over several days. The event can now be entered with start day-time and end day-time. They are displayed on the event page only with the start day-time and end day-time - but the end day-time respectively start day-time are added to the event, so when viewing the events you can see when the event ends/starts.
* You can select (In Plug-in config: ['show_between_dates'] true/false) whether events between start- and end-day will be highlighted in the Calendar-view
* New items are added to:

Language file:

['event_time'] = Time - Text displayed over the time column.
['event_start'] = Begins - Text added to the End date when displayed in the Events page or MouseOver Event in Calendar
['event_end'] = Ends - Text added to the Start date when displayed in the Events page or MouseOver Event in Calendar
['prev_button_text'] = Prev month - Text displayed when holding the mouse over prev in Calendar
['next_button_text'] = Next month - Text displayed when holding the mouse over next in Calendar

Config file:

['show_between_dates'] = true or false - Displays dates in between start and end date on events over several days in the Calendar.
['event_width_time'] = 6% - The width of the time field in the events page

Style sheet:

.event_data_row td{border: 0px;background-color: #C4E3CF;} - Change the background of events in eventspage
.event_heading_row td{border: 0px;background-color: #4FA472;} - Change the bakground of headings in eventpage
.nextevent_date{color: #ffff55;font-size:8px;font-weight:bold;font-style:italic;font-family:verdana,tahoma,arial;text-align: left;margin-top:0px;padding-left: 5px;padding-bottom:5px;} - The look of the Date displayed in Nextevent
.nextevent_event{width:90%;color: white;font-size:8pt;font-weight:bold;font-family:verdana,tahoma,arial;text-align: left;padding: 5px;} - The look of the Event displayed in Nextevent
.nextevent_location{width:90%;color: white;font-size:8pt;font-weight:normal;font-family:verdana,tahoma,arial;text-align: left;padding: 5px;} - The look of the Location displayed in Nextevent

So be aware if you are upgrading from earlier versions, that you keep your own language files, config file and style sheet, but you have to add the above lines manually, if you want to keep your settings.
Setting up calendar

1. Add calendar to a page
Create a page containing the calendar. The calendar is displayed where you put the code below.

Code:
#cmsimple $output.=calendar('','','somepage')#

This will display current month and year and link events to eventspage called somepage

The code below will display current month and next month

Code:
#cmsimple $output.=calendar('','','somepage'); $output.=calendar(date("Y",time()),date("n",time())+1,'somepage');#

Code:
#cmsimple $output.=calendar('2008',4'','somepage')#

This will display the calendar for April 2008 and links events to somepage

To display the Calendar in the Template you put in this code:
<?php echo calendar("","","somepage"); ?> or
<?php echo calendar("2008","4","somepage"); ?>

2. Add events page
Create a page called e.g.. somepage on the page add the code below.

Code
#cmsimple $output.=events();#

This will display events for current year and month.

The code below will display events for current month plus next two months

Code
<H1>somepage</H1>
#cmsimple $output.=events();
$output.=events(date("Y",time()),date("n",time())+1);
$output.=events(date("Y",time()),date("n",time())+2);#

If you want to display the events from the month you select in the calendar use this code, also the selected month + 2 months (maybe you should edit the content file directly to make this work properly).

Code
<H1>somepage</H1>
#cmsimple if($year=='')$year = date("Y",time());
if($month=='')$month = date("n",time());
$output.=events($year,$month);
if($month=='12'){$year++;$month=1;}else{$month++;}$output.=events($year,$month);
if($month=='12'){$year++;$month=1;}else{$month++;}$output.=events($year,$month);#

Code
<H1>somepage</H1>
#cmsimple $output.=events();# This will display the events for current Year and Month
#cmsimple $output.=events(’’,’’,’12’);# This will display the events from current month, Year and next 12 month.
#cmsimple $output.=events(’1’,’2008’,’’);# This will display the events for January 2008

To display the Next Coming Event in the Template you put in this code:
<?php echo nextevent(); ?>

3. Managing the calendar plug-in
The plug-in can be managed by logging into cmsimple as manager, select the calendar plug-in from the available plug-ins drop down box. and you are off, the events are managed in the main settings, the style sheet, config or language from the corresponding buttons.

Events are added using this order:
<DateStart,DateEnd,EndTime>;<Event>;<Location>;<Link,LinkTxT>;<StartTime>

Events are added using this format:
<dd-mm-yyyy,[dd-mm-yyyy],[tt:mm]>;<Event>;<Location>;[<Link,[LinkTxT]]>;[StartTime]

[]: items can be omitted

If <Time and Location> is given as ### it identifies its a birthday and age is calculated to be displayed on the event page.

Link can be internal e.g..: int:News or external e.g..: ext:www.google.com

Event File Examples:

28-10-2007;Trip to Copenhagen by bus;Depart from the Railway Station;int:Trips_By_Bus,Participate;08:00
20-9-2007;testevent1;At home;;12:00
20-9-2007;testevent2;At home;ext:www.google.com,To Google;11:24
19-9-2007,22-11-2007,17:00;The Pool is closed cause repair;Poolside;;09:00
3-3-1957;Torben;###
Grüße von Oliver




Benutzer, die gerade dieses Thema anschauen: 1 Gast/Gäste