{CALENDAR:
items=10
template=my_dates_list_de.html
lang=de
tag=tag1, tag2
tagmode=OR
date_start=01.01.2010
date_end=31.12.2010
href=index.php?ebene06
WxHxCxQ=150x100x0x80
}
\\
===== Template: =====
Hinzugefügt **TEXTLONG** für den Wysiwyg Text und **IMAGE_CALENDAR** für das kleine Vorschaubild und Originalbild //(LightBox)//:
[TEXTLONG]{TEXTLONG}[/TEXTLONG]
[IMAGE_CALENDAR]{IMAGE_CALENDAR}[/IMAGE_CALENDAR]
Startdatum: {STARTDATE:d.m.}{STARTDATE:Y}
Enddatum: {ENDDATE:d.m.}{ENDDATE:Y}
[IMAGE_CALENDAR]{IMAGE_CALENDAR}[/IMAGE_CALENDAR]
Die Ausführung der **LightBox** wird im Termin durch den Schalter **[x] LightBox** gesteuert. \\
[x] Klick vergrößern ist ohne Funktion.
Technik: Die Bilder werden über das Verfahren "cmsimage" geladen.
\\
===== PHP: =====
Etwa ab Zeile 105 in /include/inc_module/mod_calendar/inc/calendar.class.php
nach
// Patch KH 26.11.10: http://www.phpwcms-howto.de/wiki/doku.php/deutsch/module/kalender?s[]=calendar
$items[$key] = render_cnt_template($items[$key], 'TEXTLONG', $date['calendar_text']);
// + KH: 28.11.2010
$items[$key] = render_cnt_template($items[$key], 'IMAGE_CALENDAR', $this->image_calendar($date));
\\
nach (etwa Zeile 141)
// +KH: We want to set the size of the image, and such more in the reptag.
$default['WxHxCxQ'] = empty($match['WxHxCxQ']) ? '' : preg_replace('/[^0-9x]/', '', trim($match['WxHxCxQ']));
\\
nach (etwa Zeile 154)
// +KH: We want to set the size of the image, and such more in the reptag.
$default['WxHxCxQ'] = '120x120x0x90';
\\
nach (etwa Zeile 209)
$this->WxHxCxQ = $default['WxHxCxQ']; // +KH 28.11.10
\\
Am Ende der Datei zwischen
/**
* =======================================
* + KH: 28.11.2010
* Insert value for TAG: WxHxCxQ and
* LightBox switch in calendar input
* =======================================
*/
function image_calendar(&$date) {
/**
* Get Image ID from $data
* [image] => Array
* (
* [id] => 2
* [name] => ImageName.jpg
* [zoom] => 1
* [lightbox] => 1
* [caption] => Caption text
* [link] => http://example.com
* )
*/
$temp = unserialize($date['calendar_object']);
$img_cal = '';
if ($temp['image']['id']) {
$temp_id = $temp['image']['id'];
$temp_alt = ($temp['image']['caption']) ? $temp[image][caption] : $temp[image][name];
$temp_title = ($temp['image']['caption']) ? $temp[image][caption] : '';
$temp_WxH = $GLOBALS['phpwcms']['img_prev_width'].'x'.$GLOBALS['phpwcms']['img_prev_height'];
// LightBox = ON ?
if ($temp['image']['lightbox']) {
initSlimbox();
$img_cal = '';
$img_cal .= '
';
}
else
$img_cal = '
';
}
return $img_cal;
} // ===== END function image_calendar
\\
===== Download V1.1: =====
* include/inc_module/mod_calendar/inc/calendar.class.php
* template/inc_script/frontend_render/init_calendar.php
* template/calendar/calendar.html
* template/inc_css/specific/calendar.css
{{:deutsch:module:kalender:calendar_v11.zip|}}
\\
--- //[[flip-flop@myrealbox.com|Knut Heermann (flip-flop)]] 2010/11/29 01:37//