Differences

This shows you the differences between two versions of the page.

english:modules:calendar [2010/09/10 16:01]
Claus
english:modules:calendar [2018/06/03 18:09] (current)
Line 1: Line 1:
{{indexmenu_n>10}} {{indexmenu_n>10}}
-===== Calendar ===== +====== Calendar ======
-FIXME translate/rewrite+
 +Forum: [[http://forum.phpwcms.org/viewtopic.php?p=103834#p103834]]
-Download: [[http://forum.phpwcms.org/viewtopic.php?p=103834#p103834]] 
-Modul: {{:deutsch:module:20080519_calendar_dev.zip|Modul Kalender/Events //(ab V1.4.2 r348 integriert)//}} +> See the calendar in action //(without the filter at the right side)//
- +> [[http://iba-stadtumbau.de/index.php?praesentation-2010-kalender]]
-Changed file for wysiwyg output with picture from file center //(up to V1.4.2 r347)//:  +
-{{:deutsch:module:calendar01.zip|Complete set, CSS, Templ, php}} +
- +
-> See the calendar in action: +
-> [[http://www.iba-stadtumbau.de/index.php?news-aktuell]] +
-> [[http://www.iba-stadtumbau.de/index.php?kalender]]+
> >
> [[http://forum.phpwcms.org/viewtopic.php?p=106244#p106244]] > [[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 ==== ==== Installation ====
-Move template/inc_script/frontend_render/disabled/init-calendar.php into: **template/inc_script/frontend_render/init-calendar.php**+Part of the program to enable the calendar in the FE: **template/inc_script/frontend_render/init_calendar.php**
-<code php |h init-calendar.php |h>+<code php |h init_calendar.php |h>
<?php <?php
/************************************************************************************* /*************************************************************************************
Line 55: Line 57:
 * {CALENDAR:  * {CALENDAR:
 * items=100  * items=100
- * template=dates_list_de.html + * template=dates_list_en.html 
- * lang=de+ * lang=en
 * tag=tag1, tag2  * tag=tag1, tag2
 * tagmode=OR  * tagmode=OR
- * date_start=01.01.2009 + * date_start=TODAY|01.01.2009 
- * date_end=31.12.2010 + * date_end=TODAY|31.12.2010
 * href=index.php?calendar  * href=index.php?calendar
 + * WxHxCxQ=150x100x0x80       (since V1.1)
 * }  * }
 *  *
Line 68: Line 71:
 * {CALENDAR:2,main_page.tmpl,de en, href, tag1, tag2 tag2, tag3}      * {CALENDAR:2,main_page.tmpl,de en, href, tag1, tag2 tag2, tag3}    
 * [item count,[template[,language(en de - separated by space)[, href, tags, tag, tag, tag]]]]  * [item count,[template[,language(en de - separated by space)[, href, tags, tag, tag, tag]]]]
 + *
 + * (Please use the first Replacement Tag method)
 *  *
 **/    **/  
Line 86: Line 91:
\\ \\
-> In backend choose -> calendar/events and afterwards you should delete (or rename) the setup folder. The database now should contain the calendar tables.+> 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)//.
> >
-> Now again click the module link -> calendar/events and enter a new entry. Fill in all fields but the description+> 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
-> The picture feature will not be working at this time, the content of the calendar class didn't reveal anything, at least.+> In the original version "Description"and "image" does not work yet as implemented -> See [[english/modules/calendar/enhanced-v12]] / [[english/modules/calendar/enhanced-v13]].
> >
-> Now set up a new article and add a content part (CP) -> plain text.+ 
 +> Then create a new article with CP -> Simple Text.
> >
-> The replacement tag (RT) looks like //(from V1.42 r348 upwards)// this:+> The RT currently //(since V1.42 r348)// looks like this: 
 + 
 + 
 +==== TAGs of the calendar: ==== 
 +  
 +Forum: [[http://forum.phpwcms.org/viewtopic.php?p=106796#p106796]]
-Tags of the calendars: [[http://forum.phpwcms.org/viewtopic.php?p=106796#p106796]] 
<code> <code>
{CALENDAR: {CALENDAR:
items=10 items=10
-template=my_dates_list_de.html +template=my_dates_list_en.html 
-lang=de+lang=en
tag=tag1, tag2 tag=tag1, tag2
tagmode=OR tagmode=OR
-date_start=01.01.2010 +date_start=TODAY|01.01.2010 
-date_end=31.12.2010 +date_end=TODAY|31.12.2010
href=index.php?ebene06 href=index.php?ebene06
 +WxHxCxQ=150x100x0x80
} }
</code> </code>
-> tag1, tag2, and so on will be entered at calendar: (separated with ,)+ 
-> This way you can filter different groups for output purposes containing this(these) tag(s)+WxHxCxQ until [[english/modules/calendar/enhanced-v12]] / [[english/modules/calendar/enhanced-v13]]. \\ 
-> Tagmode: only OR possible at this time.+ 
 + 
 +> 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 template can be found in /template/calendar/
Line 116: Line 132:
\\ \\
-===== Deliver the text of the Wysiwyg Editor ===== +The integration in the /frontend_render/ has changed since v1.3.9, as the PHP class has been pushed to another place.
->  -> starting at line 105 /template/inc_script/phpwcmsCalendar.class.php +
->  -> Since V1.42 r348 from line 105 /include/inc_module/mod_calendar/inc/calendar.class.php+
-<code php> +From \\ 
-$items[$key] = $this->template; +- ##template/inc_script/calendar.class.php## \\ 
-$items[$key] = render_cnt_template($items[$key], 'HREF', $href); +to \\ 
-$items[$key] = render_cnt_template($items[$key], 'TITLE', html_specialchars($date['calendar_title'])); +- ##include/inc_module/mod_calendar/inc/calendar.class.php##
-$items[$key] = render_cnt_template($items[$key], 'TEXT', plaintext_htmlencode($date['calendar_teaser'])); +
-$items[$key] = render_cnt_template($items[$key], 'PLACE', html_specialchars($date['calendar_where'])); +
-$items[$key] = render_cnt_date($items[$key], $date['calendar_start_date'], $date['calendar_start_date'], $date['calendar_end_date']); +
-</code>+
-//(since V1.42 r348 URL and TARGET are added)//.+This determination is done in the file ##template/inc_script/frontend_render/init_calendar.php## //(see above)//.
-> -> insert +\\ 
-<code php> +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)//.
- $items[$key] = render_cnt_template($items[$key], 'TEXTLONG', $date['calendar_text'])+
-</code>+
-&gt; TEXTLONG is the placeholder for the template:+E.g. In the period the language &quot;en"; is specified, it must also be  specified in the TAG //(lang =en)//. \\
-\\ 
-==== Example text for TEXTLONG: ====+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. \\
-<code html|h Template|h> +The same goes for the "tag" in the call, the date corresponds to the field "calendar:". \\
-<div class="calendar"> +
-        <div class="date"+
-                <strong>{STARTDATE:d.m.}</strong><strong class="year">{STARTDATE:Y}</strong> +
-        </div>[TITLE] +
-        <h2>{TITLE}</h2>[/TITLE][PLACE] +
-        <p class="place">location: {PLACE}</p>[/PLACE][TEXT] +
-        <div class="teaser"> +
-                {TEXT} +
-        </div>[/TEXT] +
-        [TEXTLONG] +
-        <div class="textlong"> +
-                {TEXTLONG} +
-        </div>[/TEXTLONG] +
-</div> +
-</code>+
 +At first I would like this call
 +<file>
 +lang=
 +tag=
 +</file>
 +
 +
 +
 +
 +  * 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**
-===== Displaying pictures from file center: =====+<code css |h calendar.css |h> 
 +/* 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; 
 +}
-[[http://forum.phpwcms.org/viewtopic.php?p=107230#p107230]]+.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; 
 +}
->; ->; phpwcmsCalendar.class.php line 105 downwards (/template/inc_script/)+.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; 
 +}
-<code php> 
-$items[$key] = $this->template; 
-$items[$key] = render_cnt_template($items[$key], 'HREF', $href); 
-$items[$key] = render_cnt_template($items[$key], 'TITLE', html_specialchars($date['calendar_title'])); 
-$items[$key] = render_cnt_template($items[$key], 'TEXT', plaintext_htmlencode($date['calendar_teaser'])); 
-$items[$key] = render_cnt_template($items[$key], 'PLACE', html_specialchars($date['calendar_where'])); 
-$items[$key] = render_cnt_date($items[$key], $date['calendar_start_date'], $date['calendar_start_date'], $date['calendar_end_date']); 
-</code> 
-->; insert +  
-<;code php|h phpwcmsCalendar.class.php|h>+.calendar div.detail { 
-/*+    position: relativ; 
-* Get Image ID from DB String +    background-color: transparent
-*/ +    width: auto; 
-$image_temp = explode(":", $date['calendar_object'])+    line-height: 100%
-$image_temp = explode(";", $image_temp[9])+/*   float: left; */  
-$image_id_temp = $image_temp[0];+    margin: 0 0 0 170px
 +    padding: 0 0 10px 20px
 +    font-size: 0.9em; 
 +    border-left: 1px solid #ccc; 
 +}
-/** 
-* Get Image from DB table 'phpwcms_file' 
-*/ 
-$sql_hash = _dbQuery('SELECT * FROM '.DB_PREPEND.'phpwcms_file WHERE f_id = '.$image_id_temp.' AND f_trash = 0'); 
-if ($sql_hash[0][f_hash])  // KH 10.09.2010: Is there any image?  
- $image_calendar_name = PHPWCMS_FILES.$sql_hash[0][f_hash].'.'.$sql_hash[0][f_ext]; 
-else  
- $image_calendar_name = PHPWCMS_FILES.'image_placeholder.png'; 
-list($ic_width, $ic_height, $ic_type, $ic_attr) = getimagesize($image_calendar_name);+.calendar div.detail .image { 
 +    float: left; 
 +    margin: 0; 
 +    padding:0; 
 +    position: relativ; 
 +}
-$image_calendar = '<;img src=";'.$image_calendar_name.'"; width=";'.$ic_width.'" height="'.$ic_height.'" alt="" /&gt;';+.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&quot;, 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; 
 +}
-$items[$key] = render_cnt_template($items[$key], 'IMAGE_CALENDAR', $image_calendar); 
</code> </code>
-> Explanation: + 
-+//(Since V1.42 r348 the entries URL and TARGET are added )//
-> The first step will determine the ID of the picture filed under calendar_object of the database. +
-> Afterwards the picture name (hash) is calculated. Replacing the place holder IMAGE_CALENDAR with the appropriate image tag will be the last step then. +
-+
-> Restrictions: +
-+
-> No real picture size scaling - because no picture preview size can be set within calendar backend the picture output is corresponding to the originally uploaded size. At this time you'll have to process the needed picture sizes before uploading the pictures. +
-+
-> No image caption (ALT - TAG) - captions aren't rendered up to now, the ALT-TAG will be empty. +
-+
-> No enlargement / Lightbox - because no preview image is processed for the backend no lightbox link is shown (useless at this time)+
-+
-> Okay, I hope this is working for you. I've tested it under 1.3.9 R240.+
\\ \\
-==== Beispieltemplate mit TEXTLONG und IMAGE_CALENDAR: ====+==== Example template ==== 
 +** 
 +File:** template/calendar/TemplateFile.html
-<code html|h Template|h>+<code html|h template/calendar/TemplateDatei.html |h>
<div class="calendar"> <div class="calendar">
        <div class="date">         <div class="date">
-                <strong>{STARTDATE:d.m.}</strong><strong class="year">{STARTDATE:Y}</strong>+                <strong>{STARTDATE:d.m.}</strong><strong class="year">{STARTDATE:Y}</strong> - <strong>{ENDDATE:d.m.}</strong><strong class="year">{ENDDATE:Y}</strong>
        </div>[TITLE]         </div>[TITLE]
        <h2>{TITLE}</h2>[/TITLE][PLACE]         <h2>{TITLE}</h2>[/TITLE][PLACE]
-        <p class="place">Ort: {PLACE}</p>[/PLACE][TEXT]+        <p class="place">Location: {PLACE}</p>[/PLACE][TEXT]
        <div class="teaser">         <div class="teaser">
                {TEXT}                 {TEXT}
        </div>[/TEXT]         </div>[/TEXT]
-        [TEXTLONG] +
-        <div class="textlong"> +
-                {TEXTLONG} +
-        </div>[/TEXTLONG][IMAGE_CALENDAR] +
-                <div class="image_teaser"> +
-                {IMAGE_CALENDAR} +
-        </div>[/IMAGE_CALENDAR]+
</div> </div>
</code> </code>
Line 246: Line 368:
\\ \\
-===== Art der Bildholung ===== +=== Date formatting: ===
-[[http://forum.phpwcms.org/viewtopic.php?p=107258#p107258]]+
-> Leider ist diese Art der "Bildholung" überhaupt nicht zu empfehlen! 
-> Im System existiert eine universelle Methode, jedes Bild in der auch immer gewünschten Größe/Ausgabeformat zu erhalten. 
-> 
-> -> [[:deutsch:technik:aufruf-interner-funktionen:bilder|Bilder über cmsimage.php einbinden]] 
 +Parameters see: [[http://php.net/manual/de/function.date.php|Formats a specified time / date]]
-===== Image Tags ===== +Z.B
- +<code>{STARTDATE:l lang=en} the {STARTDATE:d.m.Y}</code> 
-Alternativ können Bilder aus der Dateizentrale auch über den ##img## Tag in das Dokument geholt werden.  +**Output:** Saturday the 22.01.2011
- +
-Siehe Tag: [[:deutsch:ersetzer_rts:frontend_render:imgx|imgx]]+
 +\\
english/modules/calendar.1284127299.txt.gz · Last modified: 2018/06/03 18:07 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0