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

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

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

Post 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
Last edited by flip-flop on Thu 3. Sep 2009, 07:01, edited 18 times in total.
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

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

Post 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...
Last edited by Jensensen on Tue 21. Oct 2008, 19:17, edited 1 time in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post 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!
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
zuker
Posts: 80
Joined: Fri 18. May 2007, 17:13
Location: Lithuania

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

Post 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:
٩(͡๏̯͡๏)۶
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update »

- Your own css file and download template
...and a possibility to throw in an extra css for every single gallery too :)
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

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

Post 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?
...
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
markus s
Moderator
Posts: 654
Joined: Sat 16. Dec 2006, 19:21
Location: Radfeld / Tirol
Contact:

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

Post by markus s »

many thx about this impressive work...
thats knut - ... only on phpwcms :idea:
moderator
propelled by fresh air from tirol
XING|FACEBOOK|OMENTO
User avatar
zonk
Posts: 173
Joined: Thu 5. Apr 2007, 12:21
Location: Nauheim
Contact:

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

Post 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..
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post 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.
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
zonk
Posts: 173
Joined: Thu 5. Apr 2007, 12:21
Location: Nauheim
Contact:

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

Post 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..
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

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

Post by update »

http://forum.phpwcms.org/viewtopic.php? ... allery+php
nicht? auch nicht im disabled-Ordner?
Dann ---> update... lohnt!
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
zonk
Posts: 173
Joined: Thu 5. Apr 2007, 12:21
Location: Nauheim
Contact:

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

Post by zonk »

ne.. auch da nicht.. welche Version ist zzt. für ein Update empfehlenswert, also relativ staple ?
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

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

Post 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.
Last edited by Jensensen on Tue 4. Nov 2008, 01:14, edited 2 times in total.
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
zonk
Posts: 173
Joined: Thu 5. Apr 2007, 12:21
Location: Nauheim
Contact:

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

Post 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 :)
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

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

Post by Jensensen »

schau mal hier: http://forum.phpwcms.org/viewtopic.php? ... te#p109508

stammt aus der feder von uns flip-flop!!!
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
Post Reply