NAVIGATION
This is an old revision of the document!
Hinzugefügt: Wysiwyg Text und Thumb mit LighBox
Vorschaubild TAG beim Aufruf: z.B. WxHxCxQ=150x100x0x80 (WIDTHxHEIGHTxCROPxQUALITY)
TAG-Set:
{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 }
Hinzugefügt TEXTLONG für den Wysiwyg Text und IMAGE_CALENDAR für das Vorschaubild und Originalbild (LightBox):
[TEXTLONG]{TEXTLONG}[/TEXTLONG] [IMAGE_CALENDAR]{IMAGE_CALENDAR}[/IMAGE_CALENDAR]
Die Ausführung der LightBox wird im Termin durch den Schalter LightBox gesteuert.
Die Bilder werden über das Verfahren “cmsimage” geladen.
Etwa ab Zeile 105 in /include/inc_module/mod_calendar/inc/calendar.class.php
nach
$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']);
folgendes einfügen
// 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));
Am Ende der Datei zwischen
if( !$this->dates ) { $this->dates = array(); } }
und
} ?>
folgende Funktion einfügen
/** * ======================================= * + 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 = '<a href="img/cmsimage.php/'.$temp_WxH.'/'.$temp_id.'" rel="lightbox[CALXYZ2]" alt="'.$temp_alt.'" title="'.$temp_title.'" target="_blank">'; $img_cal .= '<img src="img/cmsimage.php/'.$this->WxHxCxQ.'/'.$temp_id.'" alt="'.$temp_alt.'" title="'.$temp_title.'" border="" /></a>'; } else $img_cal = '<img src="img/cmsimage.php/'.$this->WxHxCxQ.'/'.$temp_id.'" alt="'.$temp_alt.'" title="'.$temp_title.'" />'; } return $img_cal; } // ===== END function image_calendar
— Knut Heermann (flip-flop) 2010/11/29 01:37