11-30-2007, 08:00 PM
|
#3 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Config.php
Located in /includes/config.php
This is pretty easy to understand.
php Code:
// The path to the image folder. $path = 'images/'; // What format is all the pictures. $format = '.jpg'; // How many pictures per row on each page. $maxcol = 2; // How many pictures per page. $imgPerPage = 8; // Name of the XML file which holds all the description data of all pictures. $xml = 'includes/templates/desc.xml'; // Sets the max height for images in gallery view. $maxHeight = 200; // Sets the max width for images in image view. $maxWidth = 700; // How many pages to display in each direction IF they exists. $span = 3; // Set this to whatever name you have on the gallery index page. $index = 'index.php';
That is the editable variables in the config.
The next part of the config, is just setting things up with the class:
php Code:
// Includes the class file. include('classes/gallery.php'); // Creates a new object from the class. $gallery = new gallery($path); // Sets the format of all pics. $gallery->setFormat($format); // Sets the index page. $gallery->setIndex($index); // Sets how many images per page. $gallery->setImagesPerPage($imgPerPage); // Sets how many images per row. $gallery->setMaxCol($maxcol); // Sets max height in gallery view. $gallery->setMaxHeight($maxHeight); // Sets the max width in image view. $gallery->setMaxWidth($maxWidth); // Sets the span. $gallery->setSpan($span); // Sets the XML file. $gallery->setXML($xml);
// Includes the class file. include ('classes/template.php'); // Creates a new object from the class. $tpl = new template;
Pretty easy to understand.. it just creates the object, and sets some variables in the class.
|
|
|
|