NAVIGATION
translate
Eine erweiterte Version von galleryx.php. ….. → V1.2
I denke dass dies hier die letzte Verison ist, bevor jemand ein Modul aus macht (z.B. galleryx TAG-Generator). Alle Parameter sind dazu vorbereitet.
Danke an “Claus”, für die stundenlange Testarbeit und Anregungen.
Docu: –
Forum: http://forum.phpwcms.org/viewtopic.php?f=8&t=18266
Autor: K.Heermann (flip-flop) http://planmatrix.de
CMS version: >= 1.3.x
Version: V1.2.2
Tag: Siehe Beschreibung
Dateiname:Siehe Beschreibung
Verzeichnis: Siehe Beschreibung
Bedingung: → /config/phpwcms/conf.inc.php
Ab Version 1.6.528:
* Lösung: Ersetzen der Funktionsaufrufe trimhtml($……) durch html_specialchars(trim($……)) in den Dateien
* In der herunterladbaren Datei Version 1.2.2a ist dieser Fehler behoben seit dem 07.02.2013.
6. User editieren nur die Datei /template/inc_script/galeryx/galleryx_main_v121.inc.php zu editieren
Es ist nicht mehr notwendig die entsprechenden Variablen auszukommentieren in “SHORT DEFINATION” (wie in v1.1).
translate
7. V1.2.1
7.1 Caption fallback text if there is no one in db
7.2 No longer report of the crappy thumb title text during hover. (The whole capture text with all formated tags has been reported :twisted: ).
Title-text for hover and alt-text for thumb images set with a tag in capture or with a parameter or autom. filename.
7.3 LightBox (SLimbox) capture better editable. The same output like the normal capture. You don´t need e.g. a [BR] tag for linebreak. Paragraph autom. created behind 2 x linefeed.
translate
8. V1.2.2
8.1 New sort by number implemented (file center since _r300 has a new numeric sort field) Negativ numbered images reserved for the list output. Such pictures are not indicated in detail gallery output.
8.2 Update for special images in sub gallery. → sort number -1, -2, -3 ….
8.3 Optional faster thumbs/images output (processing during first call in fe). Normaly images are computed during the call in frontend via cmsimage.php … For large galleries this slow down the thumb output. Using this option, the images are processed only one time after these were put on. At Accounts with a small execution time it is possible, that an server 500 occures during first fe output. → Have a reload of this site and wait.
Basis TAG: {GALLERYX: galleryRoot_ID[int], subgallery_ID[int], subsubgallery_ID[int]}
Lege den TAG in einem CP ab (vorzugsweise HTML or Einfacher Text).
{GALLERYX:…….} ist ein RT für große Galerien mit Untergalerien. Dieser TAG verwendet ausschließlich die Informationen aus der Dateizentrale.
Einige Parameter (~20) können direkt in der Datei galleryx.php eingestellt werden. Dort gibt es einen speziellen Bereich. (Oder in der Liste der Parameter in Ihrem TAG).
<note important> Bitte deaktiviere die Originaldatei /tempate/inc_script/frontend_render/gallery.php (z.B. umbenennen nach gallery.php_) </note>
Download v1.0.0 (zip)
Download v1.1.0 (zip)
Download v1.2.0 (zip)
Download v1.2.1 (zip)
Download v1.2.2 (zip)
Download v1.2.2a (zip) empfohlen !
Basis TAG: {GALLERYX: galleryRoot_ID[int], subgallery_ID[int], subsubgallery_ID[int]}
=========================================================================================== Eingabeparameter (Übergabe) =========================================================================================== $parameter = explode(',', trimhtml($parameter)); $my_gallery_rootid = empty($parameter[0]) ? 0 : intval($parameter[0]); $my_gallery_subid = empty($parameter[1]) ? 0 : intval($parameter[1]); $my_gallery_sub_subid = empty($parameter[2]) ? 0 : intval($parameter[2]); // Einige Beispiele, wie ein neuer Parameter in deinem TAG aussehen könnte. // $my_detail_title_date_on = empty($parameter[3]) ? 3 : intval($parameter[3]); // $my_detail_zoom = empty($parameter[4]) ? 0 : intval($parameter[4]); // $my_detail_lightbox = empty($parameter[5]) ? 0 : intval($parameter[5]); // $my_detail_thumb_count_to_min = empty($parameter[6]) ? 0 : intval($parameter[6]); // $my_detail_thumb_width_height = empty($parameter[7]) ? '80x80' : trim($parameter[7]); // $my_detail_copyr_text = empty($parameter[8]) ? '(c) Max Muster' : trim($parameter[8]); // $my_gallery_css = empty($parameter[9]) ? 'galleryx' : trim($parameter[9]);
1. Schau dir bitte einmal diesen TAG an z.B.: {GALLERYX: 25, 31, 32, 2, 1, 1, 15, 60×60, © Mein Text, mygalleryx}
+----------+--------+-------+----------+-------+-----+---------+-------------+-------------+------------+---------------+ | {GALLERYX: 25 | 31 | 32 | 2 | 1 | 1 | 15 | 60x60 | (c) MeinText| mygalleryx } | | | | | | | | | | | | | | {GALLERYX: root_ID| sub_ID| subsub_ID| title | zoom| lightbox| thumb_ | thumb_ | copyr text | mygallery css}| | | | | | /date | | | count_to_min| width_height| | | | | | | | | | | | | | | | Index | [0] | [1] | [2] | [3] | [4] | [5] | [6] | [7] | [8] | [9] | +----------+--------+-------+----------+-------+-----+---------+-------------+-------------+------------+---------------+
2. Jetzt müssen wir einen eigenen TAG kreieren: Für diese individuelle Konfiguration können Sie die Parameter oben sehen “Eingabeparameter (Übergabe)”
(Die Kommentare - entfernen Sie diese und es sollte funktionieren.)
Wir haben lediglich zwei Typen von Variablen, [int] und [string].
Für [int] verwende bitte die intval function (http://us.php.net/manual/en/function.intval.php)
Für [string] verwende bitte die “trim function” (http://de3.php.net/trim)
Schaue dir die “short if syntax” an (http://www.scottklarr.com/topic/76/tip-of-the-day-php-short-hand-if-statement/)
[$variable = (statement) ? "return if true" : "return if false";] z.B.: $my_gallery_css = empty($parameter[9]) ? 'galleryx' : trim($parameter[9]); And take care to the running index e.g. [9] [9]
translate
3. Third we must comment out the coresponding variables in section “SHORT DEFINATION”
[UPDATE]
$my_list_description_date = 0; ([0|1] date off/on in description text)
// [0|1|2|3] [0=off | 1=info |2=off | 3=info and date ] in sub gallery $my_list_descr_info_date_on = 3; // [0|1|2|3] Show description in list -> no separate date available $my_list_descr_prefix = '<div class="list-descr">'; // '<div style="font-size: 11px">'; $my_list_descr_suffix = '</div>'; $my_list_descr_date_prefix = '<strong>'; $my_list_descr_date_suffix = '</strong> – ';
// caption set in sub sub gallery -> caption and/or lightbox // [0|1|2|3] [0=off | 1=capt |2=light | 3=capt&light ] in sub sub gallery $my_detail_caption_on = 3;
// [0|1|2|3] [off | title=on | date=on | title and date = on] in sub sub gallery $my_detail_title_date = 3;
<note important>
Before installing the new file struct, disable the file
/template/inc_script/frontend_render/galleryx.php
</note>
Nach dem Hochladen vergleiche deine Schalter und TAGS in galleryx.php → /template/inc_script/galeryx/galleryx_main_v121.inc.php.
[/UPDATE]
[UPDATE v1.2.1]
// special linebreak in caption/copyright for lightbox solves the \n\t problem $my_detail_cc_light_linebreak = 1; // [0|1] [0=off (old behavior) | 1=on (no [BR] needed for linebreak)] // fallback text if there is no one in db $my_detail_caption_text = ''; // the caption text for sub sub and lightbox // thumb text: title for hover and alt for thumb image // only for lightbox: important for a right caption carry to lightbox // blank: filename.ext is generated for title text // At filecenter info field you can use the tag[TT]......[/TT] for setting up too $my_detail_caption_title = ''; // the thumb title text (blank: filename.ext is autom. inserted) // blank: filename.ext is generated for alt text // At filecenter info field you can use the tag[AT]......[/AT] for setting up too (blank: filename.ext is autom. inserted) $my_detail_caption_alt = ''; // the thumb alt text
Füge diesen CSS-Teil an das Ende der Datei /template/slimbox/css/slimbox.css hinzu falls notwendig.
#lbCaption { /* kh changed */ font-weight: normal; /* bold; */ } #lbCaption p { /* +kh */ font-weight: normal; /* bold; */ padding: 0 0 6px 0; }
[/UPDATE v1.2.1]
[UPDATE v1.2.2]
sort mode:
// LIST THUMB ------------------------------------------ // string defines the sorting mode of the list Sub Gallery thumbs: // RAND = get images by random) // SORT-ASC, SORT-DESC, SORT-NAME-ASC, SORT-NAME-DESC, SORT-CREATE-ASC, SORT-CREATE-DESC (since r304) // NAME-ASC, NAME-DESC, CREATE-ASC, CREATE-DESC, // LIST-SPECIAL-IMG -> A special thumb for gallery listing with sort number = -1, -2, -3, .... $my_list_thumbnail_sort = 'LIST-SPECIAL-IMG';
// ===================================================== // sub sub gallery definition // ===================================================== // string defines the sorting mode // ASC / DESC = get images sorted by date // NAME-ASC / NAME_DESC = get images sorted by name (+kh) // RAND = get images by random) // SORT-ASC, SORT-DESC, SORT-NAME-ASC, SORT-NAME-DESC, SORT-CREATE-ASC, SORT-CREATE-DESC (since r304) // NAME-ASC, NAME-DESC, CREATE-ASC, CREATE-DESC $my_gallery_image_sort = 'SORT-NAME-ASC'; // sorting gallery images // GALLERY THUMBS ====================================== // sub sub gallery thumbs $my_detail_thumb_fast_output = 1; // processing of all thumbs/images during first call of the galleryx [0|1]
[/UPDATE v1.2.2]