{{indexmenu_n>10}} ====== Erweitert Wysiwyg-Text u. Bild (V1.1) ====== **Hinzugefügt:** * Wysiwyg Text * Thumb mit LightBox * TAG für Vorschaubild beim Aufruf: z.B. ##WxHxCxQ=150x100x0x80## //(WIDTHxHEIGHTxCROPxQUALITY)// \\ ---- Docu: -- \\ Forum: -- **Autor:** K.Heermann (flip-flop) http://planmatrix.de \\ **CMS Version:** >= V1.4.2 r348 \\ **Version:** V1.1 //(29.11.2010)// \\ **Verzeichnis:** include/inc_module/mod_calendar/inc/ * \\ **Bedingung:** -- ---- \\ **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 } \\ ===== 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]
[TITLE]

{TITLE}

[/TITLE] [PLACE]

Ort: {PLACE}

[/PLACE] [HREF]
HREF: {HREF}
[/HREF] [URL]
URL: {URL}[TARGET]{TARGET}[/TARGET]
[/URL] [TEXT]
{TEXT}
[/TEXT] [TEXTLONG]
{TEXTLONG}
[/TEXTLONG]
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 $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)); \\ nach (etwa Zeile 141) $default['href'] = empty($match['href']) ? '' : trim($match['href']); folgendes einfügen // +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) $default['tagmode'] = 'OR'; folgendes einfügen // +KH: We want to set the size of the image, and such more in the reptag. $default['WxHxCxQ'] = '120x120x0x90'; \\ nach (etwa Zeile 209) $this->limit = $default['items']; $this->href = $default['href']; folgendes einfügen $this->WxHxCxQ = $default['WxHxCxQ']; // +KH 28.11.10 \\ 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 = ''; $img_cal .= ''.$temp_alt.''; } else $img_cal = ''.$temp_alt.''; } 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//