Location: PHPKode > projects > mediaIndex > classes/handler.default.php
<?php
/**
 * $Id: handler.default.php,v 1.17 2004/11/29 22:04:32 openface Exp $      
 *
 *               _ _        _         _                 
 *  _ __  ___ __| (_)__ _  (_)_ _  __| |_____ _____ _ _ 
 * | '  \/ -_) _` | / _` | | | ' \/ _` / -_) \ / -_) '_|
 * |_|_|_\___\__,_|_\__,_| |_|_||_\__,_\___/_\_\___|_|  
 *                                                     
 *     Standalone Indexer Script for Media Files
 *        jason hines, <hide@address.com>
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Library General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
 * General Public License for more details.
 */

/**
 * Default group handler class
 * This is the base class for all media group handler classes.
 *
 * @version     $Revision: 1.17 $
 * @package     mediaIndexer
 * @subpackage  handlers
 * @author      jason hines, <hide@address.com>
 */

class defaultHandler {

    public $iconName = "unknown.gif";

    /**
     * Print specific output for this media type when viewing this file.
     */
    public function printMedia(file $file) {
        echo "N/A";
    }

    /**
     * Print specific output for this media type when listing it in it's directory.
     */
    public function printListing(file $file) {
        echo "<a href=\""._MEDIAURL.$file->path."\" title=\"Download {$file->title}\">";
        echo "<img class=\"fade\" src=\""._ICONSURL."/".$this->iconName."\" border=\"0\" alt=\"*\" /></a>&nbsp;";
        echo "<a href=\"?file="._encodeuri($file->path)."\" title=\"File Details: {$file->title}\">";
        echo _truncate($file->title,28)."</a> <small>({$file->filesize})</small>";
        if (!empty($file->desc)) {
            echo "<br /><blockquote class=\"description\">"._parseText($file->desc)."</blockquote>\n";
        }
    }

}

?>
Return current item: mediaIndex