Page 3 of 4

Re: gallery.php

Posted: Thu 2. Oct 2008, 13:52
by flip-flop
Now gallery.php is working like a charme. :idea: We all have had an error in reasoning. :oops:

We need two sub folders behind the declared gallery root folder. In the second sub folder please put in your images.

(foxconncebit is a little bit special).

But have a look into the gallery.php system.

Set in filecenter:

Code: Select all

-- Gallery         (set to root)
--- Gallery01      (set to sub)
---- Gallery01_01  (set to sub and put in your pictures)
In gallery.php search for $gallery->setAlias( 'aid=116' ); and put in your own article Id where the tag {GALLERY} is stored.

Play around a little bit with all the parameters you will find in this file.

Fast and easy css snippet from foxconn: link it to your template or put into specific/gallery.css, search for
if( strpos($content['all'], '{GALLERY}') !== FALSE ) { in gallery.php and insert behind

Code: Select all

$GLOBALS['block']['css']['gallery'] = 'specific/gallery.css';
[EDIT 06.10.08] IF you need a similar output like foxconn, pleaser insert after $galleries = array(); (around line 36)

Code: Select all

// -----------------
	$_getVar['subgallery'] = 31; // The ID of the first folder [set gallery subdirectory]
// -----------------
[/EDIT]

CSS:

Code: Select all

div.clear_both {clear: both; }

div.gallery-image-list {
	margin: 0 6px 0 11px;
}
div.gallery-image-list div.image {
	float: left;
	margin: 0 7px 7px 0;
}
div.gallery-image-list div.image img {
	border: 1px solid #FFFFFF;
}
div.gallery-image-list div.image a:hover img {
	border: 1px solid #F4D612;
}

div.galleries {
	margin-top: 15px;
	border-top: 1px solid #d9d9d9;
}
div.galleries div.gallery {
	padding: 10px 5px 10px 5px;
	border-bottom: 1px solid #d9d9d9;
}
div.galleries div.gallery h3 {
	line-height: 100%;
	padding: 0 0 6px 0;
	font-size: 1.25em;
	font-weight: normal;
}
div.galleries div.gallery a {
	color: #000000;
}
div.galleries div.gallery div.thumbnail {
	float: left;
	margin: 2px 8px 8px 0;
}
div.galleries div.gallery div.thumbnail img {
	border: 1px solid #D9D9D9;
	background-color: #FFFFFF;
	padding: 3px;
}
div.galleries div.gallery div.thumbnail a:hover img {
	background-color: #F4D612;
}

div.gallery {
	
	padding: 10px 0 0 0;

}

div.gallery h2 {
	font-weight: normal;
	padding: 0 0 10px 0;
	line-height: 100%;
}
div.gallery p {
	padding: 0 0 10px 0;
}
div.gallery div.thumbnail {
	float: left;
	margin: 2px 7px 7px 0;
}
div.gallery div.thumbnail img {
	border: 1px solid #D9D9D9;
	background-color: #FFFFFF;
	padding: 2px;
}
div.gallery div.thumbnail a:hover img {
	background-color: #F4D612;
}
div.gallery div.backlink {
	clear: both;
	border-top: 1px solid #D9D9D9;
	padding: 10px 0 0 0;
	margin-top: 2px;
}
Knut

Re: gallery.php

Posted: Thu 2. Oct 2008, 15:25
by update
another great one by Knut 8)
Thanks for this new enlightenment :lol:

Re: gallery.php

Posted: Thu 2. Oct 2008, 22:13
by markus s
knut ist unbezahlbar, aber wir sollten irgendwann damit beginnen ... :D
danke für die lehrstunde.
grüße

knut is unaffordable, but we should begin sometime with it ...
thx for the lesson.

Re: gallery.php

Posted: Fri 3. Oct 2008, 13:31
by update
just set up my test gallery by following Knuts tutorial above:
It's working - now everybody can have a gallery just by uploading some pics - it's kinda built-in automatism :)
Great!
Just to mention it :lol:

Re: gallery.php

Posted: Mon 6. Oct 2008, 22:38
by update
This is really rocking! Many thanks to you, Knut for unfolding the glamor of gallery.php :lol:

Re: gallery.php

Posted: Sat 11. Oct 2008, 18:17
by zuker
BIG THANKS to Knut for this great solution.

I played a little bit with this gallery and found it quite flexible. Trying to get the desired result you have to play with parameters of those associated files:

/template/inc_script/frontend_render/gallery.php
/include/inc_lib/imagegallery.inc.php
/template/inc_css/specific/gallery.css


I have one idea but don‘t know how to implement it. By using replacement tag {GALLERY} we get the root gallery name and the list of the gallery albums. But question is what to do if I want to display only the list of subalbums of particular album? I think that replacement tag {GALLERY:ID} could solve this problem. I noticed that every album of the gallery has its own ID, so I suppose that it’s possible to make {GALLERY:ID} do it’s job. Besides by using {GALLERY:ID}we would be able to display gallery albums or subalbum in different articles and different places of the site.

So guys, what do you think about that?

Re: gallery.php

Posted: Wed 15. Oct 2008, 11:50
by flip-flop
{GALLERY:ROOT_ID, SUB_ID} is coming up in the evening.
I have enhanced this script with named sorting option and copyright info for lightbox and/or caption text.

Knut

Re: gallery.php

Posted: Wed 15. Oct 2008, 17:11
by zuker
That means that soon we will have easy to use gallery replacement tag. And gallery will be even more flexible.
I knew that someone will do this. Thanks to Knut in advance.

Re: gallery.php

Posted: Wed 15. Oct 2008, 19:52
by update
I can affirm on oath that this is really rockng indeed :D
Very very cool! We all can count us lucky that Knut will offer this very gem!

EDIT: ..and of course lucky too that OG threw in such a nice one to be enhanced...

Re: gallery.php

Posted: Tue 21. Oct 2008, 10:52
by Darodesign
flip-flop wrote:Now gallery.php is working like a charme. :idea: We all have had an error in reasoning. :oops:

We need two sub folders behind the declared gallery root folder. In the second sub folder please put in your images.

(foxconncebit is a little bit special).

But have a look into the gallery.php system.


Set in filecenter:

Code: Select all

-- Gallery         (set to root)
--- Gallery01      (set to sub)
---- Gallery01_01  (set to sub and put in your pictures)
In gallery.php search for $gallery->setAlias( 'aid=116' ); and put in your own article Id where the tag {GALLERY} is stored.

Play around a little bit with all the parameters you will find in this file.

Fast and easy css snippet from foxconn: link it to your template or put into specific/gallery.css, search for
if( strpos($content['all'], '{GALLERY}') !== FALSE ) { in gallery.php and insert behind

Code: Select all

$GLOBALS['block']['css']['gallery'] = 'specific/gallery.css';
[EDIT 06.10.08] IF you need a similar output like foxconn, pleaser insert after $galleries = array(); (around line 36)

Code: Select all

// -----------------
	$_getVar['subgallery'] = 31; // The ID of the first folder [set gallery subdirectory]
// -----------------
[/EDIT]

CSS:

Code: Select all

div.clear_both {clear: both; }

div.gallery-image-list {
	margin: 0 6px 0 11px;
}
div.gallery-image-list div.image {
	float: left;
	margin: 0 7px 7px 0;
}
div.gallery-image-list div.image img {
	border: 1px solid #FFFFFF;
}
div.gallery-image-list div.image a:hover img {
	border: 1px solid #F4D612;
}

div.galleries {
	margin-top: 15px;
	border-top: 1px solid #d9d9d9;
}
div.galleries div.gallery {
	padding: 10px 5px 10px 5px;
	border-bottom: 1px solid #d9d9d9;
}
div.galleries div.gallery h3 {
	line-height: 100%;
	padding: 0 0 6px 0;
	font-size: 1.25em;
	font-weight: normal;
}
div.galleries div.gallery a {
	color: #000000;
}
div.galleries div.gallery div.thumbnail {
	float: left;
	margin: 2px 8px 8px 0;
}
div.galleries div.gallery div.thumbnail img {
	border: 1px solid #D9D9D9;
	background-color: #FFFFFF;
	padding: 3px;
}
div.galleries div.gallery div.thumbnail a:hover img {
	background-color: #F4D612;
}

div.gallery {
	
	padding: 10px 0 0 0;

}

div.gallery h2 {
	font-weight: normal;
	padding: 0 0 10px 0;
	line-height: 100%;
}
div.gallery p {
	padding: 0 0 10px 0;
}
div.gallery div.thumbnail {
	float: left;
	margin: 2px 7px 7px 0;
}
div.gallery div.thumbnail img {
	border: 1px solid #D9D9D9;
	background-color: #FFFFFF;
	padding: 2px;
}
div.gallery div.thumbnail a:hover img {
	background-color: #F4D612;
}
div.gallery div.backlink {
	clear: both;
	border-top: 1px solid #D9D9D9;
	padding: 10px 0 0 0;
	margin-top: 2px;
}
Knut
Hallo Zusammen

Wäre es möglich diese Beschreibung noch auf Deutsch zu ügersetzen?
Mein English ist leider sehr sehr schlecht :-(

Danke zum voraus
Daniel

Re: gallery.php

Posted: Tue 21. Oct 2008, 17:58
by zuker
Unfortunately i don‘t understand german at all :( .
But try this http://translate.google.com :wink:

Re: gallery.php

Posted: Tue 21. Oct 2008, 18:51
by flip-flop
gallery.php funktioniert. :idea: Wir hatten alle einen Denkfehler gemacht. :oops:

Wir benötigen zwei Unterverzeichnisse unterhalb des gesetzten Galerie root Verzeichnisses. Im zweiten Unterordner liegen jeweils die Galeriebilder.

(foxconncebit.com ist etwas spezieller).

Aber bitte werfe einen Blick in die Datei gallery.php.

In der Dateizentrale setzen:

Code: Select all

-- Gallery         (Als Wurzenverzeichnis deklarieren)
--- Gallery01      (Als Unterverzeichnis setzen)
---- Gallery01_01  (Als Unterverzeichnis setzen und hier die Bilder einfügen)
suche in der Datei gallery.php nach $gallery->setAlias( 'aid=116' ); und ersetze die ID mit der eigenen Artikel-ID des Artikels in dem der Tag {GALLERY} abgelegt ist.

Spiele ein wenig mit den Parametern in der Datei gallery.php.

CSS Snipsel von foxconn: Binde die Datei an die Vorlage oder lege sie ab in specific/gallery.css, suche nach
if( strpos($content['all'], '{GALLERY}') !== FALSE ) { in gallery.php und füge danach folgenden Code ein:

Code: Select all

$GLOBALS['block']['css']['gallery'] = 'specific/gallery.css';
[EDIT 06.10.08] Wenn du eine Ausgabe wie auf der foxconn haben möchtest, füge nach $galleries = array(); (etw bei Zeile 36) ein:

Code: Select all

// -----------------
	$_getVar['subgallery'] = 31; // Die ID des ersten Unterverzeichnisses [set gallery subdirectory]
// -----------------
[/EDIT]

CSS:

Code: Select all

div.clear_both {clear: both; }

div.gallery-image-list {
	margin: 0 6px 0 11px;
}
div.gallery-image-list div.image {
	float: left;
	margin: 0 7px 7px 0;
}
div.gallery-image-list div.image img {
	border: 1px solid #FFFFFF;
}
div.gallery-image-list div.image a:hover img {
	border: 1px solid #F4D612;
}

div.galleries {
	margin-top: 15px;
	border-top: 1px solid #d9d9d9;
}
div.galleries div.gallery {
	padding: 10px 5px 10px 5px;
	border-bottom: 1px solid #d9d9d9;
}
div.galleries div.gallery h3 {
	line-height: 100%;
	padding: 0 0 6px 0;
	font-size: 1.25em;
	font-weight: normal;
}
div.galleries div.gallery a {
	color: #000000;
}
div.galleries div.gallery div.thumbnail {
	float: left;
	margin: 2px 8px 8px 0;
}
div.galleries div.gallery div.thumbnail img {
	border: 1px solid #D9D9D9;
	background-color: #FFFFFF;
	padding: 3px;
}
div.galleries div.gallery div.thumbnail a:hover img {
	background-color: #F4D612;
}

div.gallery {
	
	padding: 10px 0 0 0;

}

div.gallery h2 {
	font-weight: normal;
	padding: 0 0 10px 0;
	line-height: 100%;
}
div.gallery p {
	padding: 0 0 10px 0;
}
div.gallery div.thumbnail {
	float: left;
	margin: 2px 7px 7px 0;
}
div.gallery div.thumbnail img {
	border: 1px solid #D9D9D9;
	background-color: #FFFFFF;
	padding: 2px;
}
div.gallery div.thumbnail a:hover img {
	background-color: #F4D612;
}
div.gallery div.backlink {
	clear: both;
	border-top: 1px solid #D9D9D9;
	padding: 10px 0 0 0;
	margin-top: 2px;
}
Neue Version: http://forum.phpwcms.org/viewtopic.php? ... 48#p110248

Knut

Re: gallery.php

Posted: Tue 21. Oct 2008, 18:53
by flip-flop

Re: gallery.php

Posted: Tue 21. Oct 2008, 19:02
by Darodesign
Wow

Danke 1000 mal Knut.
Geniale Arbeit.

Danke Daniel

Re: gallery.php

Posted: Tue 21. Oct 2008, 21:52
by flip-flop
Das oben gesagte ist für die neue Version fast alles hinfällig, bis auf das Setzen des Wurzelverzeichnisses und der Unterverzeichnisse.
Der andere Kram ist dort eingebaut und halbwegs automatisiert.