Kethigallery - an image gallery class for your website written in PHP

Kethigallery is a PHP class designed to allow you to quickly and easily turn a directory of images on your website into an attractive looking, highly configurable gallery.

Features

Live demos

Download

Example code

<?php
require_once('inc/kethigallery.inc.php');               // include kethigallery
$kethigallery = new kethigallery('folder/with/images'); // instantiate kethigallery
$kethigallery->set_admin_url('gallery_admin');          // set admin url
$kethigallery->set_admin_username('username');          // set admin username
$kethigallery->set_admin_password('password');          // set admin password
/* ... */                                               // set any optional preferences here
$kethigallery->init();                                  // initialize kethigallery
?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
<head>
<meta http-equiv='Content-Type' content='application/xhtml+xml; charset=utf-8' />
<title>Kethigallery Demo</title>
<link rel='stylesheet' type='text/css' href='kethigallery_example.css' />
</head>
<body>
<?php $kethigallery->draw_gallery();                    /* draw gallery markup */ ?>
</body>
</html>

Example code for linker mode (linking to the gallery from a preview on another page)

<?php
require_once('inc/kethigallery.inc.php');               // include kethigallery
$kethigallery = new kethigallery('folder/with/images'); // instantiate kethigallery
$kethigallery->set_admin_url('gallery_admin');          // set admin url
$kethigallery->set_admin_username('username');          // set admin username
$kethigallery->set_admin_password('password');          // set admin password
$kethigallery->set_thumbs_per_page(3);                  // an optional preference
$kethigallery->init();                                  // initialize kethigallery
?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'>
<head>
<meta http-equiv='Content-Type' content='application/xhtml+xml; charset=utf-8' />
<title>Kethigallery Demo (linker mode)</title>
<link rel='stylesheet' type='text/css' href='kethigallery_example_linker.css' />
</head>
<body>    
<h1>Welcome to the Kethigallery Linker Demo</h1>
<p>This page demonstrates how to integrate a preview of your gallery into your
    site's existing content. The thumbnails on this page link to the full gallery
    over at (in this case) kethigallery_demo.php.</p>
<p>Click on one of the below thumbnails to enter the gallery slideshow. Or click
    <a href='kethigallery_demo.php'>here</a> to see the whole gallery in thumb
    gallery mode.</p>
<?php $kethigallery->draw_linker_to('kethigallery_demo.php'); /* draw linker markup and
                                                                 point it to main gallery */ 
?>
</body>
</html>

Class method documentation

Settings methods

These methods can be called to configure your instance of Kethigallery. All of these methods must be called prior to init().

Licensing

Creative Commons License Kethigallery is licensed under the Creative Commons Attribution 3.0 United States License. You are permitted to redistribute and/or modify this work for commercial or noncommercial purposes provided proper attribution to the original author (me) is present in the redistribution.