Page 1 of 2

{GALLERYX: ......} -> (galleryx.php)

Posted: Tue 21. Oct 2008, 18:49
by flip-flop
An enhanced version of gallery.php. :!: .....UPDATE V1.1 26.11.08 (please see at the bottom)

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 [on/off].
- Define an over all copyright text instead of file center copyright.

- New 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: DOWNLOAD (zip)
Download v1.1: DOWNLOAD (zip)
Please use the newest one: {GALLERYX: ......} V1.2.x -> (galleryx_call_v12x.php)
--------------------------------------

[EN] file center:
--------------------------------------
Image

[EN] Frontend output example:
--------------------------------------
Image


[DE] Dateizentrale:
--------------------------------------
Image

[DE] Frontend-Ausgabebeispiel (erweitert):
----------------------------------------------------
Image


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 look like.	
// $my_detail_title_date          = 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_gallery_css                = empty($parameter[8]) ? 'galleryx'  : trim($parameter[8]);
1. Have a look for creating your own tag e.g.: {GALLERYX: 25, 31, 32, 2, 1, 1, 15, 60x60, mygallery}

Code: Select all

+----------+--------+-------+----------+-------+-----+---------+-------------------+-------------------+------------+
| {GALLERYX:   25   |   31  |    32    |   2   |  1  |     1   |        15         |        60x60      |  mygallery }
| {GALLERYX: root_ID| sub_ID| subsub_ID| title | zoom| lightbox| thumb_count_to_min| thumb_width_height| gallery_css}
|          |        |       |          |       |     |         |                   |                   |            |
| Index    |  [0]   |  [1]  |   [2]    |  [3]  | [4] |    [5]  |        [6]        |         [7]       |     [8]    |
+----------+--------+-------+----------+-------+-----+---------+-------------------+-------------------+------------+
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- ... statement/)

Code: Select all

       [$variable       = (statement)           ? "return if true"  : "return if false";]

 e.g.:   $my_gallery_css = empty($parameter[7])  ? 'galleryx'        : trim($parameter[7]);
 And take care to the running index e.g.   [7]                                        [7]
3. Third we must comment out the coresponding variables in section "SHORT DEFINATION" like:

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; 

 // $my_detail_zoom                     = 1;            // zoom the image: switch [0|1]
 // $my_detail_lightbox                 = 1;            // lightbox: switch [0|1]
 // $my_detail_thumb_count_to_min       = 30;           // [integer]
 // $my_detail_thumb_width_height       = '120x100';    // thumb width x height
 // $my_gallery_css                     = 'galleryx';   // only the name of the css file without the extend!!!
[UPDATE v1.1] I have enhanced this script for:

Code: Select all

// [0|1|2|3] [off | title=on | date=on | title and date = on]   in sub gallery (list)
$my_list_title_date          = 3; 

$my_list_description_date    = 1; 		// [0|1] date on/off   in description text

// [0|1|2|3] [off | title=on | date=on | title and date = on]   in sub sub gallery
$my_detail_title_date        = 3;
Before overwriting the file /template/inc_script/frontend_render/galleryx.php please make an backup of the old file galleryx.php
After you have uploadet, compare your settings and tags in galleryx.php.
[/UPDATE]

(German language follows).

Knut

Re: {GALLERYX: ......} -> (gallery.php)

Posted: Tue 21. Oct 2008, 18:51
by Jensensen
Hi Knut,

great respect and many thanks for sharing that stuff nowadays, during those difficult hard times.
Greetings!

btw: watching your images - at first sight - make me believe, that it seems to be extraordinarily easy to get it runinng. :wink: :shock:
let's see...

Re: {GALLERYX: ......} -> (gallery.php)

Posted: Tue 21. Oct 2008, 19:09
by update
it is extraordinarily easy indeed (if you once get a glimpse of a clue) :lol:
And it is verrry cool :lol:
Respect, Knut!

Re: {GALLERYX: ......} -> (gallery.php)

Posted: Tue 21. Oct 2008, 19:21
by zuker
I waited patiently for this great evening all week. That’s great, that’s astonishing :o :shock: !!! I asked to create something like {GALLERY:ID} but I couldn’t even imagine that we will get such a wonderful donation. Thank you Knut 1000 times.

Respect. :wink:

Re: {GALLERYX: ......} -> (gallery.php)

Posted: Tue 21. Oct 2008, 19:29
by update
- Your own css file and download template
...and a possibility to throw in an extra css for every single gallery too :)

Re: {GALLERYX: ......} -> (gallery.php)

Posted: Tue 21. Oct 2008, 19:46
by Jensensen
claus wrote:... extra css for every single gallery too :)
unbelievable opportunities and unbelievable DEV speed, just exploding.
what the h... will happen when [OG] version 2.0 is ready?
...

Re: {GALLERYX: ......} -> (gallery.php)

Posted: Tue 21. Oct 2008, 22:15
by markus s
many thx about this impressive work...
thats knut - ... only on phpwcms :idea:

Re: {GALLERYX: ......} -> (galleryx.php)

Posted: Wed 22. Oct 2008, 19:22
by zonk
Welche phpwcms Version wird denn mindestens benötigt für den Einsatz des. o.g. Scripts?
Habe zzt. eine 1.3.9 im Live-Betrieb laufen..

Re: {GALLERYX: ......} -> (galleryx.php)

Posted: Wed 22. Oct 2008, 19:34
by update
Da galleryx auf der gallery von OGs gallery.php aufbaut, sollte das gehen, solbald Du ein gallery.php im template/inc_script/frontend_render oder ~/disabled finden kannst... dann einfach mal hoch mit dem Schmonz ;) und die Anleitung von Knut gut studiert! Steht alles drin.

Re: {GALLERYX: ......} -> (galleryx.php)

Posted: Wed 22. Oct 2008, 19:47
by zonk
Ja genau das hat mich Misstrauisch gemacht.. hab die gallery.php nicht gefunden .. auch das "edit directory" in der Anleitung verwirrt mich gerade ein bischen..

Re: {GALLERYX: ......} -> (galleryx.php)

Posted: Wed 22. Oct 2008, 20:09
by update
http://forum.phpwcms.org/viewtopic.php? ... allery+php
nicht? auch nicht im disabled-Ordner?
Dann ---> update... lohnt!

Re: {GALLERYX: ......} -> (galleryx.php)

Posted: Wed 22. Oct 2008, 20:18
by zonk
ne.. auch da nicht.. welche Version ist zzt. für ein Update empfehlenswert, also relativ staple ?

Re: {GALLERYX: ......} -> (galleryx.php)

Posted: Wed 22. Oct 2008, 20:42
by Jensensen
Hi zonk,

stabil waren se ja bisher eigentlich und überwiegend Alle. Du hast aber offenbar eine ältere Entwicklungs-Version der last, latest (offiziellen) v1.3.9 in Gebrauch. Die neuesten, aktuellsten (Updates) findest Du komfortabler Weise [auch] bei uns DF6IH: http://jgbm.de/checkout.phtml
(r_270 ist die letzte)

Drüberbügeln nach altbewährtem Muster.

Re: {GALLERYX: ......} -> (galleryx.php)

Posted: Wed 22. Oct 2008, 20:53
by zonk
huhu jensensen .. ja ich hab eine *hust* etwas ältere Version .. bin nich so der mysql php crack, von daher vermeide ich so sensible dinge wie updates .. auch wenn das für die Profis kein Problem darstellt ..
Drüberbügeln nach alt bewährtem Muster.
Könntest du das kurz umreißen, die Eckpfeiler? das letzte Update is schon so lange her :)

Re: {GALLERYX: ......} -> (galleryx.php)

Posted: Wed 22. Oct 2008, 21:01
by Jensensen
schau mal hier: http://forum.phpwcms.org/viewtopic.php? ... te#p109508

stammt aus der feder von uns flip-flop!!!