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

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.

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

Postby flip-flop on Tue Oct 21, 2008 16:49

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)
--------------------------------------

[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-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[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 Wed Dec 24, 2008 09:48, edited 17 times in total.
>> DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
flip-flop
 
Posts: 5591
Joined: Sat May 21, 2005 19:25
Location: HAMM (Germany)

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

Postby Jensensen on Tue Oct 21, 2008 16:51

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 Oct 21, 2008 17:17, edited 1 time in total.
Halte ein Päckchen Reis, genauso Dill, niemals verkehrt herum, wenn Du Dir nicht sicher bist und Dir kein A gesagt hat, dass es bereits geöffnet war!
User avatar
Jensensen
 
Posts: 2571
Joined: Tue Oct 17, 2006 19:11
Location: outer deep space, 1/2 impulse drive, checking

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

Postby claus on Tue Oct 21, 2008 17:09

it is extraordinarily easy indeed (if you once get a glimpse of a clue) :lol:
And it is verrry cool :lol:
Respect, Knut!
The following (and the previous) wouldn't have happened if there had been a GURM!
update process in progress 90% - Please stand by.. don't hit any key. Hold your breath ... until the day when pigs can fly ...
User avatar
claus
 
Posts: 2658
Joined: Mon Jan 10, 2005 16:29
Location: germany / outdoor

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

Postby zuker on Tue Oct 21, 2008 17:21

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
zuker
 
Posts: 47
Joined: Fri May 18, 2007 15:13
Location: Lithuania

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

Postby claus on Tue Oct 21, 2008 17:29

- Your own css file and download template

...and a possibility to throw in an extra css for every single gallery too :)
The following (and the previous) wouldn't have happened if there had been a GURM!
update process in progress 90% - Please stand by.. don't hit any key. Hold your breath ... until the day when pigs can fly ...
User avatar
claus
 
Posts: 2658
Joined: Mon Jan 10, 2005 16:29
Location: germany / outdoor

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

Postby Jensensen on Tue Oct 21, 2008 17:46

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?
...
Halte ein Päckchen Reis, genauso Dill, niemals verkehrt herum, wenn Du Dir nicht sicher bist und Dir kein A gesagt hat, dass es bereits geöffnet war!
User avatar
Jensensen
 
Posts: 2571
Joined: Tue Oct 17, 2006 19:11
Location: outer deep space, 1/2 impulse drive, checking

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

Postby markus s on Tue Oct 21, 2008 20:15

many thx about this impressive work...
thats knut - ... only on phpwcms :idea:
moderator
Image
User avatar
markus s
Moderator
 
Posts: 407
Joined: Sat Dec 16, 2006 18:21
Location: Brixlegg / Tirol

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

Postby zonk on Wed Oct 22, 2008 17:22

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
zonk
 
Posts: 150
Joined: Thu Apr 05, 2007 10:21
Location: Nauheim

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

Postby claus on Wed Oct 22, 2008 17:34

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.
The following (and the previous) wouldn't have happened if there had been a GURM!
update process in progress 90% - Please stand by.. don't hit any key. Hold your breath ... until the day when pigs can fly ...
User avatar
claus
 
Posts: 2658
Joined: Mon Jan 10, 2005 16:29
Location: germany / outdoor

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

Postby zonk on Wed Oct 22, 2008 17:47

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
zonk
 
Posts: 150
Joined: Thu Apr 05, 2007 10:21
Location: Nauheim

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

Postby claus on Wed Oct 22, 2008 18:09

viewtopic.php?f=16&t=17564&hilit=gallery+php
nicht? auch nicht im disabled-Ordner?
Dann ---> update... lohnt!
The following (and the previous) wouldn't have happened if there had been a GURM!
update process in progress 90% - Please stand by.. don't hit any key. Hold your breath ... until the day when pigs can fly ...
User avatar
claus
 
Posts: 2658
Joined: Mon Jan 10, 2005 16:29
Location: germany / outdoor

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

Postby zonk on Wed Oct 22, 2008 18:18

ne.. auch da nicht.. welche Version ist zzt. für ein Update empfehlenswert, also relativ staple ?
User avatar
zonk
 
Posts: 150
Joined: Thu Apr 05, 2007 10:21
Location: Nauheim

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

Postby Jensensen on Wed Oct 22, 2008 18:42

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 Nov 04, 2008 00:14, edited 2 times in total.
Halte ein Päckchen Reis, genauso Dill, niemals verkehrt herum, wenn Du Dir nicht sicher bist und Dir kein A gesagt hat, dass es bereits geöffnet war!
User avatar
Jensensen
 
Posts: 2571
Joined: Tue Oct 17, 2006 19:11
Location: outer deep space, 1/2 impulse drive, checking

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

Postby zonk on Wed Oct 22, 2008 18:53

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
zonk
 
Posts: 150
Joined: Thu Apr 05, 2007 10:21
Location: Nauheim

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

Postby Jensensen on Wed Oct 22, 2008 19:01

schau mal hier: viewtopic.php?f=10&t=17865&p=109508&hilit=update#p109508

stammt aus der feder von uns flip-flop!!!
Halte ein Päckchen Reis, genauso Dill, niemals verkehrt herum, wenn Du Dir nicht sicher bist und Dir kein A gesagt hat, dass es bereits geöffnet war!
User avatar
Jensensen
 
Posts: 2571
Joined: Tue Oct 17, 2006 19:11
Location: outer deep space, 1/2 impulse drive, checking

Next

Return to hacks & enhancements

Who is online

Users browsing this forum: Alexa [Bot] and 0 guests