Overview
KoschtIT Image Gallery is a PHP-script for an easy viewing of your pictures in the web browser. The appearance of the gallery can be individually customized and it is possible to have more than one gallery inside your html document. The only prerequisite for using the script is PHP5 with GD2 support. The pictures aren't displayed in an extra window, instead they are opened directly on top of your HTML document. Therefore your website background gets shaded. While moving your mouse to the edges of the browser window previewing pictures for the next/previous picture of a gallery are displayed. Since version 1.5 the website administrator is able to write a comment for each picture in an easy way. The gallery can be operated by keyboard or by mouse. The control via mouse is different than on any other page. Please take a look at this:Mouse control
Demo
In order to get a first impression here you have a small demo. You can show single pictures as well as gather a set of pictures to a gallery.Single pictures
Galleries
How to use
Adding tags
1.
Add to your header ( between <head> and </head> ) this line:
<?php include_once("ki_headertags.php"); ?>
2.
Add this tag at the spot where you want your picture/gallery to be. Than replace $dir_name with the folder name where your picture(s) are located. You can add this tag various times for different folders.
<?php
$dir_name = "demo";
include_once("ki_kitgallery.php");
?>
3.
At the very end of your site in front of the closing </body> tag you have to add the following:
<?php include_once("ki_maintags.php"); ?>
Creating folders and uploading your images
Now you need to create a main picture folder somewhere on your webspace. All your galleries should go there. The relative path from the file where you added your tags to this folder is crucial! Later you have to enter this path in the ki_setup.php as a value for $pic_dir = "./" .Now you can add your picture/gallery folders to the main picture folder. Upload your pictures to them and don't forget to name these folders exactly the same as you did in $dir_name = "..." .
Customizing your galleries
1.
You can style your galleries with a sole main lookout or you can style several galleries individually. The most important central properties you can find inside the ki_setup.php. Here an example:
$pic_dir = "./koschtitdir/"; // The raltive path to the folder where all the galleries are in
$pic_order = 0; // 0 = newest pictures first, 1 = newest pictures last, 2 = alphabetical order
$bord_color = "#ffffff"; // border color
$bord_size = 5; // 0 - any ( pixels )
$shade_while_loading = 1; // 1 = shaded body while gallery is loading or 0 = not shaded
$fade_alpha = 4; // 0-10 ( 10 = full opacity )
$fade_color = "#000000"; // shade color
$preview_pics = 4; // Number of previewing pictures ( 8 = max )
$preview_pics_space = 50; // space between previewing pictures
$preview_bord_color = "#ffffff"; // border color of the preview picture
$preview_bord_size = 3; // 0 - any ( pixels )
$th_to_square = 1; // if set to 1 all thumbs will go to square, 0 = normal thumbs
$th_2sq_crop_vert = "middle"; // show "middle", "top" or "bottom" part of the picture
$th_2sq_crop_hori = "center"; // show "center", "left" or "right" part of the picture
$comments = 1; // 1 = comments are displayed / 0 = comments are not displayed
$comm_text_size = 11; // comments font size in pixels
$comm_text_color = "#000000"; // comments font color
$comm_text_font = "Tahoma, Verdana, Arial, Helvetica, sans-serif"; // comments font face
$comm_text_align = "left"; // comments text align "left", "center" or "right"
$comm_auto = 1; // // 1 for auto comments as defined in $comm_auto_string. If 1 you can't make own comments. Set to 0 for custom comments.
$comm_auto_string = "KoschtIT Image Gallery - Picture %x of %X"; // String comment where "%x" = picture number and "%X" = number of all pictures in the gallery
$load_img = "ki_loading.gif"; // loading animation picture ( has to be in the same folder )
$thumbs_to_disk = 1; // 1 = thumbs are saved on the server / 0 = thumbs are generated "on the fly"
$diashow_time = 5000; // time per picture in ms
$oversize_allowed = 0; // 0 = pictured are reduced in size if they are too big / 1 = no reducing
$admin = "user"; // admin username
$pw = "password"; // admin password
2.
Additionally you can have every gallery styled individually. This is an option. Therefore you have to create for the particular gallery a file named galleryname_ki_setup.php. If such a file is absent the values inside the ki_setup.php are taken by default.Individual styling may look like this:
$fr_width = 600; // width of the gallery
$fr_height = 130; // height of the gallery
$fr_color = "#000000"; // background color of the gallery
$thumbs = 4; // maximal number of thumbs that are shown at the same time
$th_per_line = 4; // thumbs per line
$th_lines = "auto"; // "auto" or a number
$th_width = "auto"; // "auto" or a number
$th_height = 90; // "auto" or a number
$th_bord_size = 2; //thumbs border size 0 - any ( pixels )
$th_bord_color = "#000000"; // border color of all thumbs
$show_text = 1; // 1 = show navigation control / 0 = don't show navigation control
$text_size = 11; // text size of navigation links in pixels
$text_color = "#ffffff"; // text color of navigation links
$text_font = "Tahoma, sans-serif"; // text font face of navigation links
$text_continue = "next"; // text for "next" thumbs
$text_return = "back"; // text for "previous" thumbs
$text_underline = 0; // 1 = links underlined / 0 = not underlined
$diashow = 1; // 1 = slideshow allowed / 0 = slideshow not allowed
$diashow_text = "slideshow"; // text for "slideshow"
Keyboard usage
For comfort handling reasons the script also interprets keyboard inputs for navigation. The following hotkeys can be used:Page down or End
... show previous picturePage up or Home
... show next pictureArrow keys
... view oversized picturesBreak
... break/continuing slideshowEsc
... close the picturePicture comments
You can add a comment conveniently to every picture if you are the administrator and have a valid username and password.To do so you have to open the page where the gallery is used with an additional "?admin=username" in the address bar. For instance for this page this would look like "http://koschtit.tabere.net?admin=username" . Of course you would need to replace username with the real valid username as found in the ki_setup.php .
After entering the password into the opening input field you can add comments to each picture. These are saved after you press the enter button. Therefore you don't need a database. Please read the FAQ Question 4 for further infomation.
Download
!!! Attention - new "ki_setup.php" !!!
KoschtIT Image Gallery v1.72
KoschtIT Image Gallery v1.72
Changelog
- v1.72- Changed: New thumb size calculation
- Fixed: Slidewhow in some cases didn't work when using multiple galleries
- Fixed: Thumbs were generated always "on the fly" even with $thumbs_to_disk set to 1
- Added: New parameter $shade_while_loading = 1; for switching off shaded body while gallery loading
FAQ
Since I'm getting a lot of questions about the scripte - here you have a small list of "frequently asked questions":
1. Why my thumbs are only half-size and the script ain't working on Internet Explorer?
2. I have included everything but i don't see any thumbs?
3. All pathes are correct but I still don't see any thumbs!
4. Where i can login to write a picture comment?
5. Help me!? My comments won't get saved!
6. The script supports which browsers?
7. Only parts of my website get shaded?!
8. How can i use the script in my website when I'm opening a page like "domain.com?site=gallery" ?
1. Why my thumbs are only half-size and the script ain't working on Internet Explorer?
This problem occurs if you are using a different DOCTYPE than the script does. The script needs the following DOCTYPE:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">Try to rewrite the page the gallery is in to this DOCTYPE ( or at least XHTML transitional ). If you use other browsers than IE you won't have this issue.2. I have included everything but i don't see any thumbs?
Did you upload your pictures to the right folder? They have to be in the same folder as written in $dir_name = "foldername"; . Further on the relative path to this folder has to deposited at $pic_dir = "./koschtitdir/"; . If all this is done correctly and you still don't see any pictures it may be that your PHP doesn't have writing permission on the server disk. The only thing you can do about that is to set $thumbs_to_disk = 1; to zero. Than the script won't try to save the thumbs on the webserver and will generate them "on the fly".
3. All pathes are correct but I still don't see any thumbs!
It is recommended to remove any special characters or spaces from the pictures you are uploading. Avoid characters like "+" or "%" and "?". Use only letters and digits. Maybe one of your picture files is corrupt?
4. Where i can login to write a picture comment?
Open the page where the gallery is located with "?admin=user" (or &admin=user). Don't forget to use the username and password as saved inside the ki_setup.php . Also make sure you have set the paramter $comm_auto to 0 there. Otherwise you won't be able to write custom comments.
5. Help me!? My comments won't get saved!
Probably PHP can't get writing permissions on your webserver. In this case you have to add your comments by hand. Therefore you have to create a folder named "thumbs" in the gallery you want to have your comments in. Afterwards you can put ".txt"-files in there. Each ".txt" should be named the same way as the picture the comment is for. For example for "picture.jpg" you need "picture.txt". Write your comment inside the ".txt"-file and make sure that $comments = 1; . If after all this comments are still missing make sure you upgraded to PHP5.
6. The script supports which browsers?
I have tested the script successfull on the following browsers:
- Firefox 2
- Internet Explorer 6, 7
- Opera 8, 9
- Safari 3 ( Windows BETA )
- Firefox 2
- Internet Explorer 6, 7
- Opera 8, 9
- Safari 3 ( Windows BETA )
7. Only parts of my website get shaded?!
Could it be that you use frames or iFrames on your site? You can't use the script inside frames. Maybe try to get rid off them? I'm sure you can code every website without the help of these ( outdated ) tags. Just search for AJAX and DHTML.
8. How can i use the script in my website when I'm opening a page like "domain.com?site=gallery" ?
Here some simple code fragement that could be usefull:
<?php
$gallery = 0;
if(isset($_GET['site'])){ if($_GET['site'] == "gallery"){ $gallery = 1; } }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
...
<?php
if($gallery == 1)include_once("ki_headertags.php");
?>
</head>
<body>
...
<?php
if($gallery == 1){
$dir_name = "demo";
include_once("ki_kitgallery.php");
}
?>
...
<?php
if($gallery == 1)include_once("ki_maintags.php");
?>
</body>
</html>
Contact
If you still have some questions you can use the comment functionality.
You may also write me an email . Just let me now what you think about the script. I appreciate every note.
You may also write me an email . Just let me now what you think about the script. I appreciate every note.
Comments
Add a comment
Weird Error
Weird... I had the gallery set up & running like a treat... perfect infact... and then sudnenly after an hour or so I start to get this error:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started
...and none of the pictures now show up:
www.230607.co.uk
...anybody have any ideas why?!?!?!?!
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started
...and none of the pictures now show up:
www.230607.co.uk
...anybody have any ideas why?!?!?!?!
written on 04/17/2008 by Pete pete@petemachine.co.uk http://www.230607.co.uk
Comments and other
How do I log in to the gallery? I mean i set up the gallery and stuff works, but how do I log in and stuff? And make comments, stuff like that, can't figure that out.
By the way we got the same name
By the way we got the same name
written on 01/26/2008 by kostya kostya1000@gmail.com http://kostya.onexonline.net
why is my ki_setup.php blank when i open it in my browser (firefox)?
>> You don't have to open the ki_setup.php with a browser. Use notepad or another text editor instead. Don't forget to edit the default_ki_setup.php if necessary.
>> You don't have to open the ki_setup.php with a browser. Use notepad or another text editor instead. Don't forget to edit the default_ki_setup.php if necessary.
written on 01/26/2008
How to show single pictures in a my web page?
>> Adding a single picture is similar to adding a gallery. Just make sure you have set $thumbs=1; $thumbs_per_line=1; in your setup file. Maybe it is neccessary to adjust th_width and th_height too.
>> Adding a single picture is similar to adding a gallery. Just make sure you have set $thumbs=1; $thumbs_per_line=1; in your setup file. Maybe it is neccessary to adjust th_width and th_height too.
written on 01/14/2008 by Arunas wataz9@gmail.com
wonderful
wonderful man wonderful i love ur script it looks so nice, so professional and is 100% customizable!!
amazing!! great job
amazing!! great job
written on 01/11/2008 by Jaime
Great gallery
Hi Konstantin your gallery are very good and works very well, i have used it on one of my projects and the flexibilty to inlcude the gallery on any page are amazing.
Very good work!! Thanks!
Very good work!! Thanks!
written on 01/06/2008 by Bruno bfagundez@gmail.com http://nsnc.cqchosting.com
Undefined count variable
Hi Konstantin
Thanks for what seems a great Gallery.
But...
I'm getting the following when I run your index.php file:
PHP Notice: Undefined variable: count in C:\Inetpub\wwwroot\html\pGallery\ki_kitgallery.php on line 2
I'm not very experienced with PHP so I'm not sure what to do.
Any help greatly appreciated,
Dec
Thanks for what seems a great Gallery.
But...
I'm getting the following when I run your index.php file:
PHP Notice: Undefined variable: count in C:\Inetpub\wwwroot\html\pGallery\ki_kitgallery.php on line 2
I'm not very experienced with PHP so I'm not sure what to do.
Any help greatly appreciated,
Dec
written on 12/28/2007 by Declan declan.swords@telia.com
Submit your site at Search Scripts Directory.
Hello,
This is an invitation for you to submit your scripts, products and programs at Search-Scripts.com. It is a web scripts directory portal as well as a search engine of scripts and components. So, you are most welcome to submit your script listings so that they are listed in the scripts directory at Search-Scripts.com.
http://www.search-scripts.com - Web Scripts Directory Portal
It is a rapidly growing scripts directory and we are offering free sponsored listings to early birds. So, take the benefit of our introductory offer. The best thing is that Search-Scripts.com offers SEO friendly URLs for your script listings so your products get maximum exposure in search engines for the keywords of your script listing title.
If your scripts & programs are not listed on Search-Scripts.com, they will not be available to webmasters searching for them in our scripts directory. Let us get together and make Search-Scripts.com the biggest scripts directory portal on internet. We also welcome your suggestions for improvement (if any).
Sincerely,
Developer Team (Search-Scripts.com)
Web Scripts Directory - Search Portal
http://www.search-scripts.com
This is an invitation for you to submit your scripts, products and programs at Search-Scripts.com. It is a web scripts directory portal as well as a search engine of scripts and components. So, you are most welcome to submit your script listings so that they are listed in the scripts directory at Search-Scripts.com.
http://www.search-scripts.com - Web Scripts Directory Portal
It is a rapidly growing scripts directory and we are offering free sponsored listings to early birds. So, take the benefit of our introductory offer. The best thing is that Search-Scripts.com offers SEO friendly URLs for your script listings so your products get maximum exposure in search engines for the keywords of your script listing title.
If your scripts & programs are not listed on Search-Scripts.com, they will not be available to webmasters searching for them in our scripts directory. Let us get together and make Search-Scripts.com the biggest scripts directory portal on internet. We also welcome your suggestions for improvement (if any).
Sincerely,
Developer Team (Search-Scripts.com)
Web Scripts Directory - Search Portal
http://www.search-scripts.com
written on 12/27/2007 by PPlawinder Singh invitation@search-scripts.com http://www.search-scripts.com
More comments next Site or last Site


