Differences

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

deutsch:module:kalender [2010/12/01 11:59]
Knut Heermann (flip-flop)
deutsch:module:kalender [2018/06/03 18:08] (current)
Line 12: Line 12:
\\ \\
 +
 +{{ :deutsch:module:be_termin_de_1.gif?300|}}
 +{{:deutsch:module:fe_kalendar_de_1.gif?300| }}
 +
 +~~CLEARFLOAT~~
 +\\
 +
==== Installation ==== ==== Installation ====
-Programmteil um den Kalender im FE zu aktivieren: **template/inc_script/frontend_render/init-calendar.php**+Programmteil um den Kalender im FE zu aktivieren: **template/inc_script/frontend_render/init_calendar.php**
<code php |h init_calendar.php |h> <code php |h init_calendar.php |h>
Line 53: Line 60:
 * 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)  * WxHxCxQ=150x100x0x80       (since V1.1)
Line 63: Line 70:
 * {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 90: Line 99:
> Der RT sieht zur Zeit //(ab V1.42 r348)// aus: > Der RT sieht zur Zeit //(ab V1.42 r348)// aus:
-Tags des Kalenders: [[http://forum.phpwcms.org/viewtopic.php?p=106796#p106796]]+==== TAGs des Kalenders: ==== 
 +  
 +Forum: [[http://forum.phpwcms.org/viewtopic.php?p=106796#p106796]] 
<code> <code>
{CALENDAR: {CALENDAR:
Line 98: Line 110:
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 +WxHxCxQ=150x100x0x80
} }
</code> </code>
-WxHxCxQ erst ab [[deutsch/module/kalender/erweitert-v11|Erweiterung V1.1]] / [[deutsch/module/kalender/erweitert-v12|Erweiterung V1.2]] verfügbar.+WxHxCxQ erst ab [[deutsch/module/kalender/erweitert-v11|Erweiterung V1.1]] / [[deutsch/module/kalender/erweitert-v12|Erweiterung V1.2]] / [[deutsch/module/kalender/erweitert-v13|Erweiterung V1.3]] verfügbar. \\
Line 113: Line 125:
> >
> Das Template liegt in /template/calendar/ > Das Template liegt in /template/calendar/
 +
 +\\
 +
 +Die Einbindung im /frontend_render/ hat sich seit V1.3.9 geändert, da die PHP Klasse an einen anderen Ort geschoben wurde.
 +
 +Von \\
 +- ##template/inc_script/calendar.class.php## \\
 +nach \\
 +- ##include/inc_module/mod_calendar/inc/calendar.class.php##
 +
 +Diese Festlegung geschieht in der Datei ##template/inc_script/frontend_render/init_calendar.php## //(siehe oben)//.
 +
 +\\
 +Wird der Kalender gerufen z.B. mit den oben abgebildeten Werten müssen die Filter übereinstimmen, wenn etwas angezeigt werden soll. //(Dieser Aufruf ersetzt vom Prinzip her einen CP, der diese eingetragenen Werte liefern würde)//.
 +
 +Z.B. Ist im Termin die Sprache "de" angegeben, muss diese auch im TAG //(lange=de)// angegeben sein. \\
 +Ist im Termin keine Sprache angegeben darf im Tag auch keine Sprache eingetragen sein, sonst wird nichts ausgeliefert. Denn "de" ist in der leeren Menge aus dem Termin nicht enthalten - also wird keine Ausgabe generiert. \\
 +Das Gleiche gilt für den Bereich "tag" im Aufruf, im Termin entspricht das dem Feld "Kalender:". \\
 +
 +Ich würde im Aufruf
 +<file>
 +lang=
 +tag=
 +</file>
 +erst einmal leer lassen um hier Probleme zu umgehen.
 +
 +
 +  * Die Templatedatei muss im Verzeichnis ##template/calendar/## existieren, sonst wird keine Ausgabe generiert  //(template=MeinKalenderTemplate.htm)//.
 +  * Anzahl der Ausgaben muss größer 0 sein //(items=100)//.
 +  * Der Tagmode ist im Moment noch inaktiv, es ist immer "OR" //(tagmode=OR)//.
 +  * Ab welchem Termindatum sollen Einträge ausgeliefert werden //(date_start=01.01.2009 oder date_start=TODAY)//.
 +  * Bis zu welchem Termindatum sollen Einträge ausgeliefert werden //(date_end=31.12.2010 oder date_end=TODAY)//.
 +  * Die Bezüge der Felder im Termineintrag zu den TAGs im Template siehe Grafik oben.  
\\ \\
Line 121: Line 166:
<code css |h calendar.css |h> <code css |h calendar.css |h>
-/* Calendar */+/* Calendar V1.1/2 */
.calendar { .calendar {
- padding: 10px 0 5px 0;  +    padding: 10px 0 5px 0; 
- margin: 0; +    margin: 0; 
- clear: left; +    clear: left; 
- margin: 0; +    margin: 0; 
- border-top: 1px solid #888; +    border-top: 1px solid #888; 
- width: 500px+    width: 600px
- margin-bottom:10px;+    margin-bottom:10px;
} }
-.calendar div.date + 
- float: left; +.calendar div.left
- position: relativ; +    float:left;  
- background-color: #baeaea+    position: relativ; 
- text-align: left;  +    text-align: left; 
- line-height: 100%; +    line-height: 100%; 
- width: 120px+    width: 150px; 
- height: 60px; +    margin: 0; 
- margin: 0; +    padding: 0 0 10px 0; 
- padding: 5px 0 10px 5px+    font-size: 1.0em; 
- font-size: 1.2em;+
 + 
 +.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 { .calendar div.detail {
- position: relativ; +    position: relativ; 
- background-color: transparent; +    background-color: transparent; 
- width: auto; +    width: auto; 
- line-height: 100%; +    line-height: 100%; 
-/* float: left; */ +/*   float: left; */  
- margin: 0 0 0 125px+    margin: 0 0 0 170px
- padding: 0px 0 10px 20px; +    padding: 0 0 10px 20px; 
- font-size: 1.3em+    font-size: 0.9em
- border-left: 1px solid #ccc;+    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 { .calendar div.date strong {
- width: 100px; +    letter-spacing: .06em;
- text-align: left; +
- padding-top: 5px; +
- letter-spacing: .06em;+
} }
-.calendar div.date div.day, + 
 +.calendar div.date div.day,
.calendar div.date div.day-short_month { .calendar div.date div.day-short_month {
- float: none; +    float: none; 
- padding: 0 0 10px 0; +    padding: 0 0 10px 0; 
- font-weight: bold; +    font-weight: bold; 
- letter-spacing: .1em; +    letter-spacing: .1em; 
- line-height: 108%; +    line-height: 108%; 
- font-size: 30px; +    font-size: 30px; 
- color: #888;+    color: #888;
} }
.calendar div.date div.day-short_month { .calendar div.date div.day-short_month {
- letter-spacing: .01em;+    letter-spacing: .01em;
} }
 +
.calendar div.date div.day-word { .calendar div.date div.day-word {
- float: none; +    float: none; 
- padding: 0 0 4px 0; +    padding: 0 0 4px 0; 
- margin: 0; +    margin: 0; 
- font-weight: bold; +    font-weight: bold; 
- letter-spacing: .1.5em; +    letter-spacing: .1.5em; 
- line-height: 108%;+    line-height: 108%;
} }
.calendar div.date div.day-month-year { .calendar div.date div.day-month-year {
- float: none; +    float: none; 
- padding: 0; +    padding: 0; 
- font-weight: normal; +    font-weight: normal; 
- letter-spacing: .05em; +    letter-spacing: .05em; 
- line-height: 100%;+    line-height: 100%;
} }
.calendar div.date div.year { .calendar div.date div.year {
- float: none; +    float: none; 
- width: auto; +    width: auto; 
- padding: 0; +    padding: 0; 
- font-weight: normal; +    font-weight: normal; 
- letter-spacing: .1em; +    letter-spacing: .1em; 
- line-height: 108%;+    line-height: 108%;
} }
- +
- +
.calendar div.detail h2 { .calendar div.detail h2 {
-/* padding: 1px 0 2px 120px; */ +/*   padding: 1px 0 2px 120px; */ 
- margin: 0; +    margin: 0; 
- padding: 0 0 10px 0; +    padding: 0 0 10px 0; 
- font-size: 1.5em; +    font-size: 1.5em; 
- font-family: "HelveticaNeue Condensed", "Arial Narrow", "Helvetica Condensed", Arial, Helvetica, sans-serif; +    font-family: "HelveticaNeue Condensed", "Arial Narrow", "Helvetica Condensed", Arial, Helvetica, sans-serif; 
- font-weight: normal+    font-weight: bold
- line-height: 100%; +    line-height: 100%; 
- color: #666;+    color: #666;
} }
.calendar div.detail p { .calendar div.detail p {
- padding: 0 0 0 0; +    padding: 0 0 0 0; 
- margin: 0;+    margin: 0
 +    font-size: 1.0em;
} }
.calendar div.detail p.place { .calendar div.detail p.place {
- font-weight: bold+    font-weight: normal
- color: #666; +    color: #666; 
- font-size: 1.1em; +    padding-bottom: 3px;
- padding-bottom: 3px;+
} }
-.calendar div.detail div.textlong +.calendar div.detail .textshort
- font-weight: normal; +    font-weight: normal; 
- color: #666; +    color: #666; 
- font-size: 1.0em+    padding-bottom: 3px; 
- 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 { .calendar div.detail a {
- text-decoration: none;+    text-decoration: none;
} }
.calendar div.detail h2 a { .calendar div.detail h2 a {
- color: #7C8084;+    color: #7C8084;
} }
.calendar div.detail a:hover { .calendar div.detail a:hover {
- color: #000000; +    color: #000000; 
- text-decoration: underline+    text-decoration: underline;
-+
-.calendar div.teaser { +
- line-height: 140%; +
- margin: 0; +
- padding: 0;+
} }
</code> </code>
-\\ 
-===== Text des Wysiwyg Editors ausliefern ===== 
->  -> ab Zeile 105 /template/inc_script/phpwcmsCalendar.class.php 
->  -> Seit V1.42 r348 ab Zeile 105 /include/inc_module/mod_calendar/inc/calendar.class.php 
- 
-<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> 
//(Ab V1.42 r348 sind die Einträge URL und TARGET hinzugekommen)//. //(Ab V1.42 r348 sind die Einträge URL und TARGET hinzugekommen)//.
-> -> das einfügen 
-<code php> 
- $items[$key] = render_cnt_template($items[$key], 'TEXTLONG', $date['calendar_text']); 
-</code> 
- 
-> TEXTLONG ist hier der Platzhalter der in das Template kommt: 
\\ \\
-==== Beispieltemplate mit TEXTLONG: ====+==== Beispieltemplate ==== 
 +** 
 +Datei:** template/calendar/TemplateDatei.html
<code html|h template/calendar/TemplateDatei.html |h> <code html|h template/calendar/TemplateDatei.html |h>
Line 288: Line 353:
                {TEXT}                 {TEXT}
        </div>[/TEXT]         </div>[/TEXT]
-        [TEXTLONG] +
-        <div class="textlong"> +
-                {TEXTLONG} +
-        </div>[/TEXTLONG]+
</div> </div>
</code> </code>
Line 298: Line 360:
\\ \\
 +=== Datummsformatierung: ===
-===== Darstellung von Bilder aus der Dateizentrale: =====+Paramter siehe: [[http://php.net/manual/de/function.date.php|Formatiert ein(e) angegebene(s) Ortszeit/Datum]]
-[[http://forum.phpwcms.org/viewtopic.php?p=107230#p107230]] +Z.B
- +<code>{STARTDATE:l lang=de} der {STARTDATE:d.m.Y}</code> 
-> -> phpwcmsCalendar.class.php ab Zeile 105 (/template/inc_script/) +**Ausgabe:** Samstag der 22.01.2011
- +
-<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> +
- +
--> das einfügen +
- +
-<note warning> +
-**Diese Art der Bilddarstellung bitte nicht mehr verwenden, [[deutsch/module/kalender/erweitert-v12|siehe V1.2]]!!**  +
-</note> +
- +
-<code php|h phpwcmsCalendar.class.php|h+
-  +
- // + KH: 10.09.2010 +
- /** +
- * Get Image ID from DB String +
- */ +
- $image_calendar = ''; +
- $image_temp = explode(":", $date['calendar_object']); +
- $image_temp = explode(";", $image_temp[9]); +
- $image_id_temp = $image_temp[0]; +
-  +
- /** +
- * 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'); +
-  +
- //dumpVar($sql_hash[0][f_hash]); +
- if ($sql_hash[0][f_hash]) { +
- $image_calendar_name = PHPWCMS_FILES.$sql_hash[0][f_hash].'.'.$sql_hash[0][f_ext]; +
-  +
- list($ic_width, $ic_height, $ic_type, $ic_attr) = getimagesize($image_calendar_name); +
-  +
-// $image_calendar = '<img src="'.$image_calendar_name.'" width="'.$ic_width.'" height="'.$ic_height.'" alt="" />'; +
- $image_calendar = '<img src="img/cmsimage.php/'.$ic_width.'x'.$ic_height.'/'.$image_id_temp.'.'.$sql_hash[0][f_ext].'" alt="" />'; +
-  +
-+
- else  +
- $image_calendar_name = ''; +
-  +
- $items[$key] = render_cnt_template($items[$key], 'IMAGE_CALENDAR', $image_calendar); +
- // + KH: 10.09.2010  ENDE +
-</code> +
- +
-> Erläuterung: +
-+
-> Im ersten Schritt wird die ID des Bildes ermittelt das in der Datenbank unter calendar_object abgelegt ist. +
-> Dann wird der Bildname (hash) sowie die Bildgröße aus der Datenbank ermittelt. Im letzten Schritt wird dann der Platzhalter IMAGE_CALENDAR durch den Image-tag ersetzt. +
-+
-> Einschränkungen: +
-+
-> Keine Bildskalierung - Da im Kalender Backend keine Bildgröße für die Vorschau festgelegt werden kann, entspricht die Bildausgabe den original Dimensionen des in der Dateizentrale hochgeladenen Bildes. Im Moment muss also schon vor dem hochladen die Bildgröße entsprechend auf das gewünschte Ausgabeformat angepasst werden. +
-+
-> Keine Bildunterzeile (ALT - TAG) - Die Bildunterzeile wird zur Zeit noch nicht beachtet, der ALT-TAG is somit noch leer. +
-+
-> Keine Vergrößerung / Lightbox - Da im Backend kein Vorschaubild erstellt wird, habe ich auch keinen Link für die Lightbox erstellt. +
-+
-> So, ich hoffe es funktioniert bei euch soweit. Getestet habe ich es unter 1.3.9 R240.+
\\ \\
- 
-==== Beispieltemplate mit TEXTLONG und IMAGE_CALENDAR: ==== 
- 
-<code html|h template/calendar/TemplateDatei.html|h> 
-<div class="calendar"> 
-        <div class="date"> 
-                <strong>{STARTDATE:d.m.}</strong><strong class="year">{STARTDATE:Y}</strong> - <strong>{ENDDATE:d.m.}</strong><strong class="year">{ENDDATE:Y}</strong> 
-        </div>[TITLE] 
-        <h2>{TITLE}</h2>[/TITLE][PLACE] 
-        <p class="place">Ort: {PLACE}</p>[/PLACE][TEXT] 
-        <div class="teaser"> 
-                {TEXT} 
-        </div>[/TEXT] 
-        [TEXTLONG] 
-        <div class="textlong"> 
-                {TEXTLONG} 
-        </div>[/TEXTLONG][IMAGE_CALENDAR] 
-                <div class="image_teaser"> 
-                {IMAGE_CALENDAR} 
-        </div>[/IMAGE_CALENDAR] 
-</div> 
-</code> 
- 
- 
-\\ 
- 
-===== Art der Bildholung ===== 
-[[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]] 
- 
- 
-===== Image Tags ===== 
- 
-Alternativ können Bilder aus der Dateizentrale auch über den ##img## Tag in das Dokument geholt werden.  
- 
-Siehe Tag: [[:deutsch:ersetzer_rts:frontend_render:imgx|imgx]] 
- 
deutsch/module/kalender.1291201171.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