Mise à jour des fichiers d'installation et renommage du fichier de configuration avec quelques modifications de valeurs par défaut de la configuration

This commit is contained in:
Leblanc Simon 2009-09-06 14:22:15 +00:00
commit 1fcc75cf9c
3 changed files with 19 additions and 21 deletions

View file

@ -1,12 +1,11 @@
Configuration:
* web server with PHP support
* web server with PHP >= 5.2 support
Installation:
* copy all the files in the appropriated directory
* copy the "configuration-dist.php" as "configuration.php"
* edit the" configuration.php" file, according to your needs
* give the write permissions for everyone to the "cache/" directory
* give the same rights to the "cache/" directories, in the "template/" directory.
* copy the "inc/config/config-dist.php" as "inc/config/config.php"
* edit the "inc/config/config.php" file, according to your needs
* give the write permissions for everyone (or at least to the user of apache) to the "cache/" directory
Using:
* Each strip is represented by a SVG file and its PNG export
@ -14,7 +13,7 @@ Using:
* For correct operations (display of the title, date, comments, ...), each SVG file must have RDF metadata (using Inkscape: File > metadata).
* Put these 2 files in the "strips" directory.
Installation of patchs for punBB (for comments management):
* copy "punbb-1.2.15_extern.php", "punbb-1.2.15_post.php" and "punbb-1.2.15_redirect_stripit.php" at the root directory of the punBB installation
* delete the strings "punbb-1.2.15_" in the filenames
Installation of patchs for FluxBB (for comments management):
* copy "fluxbb-1.2.21_extern.php", "fluxbb-1.2.21_post.php" and "fluxbb-1.2.21_redirect_stripit.php" at the root directory of the FluxBB installation
* delete the strings "fluxbb-1.2.21_" in the filenames

View file

@ -1,12 +1,11 @@
Configuration nécessaire :
* serveur web avec support PHP
* serveur web avec support PHP >= 5.2
Installation :
* copier les fichiers dans le répertoire souhaité
* copier le fichier "configuration-dist.php" comme "configuration.php"
* éditez le fichier "configuration.php", selon vos besoins
* donnez les droits en écritures pour tous au répertoire "cache/"
* donnez les droits en écritures pour tous aux répertoire "cache/" dans les répertoires contenu dans "template/"
* copier le fichier "inc/config/config-dist.php" comme "inc/config/config.php"
* éditez le fichier "inc/config/config.php", selon vos besoins
* donnez les droits en écriture pour tous (ou au moins pour l'utilisateur d'apache) au répertoire "cache/"
Utilisation :
* Chaque strip est représenté par un fichier SVG et son export en PNG.
@ -14,7 +13,7 @@ Utilisation :
* Pour un bon fonctionnement (affichage du titre, date, commentaires, etc.) chaque fichier SVG doit contenir des métadonnées au format RDF (dans Inkscape, Fichier > métadonnées).
* Déposez ces deux fichiers dans le répertoire "strips/"
Installation des patchs pour punBB (gestion des commentaires):
* copier "punbb-1.2.15_extern.php", "punbb-1.2.15_post.php" et "punbb-1.2.15_redirect_stripit.php" à la racine du répertoire où est installé punBB
* supprimer les chaînes "punbb-1.2.15_" des noms de fichier
Installation des patchs pour FluxBB (gestion des commentaires):
* copier "fluxbb-1.2.21_extern.php", "fluxbb-1.2.21_post.php" et "fluxbb-1.2.21_redirect_stripit.php" à la racine du répertoire où est installé FluxBB
* supprimer les chaînes "fluxbb-1.2.21_" des noms de fichier

239
inc/config/config-dist.php Normal file
View file

@ -0,0 +1,239 @@
<?php
/**
* Class for manage the configuration
*
* @license http://www.gnu.org/licenses/gpl.html GPL
* @copyright 2009 Johann Dréo, Simon Leblanc
* @package stripit
* @todo outsource the method to have only the attribute in this file (for more visibility), maybe with interface and abstract class ?
*/
class Config
{
/**
* Software version
* @var string
* @access protected
*/
protected static $version = '0.8rc1';
/**
* URL of the website
* @var string
* @access protected
*/
protected static $url = 'http://localhost/stripit';
/**
* Name of the index page
* @var string
* @access protected
*/
protected static $index = 'index.php';
/**
* Name of the gallery page
* @var string
* @access protected
*/
protected static $gallery = 'gallery.php';
/**
* Title of the website
* @var string
* @access protected
*/
protected static $title = 'Stripit';
/**
* Default language of the interface
* @var string
* @access protected
*/
protected static $language = 'fr-FR';
/**
* Short description - Is displayed as a subtitle
* @var string
* @access protected
*/
protected static $description = 'Ce serait mieux avec des strips libres !';
/**
* Webmaster's name
* @var string
* @access protected
*/
protected static $webmaster = 'inconnnu';
/**
* Webmaster's email
* @var string
* @access protected
*/
protected static $email = 'root@example.com';
/**
* Additional URL
* @var array
* @access protected
*/
protected static $see_also = array(
'Geekscottes' => 'http://www.nojhan.net/geekscottes',
);
/**
* Shop URL
* @var string
* @access protected
*/
protected static $shop = 'http://perdu.com';
/**
* The cache directory path
* @var string
* @access protected
*/
protected static $cache_folder = './cache';
/**
* The filename of cache for list of strip
* @var string
* @access protected
*/
protected static $cache_filename = 'cache.php';
/**
* The cache time before regenerated the new cache
* @var integer
* @access protected
*/
protected static $cache_time = 1440; // in minutes : 1440 = 1 day
/**
* HTML template folder
* @var string
* @access protected
*/
protected static $template_folder = './inc/tpl';
/**
* Name of HTML template
* @var string
* @access protected
*/
protected static $template_name = 'lego';
/**
* Name of RSS template
* @var string
* @access protected
*/
protected static $template_rss = 'rss';
/**
* Diretory path for the strips
* @var string
* @access protected
*/
protected static $strip_folder = './strips';
/**
* Number of thumbnails per gallery page
* @var integer
* @access protected
*/
protected static $thumbs_per_page = 5;
/**
* Size of the thumbnails
* @var integer
* @access protected
*/
protected static $thumb_size = 200;
/**
* Diretory path for the strips thumbnails
* @var string
* @access protected
*/
protected static $thumb_folder = './strips/th';
/**
* Use FluxBB integration ?
* @var boolean
* @access protected
*/
protected static $use_fluxbb = false;
/**
* FluxBB's forum ID to use for strips comment
* @var integer
* @access protected
*/
protected static $fluxbb_forum_id = 1;
/**
* FluxBB's forum ID to use for word of the day
* @var integer
* @access protected
*/
protected static $fluxbb_wotd_id = 2;
/**
* FluxBB's forum max length for the message
* @var integer
* @access protected
*/
protected static $fluxbb_max_length = 128;
/**
* Forum URL
* @var string
* @access protected
*/
protected static $fluxbb_forum = 'http://forum';
/*
All getter for access to protected attributes
*/
public static function getVersion() { return self::$version; }
public static function getUrl() { return self::$url; }
public static function getIndex() { return self::$index; }
public static function getGallery() { return self::$gallery; }
public static function getTitle() { return self::$title; }
public static function getLanguage() { return self::$language; }
public static function getDescription() { return self::$description; }
public static function getWebmaster() { return self::$webmaster; }
public static function getEmail() { return self::$email; }
public static function getSeeAlso() { return self::$see_also; }
public static function getShop() { return self::$shop; }
public static function getUseCache() { return self::$use_cache; }
public static function getCacheFolder() { return self::$cache_folder; }
public static function getCacheFilename() { return self::$cache_filename; }
public static function getCacheTime() { return self::$cache_time; }
public static function getTemplateFolder() { return self::$template_folder; }
public static function getTemplateName() { return self::$template_name; }
public static function getTemplateRss() { return self::$template_rss; }
public static function getStripFolder() { return self::$strip_folder; }
public static function getThumbsPerPage() { return self::$thumbs_per_page; }
public static function getThumbSize() { return self::$thumb_size; }
public static function getThumbFolder() { return self::$thumb_folder; }
public static function getUseFluxbb() { return self::$use_fluxbb; }
public static function getFluxbbForumId() { return self::$fluxbb_forum_id; }
public static function getFluxbbWotdId() { return self::$fluxbb_wotd_id; }
public static function getFluxbbMaxLength() { return self::$fluxbb_max_length; }
public static function getFluxbbForum() { return self::$fluxbb_forum; }
}