![Exclamation :!:](/web/20090212024816im_/http://forum.phpwcms.org/images/smilies/icon_exclaim.gif)
Update No.2 -> V1.2.1 (17.01.08)!!
I think that is the last version before everyone writes an module part (e.g. galleryx tag generator). All parameters prepared for doing such a issue.
Thanks to "claus" who had talked about and tested many many hours.
![Exclamation :!:](/web/20090212024816im_/http://forum.phpwcms.org/images/smilies/icon_exclaim.gif)
What is new:
1. Switch for list title & date - detail title & date [on|off]
2. Prioritization of copyright - 1. DB, 2. RT, 3. file galleryx and [on|off]
3. Switch for copyright - off, at caption, at SLimbox, all
4. Switch for caption - off, at caption, at SLimbox, all, some prefix/suffix variables created
5. Splitting in different files:
User editable files:
PHP: /template/inc_script/galeryx/galleryx_main_v121.inc.php (parameter set: User edit file)
CSS: /template/inc_css/specific/galleryx.css (css for the output)
Templ.: /template/inc_cntpart/filelist/galleryx.html (Download template)
Non editable files:
PHP: /template/inc_script/galeryx/galleryx_main_v121.doc.php (little doc)
PHP: /template/inc_script/frontend_render/galleryx_call_v121.php (init file in frontend_render)
PHP: /template/inc_script/galeryx/galleryx_main_v121.php (main function)
PHP: /include/inc_lib/imagegalleryx121.inc.php (basic functions)
6. User wants to edit only the file /template/inc_script/galeryx/galleryx_main_v121.inc.php
It isn´t necessary any more to comment out the corresponding variables in "SHORT DEFINATION" (like in v1.1).
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 Evil :twisted:](/web/20090212024816im_/http://forum.phpwcms.org/images/smilies/icon_twisted.gif)
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.
Description:
Basic tag: {GALLERYX: galleryRoot_ID[int], subgallery_ID[int], subsubgallery_ID[int]}
Put it into a CP (preferentially HTML or simple text).
{GALLERYX:.......} is a RT for large galleries with sub galleries. This tag uses the informations from the file center only.
Some parameters (~20) you can switch in the file galleryx.php directly. There is an defination area. (Or in list of parameters in your tag).
- Standardise parameter name
- Gallery list.
- Sub gallery with info text [on/off].
- Sub Sub gallery (detail) (where you find the images) with caption and copyright text [on/off].
- Show description from Sub gallery (list) in Sub Sub gallery (detail) [on/off].
- Copyright output using a hierarchical struct - 1. DB, 2. RT, 3. file galleryx and [on|off]
- Copyright switch off, at caption, at SLimbox, all
-
- Sorting mode [NAME-ASC / NAME_DESC] for the images in Sub Sub gallery (detail).
- Half automatic thumb width/height reduce if image count > X
- Direct output of a Sub Sub gallery by a given ID, a subgallery_ID[int] must be set to use this enhancement.
- Your own "go back" text.
- Your own css file and download template.
- You can build your own special tag very easy.
- Three mode display option:
-- gallery list, sub gallery (list) and sub sub gallery (detail)
-- sub gallery (list) and sub sub gallery (detail)
-- only the sub sub gallery (detail) like foxconncebit
-----------------------------------------------------------------------------------------------
Please disable the original /tempate/inc_script/frontend_render/gallery.php (e.g. rename to gallery.php_)
--------------------------------------
Download v1.0.0: DOWNLOAD (zip)
Download v1.1.0: DOWNLOAD (zip)
Download v1.2.0: DOWNLOAD (zip)
Download v1.2.1: DOWNLOAD (zip) recommended !
--------------------------------------
[EN] file center:
--------------------------------------
![Image](https://web.archive.org/web/20090212024816im_/http://img395.imageshack.us/img395/7316/enfilecentergalleryx01lw7.th.png)
[EN] Frontend output example:
--------------------------------------
![Image](https://web.archive.org/web/20090212024816im_/http://img72.imageshack.us/img72/574/enfilecentergalleryx012ds4.th.png)
[EN] Frontend/Backend capture edit:
--------------------------------------
![Image](https://web.archive.org/web/20090212024816im_/http://img48.imageshack.us/img48/9694/enfecapture01bf1.th.png)
[DE] Dateizentrale:
--------------------------------------
![Image](https://web.archive.org/web/20090212024816im_/http://img368.imageshack.us/img368/2605/defilecentergalleryx01pt9.th.png)
[DE] Frontend-Ausgabebeispiel (erweitert):
----------------------------------------------------
![Image](https://web.archive.org/web/20090212024816im_/http://img508.imageshack.us/img508/6439/defilecentergalleryx012mk6.th.png)
[DE] Frontend/Backend capture editieren:
--------------------------------------
![Image](https://web.archive.org/web/20090212024816im_/http://img382.imageshack.us/img382/5536/defecapture01sq6.th.png)
The own tag and how can I create one:
-----------------------------------------------------------------------------------------------
Basic tag: {GALLERYX: galleryRoot_ID[int], subgallery_ID[int], subsubgallery_ID[int]}
- Code: Select all
===========================================================================================
Input parameter (handing over)
===========================================================================================
$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]);
// Some examples how a new parameter in your tag could be look like.
// $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. Have a look to this tag e.g.: {GALLERYX: 25, 31, 32, 2, 1, 1, 15, 60x60, (c) My text, mygalleryx}
- Code: Select all
+----------+--------+-------+----------+-------+-----+---------+-------------+-------------+------------+---------------+
| {GALLERYX: 25 | 31 | 32 | 2 | 1 | 1 | 15 | 60x60 | (c) My text| 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. Second we must create a new tag: For this individual configuration you can see the parameter set above in "Input parameter (handing over)" (the commented one - uncomment them and it ought to run.)
We have only two types of variables, [int] and [string].
For [int] please use the intval function (http://us.php.net/manual/en/function.intval.php)
For [string] please use the "trim function" (http://de3.php.net/trim)
Figure out the "short if syntax" (http://www.scottklarr.com/topic/76/tip-of-the-day-php-short-hand-if-statement/)
- Code: Select all
[$variable = (statement) ? "return if true" : "return if false";]
e.g.: $my_gallery_css = empty($parameter[9]) ? 'galleryx' : trim($parameter[9]);
And take care to the running index e.g. [9] [9]
3.
[UPDATE]
- Code: Select all
// [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> – ';
- Code: Select all
// 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;
- Code: Select all
// [0|1|2|3] [off | title=on | date=on | title and date = on] in sub sub gallery
$my_detail_title_date = 3;
Before installing the new file struct, disable the file /template/inc_script/frontend_render/galleryx.php
After you have uploaded, compare your settings and tags in galleryx.php -> /template/inc_script/galeryx/galleryx_main_v121.inc.php.
[/UPDATE]
[UPDATE v1.2.1]
- Code: Select all
// 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
Add, if you want, this css snippet to the bottom into /template/slimbox/css/slimbox.css
- Code: Select all
#lbCaption { /* kh changed */
font-weight: normal; /* bold; */
}
#lbCaption p { /* +kh */
font-weight: normal; /* bold; */
padding: 0 0 6px 0;
}
[/UPDATE v1.2.1]
(German language follows).
Knut