{{indexmenu_n>10}} ====== Calendar ====== Forum: [[http://forum.phpwcms.org/viewtopic.php?p=103834#p103834]] > See the calendar in action //(without the filter at the right side)//: > [[http://iba-stadtumbau.de/index.php?praesentation-2010-kalender]] > > [[http://forum.phpwcms.org/viewtopic.php?p=106244#p106244]] \\ {{ :english:modules:be_termin_en_1.gif?300|}} {{:english:modules:fe_calendar_en_1.gif?300| }} ~~CLEARFLOAT~~ \\ ==== Installation ==== Part of the program to enable the calendar in the FE: **template/inc_script/frontend_render/init_calendar.php** parse($content['all']); } ?> \\ > Click in backend MODULES -> calendar/events and then delete the setup directory if not yet done. Now the appropriate calendar tables are created in the database. //(In newer versions of CMS, the "_Setup" directory not be deleted)//. > > Then back on modules -> calendar/events and put in a new entry. Except for the "Description"and "image" please fill out everything and make a test. > In the original version "Description"and "image" does not work yet as implemented -> See [[english/modules/calendar/enhanced-v12]] / [[english/modules/calendar/enhanced-v13]]. > > Then create a new article with CP -> Simple Text. > > The RT currently //(since V1.42 r348)// looks like this: ==== TAGs of the calendar: ==== Forum: [[http://forum.phpwcms.org/viewtopic.php?p=106796#p106796]] {CALENDAR: items=10 template=my_dates_list_en.html lang=en tag=tag1, tag2 tagmode=OR date_start=TODAY|01.01.2010 date_end=TODAY|31.12.2010 href=index.php?ebene06 WxHxCxQ=150x100x0x80 } WxHxCxQ until [[english/modules/calendar/enhanced-v12]] / [[english/modules/calendar/enhanced-v13]]. \\ > Put in tag1, tag2, etc. is in the events calendar at "calendar:", comma separated. > With these TAGs e.g. "tag1" you can filter the output for different groups. > Tagmode: At the moment only OR possible. > > The template can be found in /template/calendar/ \\ The integration in the /frontend_render/ has changed since v1.3.9, as the PHP class has been pushed to another place. From \\ - ##template/inc_script/calendar.class.php## \\ to \\ - ##include/inc_module/mod_calendar/inc/calendar.class.php## This determination is done in the file ##template/inc_script/frontend_render/init_calendar.php## //(see above)//. \\ If the calendar is called for example with the values ​​shown above, the filter should match, if anything is to be displayed. //(This call principle replaces a CP, which would deliver this assumption)//. E.g. In the period the language "en" is specified, it must also be specified in the TAG //(lang =en)//. \\ If no language is specified in the Schedule, in the tag may also be entered no language, nothing else is shipped. Because "de" is not included in the empty set from the date - so no output is generated. \\ The same goes for the "tag" in the call, the date corresponds to the field "calendar:". \\ At first I would like this call lang= tag= * The template file must be exist in the directory ##template/calendar/##, otherwise no output is generated //(template=MyCalendarTemplate.htm)//. * Number of issues must be greater than 0 //(items=100)//. * At this time the tagmode is inactive, it is always "OR" //(tagmode=OR)//. * Ab welchem Termindatum sollen Einträge ausgeliefert werden //(date_start=01.01.2009 or date_start=TODAY)//. * Up to which date are entries to be delivered? //(date_end=31.12.2010 or date_end=TODAY)//. * The remuneration of the fields in the date entry to the tags in the Template see graphic above. \\ ==== CSS: ==== File: **template/inc_css/specific/calendar.css** /* Calendar V1.1/2 */ .calendar { padding: 10px 0 5px 0; margin: 0; clear: left; margin: 0; border-top: 1px solid #888; width: 600px; margin-bottom:10px; } .calendar div.left { float:left; position: relativ; text-align: left; line-height: 100%; width: 150px; margin: 0; padding: 0 0 10px 0; font-size: 1.0em; } .calendar div.left .date { position: relativ; background-color: lightgrey; text-align: left; line-height: 100%; width: 150px; height: 60px; margin: 0; padding: 5px 0 10px 0; font-size: 1.0em; } .calendar div.detail { position: relativ; background-color: transparent; width: auto; line-height: 100%; /* float: left; */ margin: 0 0 0 170px; padding: 0 0 10px 20px; font-size: 0.9em; border-left: 1px solid #ccc; } .calendar div.detail .image { float: left; margin: 0; padding:0; position: relativ; } .calendar div.detail .teaser { line-height: 140%; margin: 0 0 0 160px; padding: 0; } .calendar div.date p { width: 135px; text-align: left; margin: 5px 0 0 5px; } .calendar div.date strong { letter-spacing: .06em; } .calendar div.date div.day, .calendar div.date div.day-short_month { float: none; padding: 0 0 10px 0; font-weight: bold; letter-spacing: .1em; line-height: 108%; font-size: 30px; color: #888; } .calendar div.date div.day-short_month { letter-spacing: .01em; } .calendar div.date div.day-word { float: none; padding: 0 0 4px 0; margin: 0; font-weight: bold; letter-spacing: .1.5em; line-height: 108%; } .calendar div.date div.day-month-year { float: none; padding: 0; font-weight: normal; letter-spacing: .05em; line-height: 100%; } .calendar div.date div.year { float: none; width: auto; padding: 0; font-weight: normal; letter-spacing: .1em; line-height: 108%; } .calendar div.detail h2 { /* padding: 1px 0 2px 120px; */ margin: 0; padding: 0 0 10px 0; font-size: 1.5em; font-family: "HelveticaNeue Condensed", "Arial Narrow", "Helvetica Condensed", Arial, Helvetica, sans-serif; font-weight: bold; line-height: 100%; color: #666; } .calendar div.detail p { padding: 0 0 0 0; margin: 0; font-size: 1.0em; } .calendar div.detail p.place { font-weight: normal; color: #666; padding-bottom: 3px; } .calendar div.detail .textshort { font-weight: normal; color: #666; padding-bottom: 3px; font-size: 1.0em; } .calendar div.detail .other { font-weight: normal; color: #666; padding-bottom: 3px; font-size: 0.9em; } .calendar div.detail .textlong { font-weight: normal; color: #666; padding-bottom: 3px; font-size: 1.0em; } .calendar div.detail a { text-decoration: none; } .calendar div.detail h2 a { color: #7C8084; } .calendar div.detail a:hover { color: #000000; text-decoration: underline; } //(Since V1.42 r348 the entries URL and TARGET are added )//. \\ ==== Example template ==== ** File:** template/calendar/TemplateFile.html
{STARTDATE:d.m.}{STARTDATE:Y} - {ENDDATE:d.m.}{ENDDATE:Y}
[TITLE]

{TITLE}

[/TITLE][PLACE]

Location: {PLACE}

[/PLACE][TEXT]
{TEXT}
[/TEXT]
\\ === Date formatting: === Parameters see: [[http://php.net/manual/de/function.date.php|Formats a specified time / date]] Z.B. {STARTDATE:l lang=en} the {STARTDATE:d.m.Y} **Output:** Saturday the 22.01.2011 \\