Page 1 of 1

Multitag image gallery

Posted: Wed Dec 24, 2008 1:36 pm
by PatrikGC
Hello :)

I search a picture gallery for display 500-600 images in several pages in a CMSimple web site (easy).
Each picture can show a comment, a sentence (also easy).
You have many categories, and many pictures inside (of course).
BUT...
But a picture can be linked with one, two and more categories, without duplication.
A web page can display the pictures of a category or several categories.
And no Sql database also...

Do you know a function or/and a plugin who make this ?
If I must write datas in a flat file (.dat .txt .xml), no problem.

Thank you and Merry Xmas :)

Re: Multitag image gallery

Posted: Wed Dec 24, 2008 3:05 pm
by Connie
You can do that with ZenGallery and integrate that into CMSImple

I did that at http://www.galerie-im-wasserturm.de

Re: Multitag image gallery

Posted: Fri Dec 26, 2008 8:05 am
by PatrikGC
Thank you for your answer.
The problem with ZenGallery is : it uses MySql engine...
I visited it : nice site and nice pictures :)

Re: Multitag image gallery

Posted: Fri Dec 26, 2008 9:29 am
by Connie
Hi, I subsummed that when you want to post such a big amount of images, you will need a database

I used ZENgalery for that painter
I was member of the dev-team of Pixelpost
I know SimpleViewer

but for big amounts of images they all use a database or XML

there are other galeries which you can include in CMSImple which just read all images in a folder and build navigation, but mostly these do it randomly

so you want a flat file photo galery...

did you check Singapore? http://www.sgal.org/
it is flat file..
I am sure you can include it in a CMSimple page

Citation:
singapore is a free, fast, simple, multilingual, template-driven PHP image gallery! It does not require a database and although it has a full web-based admin interface, you can also build your galleries directly via FTP. It’s super-cool!

Re: Multitag image gallery

Posted: Fri Dec 26, 2008 9:30 am
by Connie
Hi, I subsummed that when you want to post such a big amount of images, you will need a database

I used ZENgalery for that painter
I was member of the dev-team of Pixelpost
I know SimpleViewer

but for big amounts of images they all use a database or XML

there are other galeries which you can include in CMSImple which just read all images in a folder and build navigation, but mostly these do it randomly

so you want a flat file photo galery...

did you check Singapore? http://www.sgal.org/
it is flat file..
I am sure you can include it in a CMSimple page

Citation:
singapore is a free, fast, simple, multilingual, template-driven PHP image gallery! It does not require a database and although it has a full web-based admin interface, you can also build your galleries directly via FTP. It’s super-cool!

Re: Multitag image gallery

Posted: Sat Dec 27, 2008 7:36 pm
by PatrikGC
Maybe that will interest somebody...
Yes, I know : it's basic...
Ps : this forum removes the tabulations :(
---------------------------------------------------------------------------------
The program I wrote (first version)
Add these 2 functions in functions.php
---------------------------------------------------------------------------------
function NBG_1310($txt){
$txt=str_replace(chr(13),'',$txt);
$txt=str_replace(chr(10),'',$txt);
return $txt;
}

function NBG_show($cri,$col=5,$celwid=100,$celspa=0,$celpad=0){ // criteria column celwidth celspacing celpadding
// LightBox2
$htm='<script type="text/javascript" src="lightbox/prototype.js"></script>';
$htm.='<script type="text/javascript" src="lightbox/scriptaculous.js?load=effects"></script>';
$htm.='<script type="text/javascript" src="lightbox/lightbox.js"></script>';
$htm.='<link rel="stylesheet" href="lightbox/lightbox.css" type="text/css" media="screen">';
// Draw table
$dta=file('NBG/_data.txt'); // file with datas
$htm.="<table align='center' cellspacing='$celspa' cellpadding='$celpad' border=0>";
$cnt=count($dta);
$num=0;
$cricnt=strlen($cri);
//
for($i=0; $i<$cnt; $i+=3){ // ---file tag comment
$flg=true;
$tag=$dta[$i+1]; // the tags
for($j=0; $j<$cricnt; $j++){ // search each criteria in the tags
if(strpos($tag,$cri[$j])===false){ // not found
$j=999; $flg=false; // exit
}
}
if($flg){ // if good picture
$fic=NBG_1310(substr($dta[$i],3)); // ---file.jpg
$com=$dta[$i+2]; // comment
if($num % $col == 0){$htm.="<tr>\n";} // new row
$htm.="<td align='center' valign='middle' width='$celwid'>"; // new column
$htm.="<a href='NBG/$fic' rel='lightbox[grp]' title='$com'><acronym title='$com'>"; // link
$htm.="<img src='NBG2/$fic' alt='$com'></acronym></a></td>\n"; // thumb
if($num % $col == ($col-1)){$htm.="</tr>\n";} // end of new row
$num++;
}
}
$htm.="</table>\n";
return $htm;
}
---------------------------------------------------------------------------------
_data.txt
---the picture with 3 - before
tags or criterias
comment
---------------------------------------------------------------------------------
---pic01.jpg
AB
The picture with 2 criterias : A and B
---photo123.jpg
ACX
The photo with 3 criterias : A, C and X
---------------------------------------------------------------------------------
How uses it ?
---------------------------------------------------------------------------------
Create 2 folders NBG (pictures) and NBG2 (thumbnails)
Put the _data.txt file in NBG
Don't forget the lightbox folder (LightBox2 javascript), but without it runs.
#CMSimple $output.=NBG_show('AX',6,100,5,0);

Re: Multitag image gallery

Posted: Sun Dec 28, 2008 8:25 am
by johnjdoe
Connie wrote: did you check Singapore? http://www.sgal.org/
it is flat file..
I am sure you can include it in a CMSimple page
You can! I did it allready with the plugin GXGetUrl...

Re: Multitag image gallery

Posted: Tue Jan 06, 2009 9:13 am
by Holger
PatrikGC wrote:Ps : this forum removes the tabulations :(
You should use the BBCode-Tag "Code" to post script-code ;) .
Anyway, thanks for sharing.

Holger