<?php

// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -->
// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -->
/*

	Paloose Entry Point for Paloose Info Site
	=========================================
	
	All site requests come through this file. All it does is load the primary
	Paloose file and class. It requires that there is a rewrite rule set up in
	the local .htaccess file. The entry in this file should be similar to

		RewriteEngine On
		RewriteRule (.+)\.html paloose.php?url=$1.html [L,qsappend]

   Author:
   	Name  : Hugh Field-Richards.
   	Email : hsfr@hsfr.org.uk

-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- Copyright -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

	This software is published under the terms of the LGPL License
	a copy of which has been included with this distribution in the LICENSE file.
             
   @since 1.5.2b1
*/

// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// Change the PALOOSE_DIRECTORY address here to indicate where you have put
// the main Paloose folder. It can be relative to your application site folder.
define( 'PALOOSE_DIRECTORY', '../paloose' );
define( 'PALOOSE_LIB_DIRECTORY', PALOOSE_DIRECTORY . '/lib' );

// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// Where the main log4php logger configuration file is kept. Do not use
// pseudo protocols here. Relative paths are from the Paloose server directory.
define( 'PALOOSE_LOG4PHP_DIRECTORY', '../log4php' );
define( 'PALOOSE_LOGGER_CONFIGURATION_FILE', '../[site root directory]/configs/Paloose.xml' );
define( 'TIME_ZONE', 'Europe/London' );

// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// Where the paloose caches are held. Does not include the images cache for
// the directory. 
define( 'PALOOSE_CACHE_DIR', 'resources/cache' );

// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// Normally should not have to change this. The directory is always the top
// level user directory.
define( 'PALOOSE_ROOT_SITEMAP', 'sitemap.xmap' );
define( 'PALOOSE_SITE_ROOT_DIRECTORY', '../[name of site directory]' );

// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// The error page to give back for User errors (errors in sitemap etc). They
// are not run time errors (missing page (404) ). If you override these to your
// area make sure that you use an absolute directory path - you can use the
// 'context' pseudo-protocol here.
define( 'PALOOSE_USER_EXCEPTION_PAGE', 'resource://resources/errorHandling/userError.html' );
define( 'PALOOSE_USER_EXCEPTION_TRANSFORM', 'resource://resources/transforms/errorPage2html.xsl' );
// Be careful of the path here - although it is relative it looks as an absolute one. It is in
// fact relative to the Apache root document directory. Must always have a leading path
// separator.
define( 'PALOOSE_USER_EXCEPTION_STYLE', '/paloose/resources/styles/userError.css' );

// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// The file that contains the gallery information in each gallery directory
define( 'PALOOSE_GALLERY_INDEX', 'gallery.xml' );

// Define if PATH on server is not set to pick up correct ImageMagick binaries
define( 'IMAGEMAGICK_BIN', '/usr/local/bin/' );

// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// The error page to give back for internal programming errors. These should
// not need to be overridden.
define( 'PALOOSE_INTERNAL_EXCEPTION_PAGE', 'resource://resources/errorHandling/internalError.html' );
define( 'PALOOSE_INTERNAL_EXCEPTION_TRANSFORM', 'resource://resources/transforms/errorPage2html.xsl' );
// Be careful of the path here - although it is relative it looks as an absolute one. It is in
// fact relative to the Apache root document directory. Must always have a leading path
// separator.
define( 'PALOOSE_INTERNAL_EXCEPTION_STYLE', '/paloose/resources/styles/internalError.css' );

// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// Change this with caution - should not be changed in 99.9% of cases
define( 'PALOOSE_SITEMAP_NAMESPACE', 'http://apache.org/cocoon/sitemap/1.0' );
define( 'PALOOSE_SOURCE_NAMESPACE', 'http://apache.org/cocoon/source/1.0' );
define( 'PALOOSE_DIR_NAMESPACE', 'http://apache.org/cocoon/directory/2.0' );
define( 'PALOOSE_SQL_QUERY_NAMESPACE', 'http://apache.org/cocoon/SQL/2.0' );

// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
// Change these with caution - should only be changed for different translation
// mechanism. Requires understanding of Paloose internals :-)
define( 'PALOOSE_I18N_NAMESPACE', 'http://apache.org/cocoon/i18n/2.1' );
define( 'PALOOSE_PAGE_HIT_TRANSFORM', 'resource://resources/transforms/PageHit.xsl' );
define( 'PALOOSE_NAMESPACE', 'http://www.paloose.org/schemas/Paloose/1.0' );

// -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* -->
// Definitely Do not change anything below this line!
ini_set( 'track_errors', '1' );
date_default_timezone_set( defined( 'TIME_ZONE' ) ? TIME_ZONE : "GMT");
require_once( PALOOSE_DIRECTORY . '/lib/Paloose.php' );
$paloose = new Paloose();
$paloose->run( $_SERVER[ 'REQUEST_URI' ], $_SERVER[ 'QUERY_STRING' ] );
unset( $paloose );

?>