Aquatakat.com

Aqua Index

Aqua Index is a folder index and thumbnail generaton script written in object oriented PHP. It automatically generates an index for a folder, much like Apache's mod_autoindex extension. It was designed to give web developers a prettier and more customisable option to display a folder.

Demo

You can see the script in action in the demo folder or in the stuff repository. The stuff repository has more things in it.

Download

The latest version is 2.1. Older versions are not available.

Change Log

2.1 (14th of May 2008):
Fixed issue where data dir was not being referenced properly on Linux
2.0 (14th of May 2008):
Fixed browse folder security bug
Added support for folder thumbnails
Added support for text file thumbnails
New icons for everything
Put script in a class
Moved settings into separate file for easy upgrades
Fixed issue where capital lettered extensions don't get the right icon
Also more things I've forgotten
1.0:
Initial release

Requirements

Aqua Index requires the following:

Installation

Installation is very simple. Just drop index.php, aki.class.php, and the __data folder into the folder you would like to index. Then access the folder as normal.

Note:
Aqua Index requires that it has full read and write access to the __data folder. If it doesn't, the script will output errors upon trying to index various folder sizes and thumbnails.

Customisation

Editing aki.ini

When Aqua Index is run it places an aki.ini file into the __data/ directory. This file has colour settings for the backgrounds of the thumbnails as well as font sizes and things. The file is fairly self explanitory.

Using the AKIPage Object

Aqua Index runs off one solitary class, AKIPage. You can include this class into any PHP file by just including aki.class.php and calling AKIPage as a new class. The index.php file only has a bit of CSS and HTML. All of the indexing is done through the class.

You can include the class into your own PHP files like this:

<?php
require 'aki.class.php';
$index = new AKIPage;
?>

[Your HTML, PHP, CSS, etc. here]

<?php
$index->display(); // Displays the index
?>

The AKIPage makes a few other variables and functions available to you.

<?php

$index = new AKIPage;

// This will display only the index table
$index->displayMain();

// If in a folder, returns the name of the folder
// Otherwise returns false
$index->getHeader();

// Returns an array with the breadcrumb list
$index->getCrumbs();

// Returns an array of all the files
$index->file_list;

// Returns the total number of items in this folder
$index->total_items;
$index->total_folders;
$index->total_files;

?>

Also please note that the declaration of the new AKIPage must appear before any outputted HTML for the thumbnails to work properly.

Other Cool Places