make themes configurable (fixes #50)
* gallery.ini: - remove theme specific configuration - add default theme name * includes/galleryfunctions.php: - implement theme initialization - configure common parameters from theme * includes/theme.class.php: - implement a simple theme class * index.php: - assign $gallery to template * themes/default_horizontal/theme.ini: - add theme specific configuration * themes/default_horizontal/theme.php: - use $content['gallery'] instead of undefined $gallery
This commit is contained in:
parent
0ed421b1ce
commit
fcea03a800
6 changed files with 83 additions and 6 deletions
|
@ -45,15 +45,18 @@ if (array_key_exists('logfile', $configuration)) {
|
|||
ini_set('error_log', $configuration['logfile']);
|
||||
}
|
||||
|
||||
require_once('theme.class.php');
|
||||
$theme = new Theme($configuration['defaulttheme']);
|
||||
|
||||
/**
|
||||
* Breite der Vorschaubilder.
|
||||
*/
|
||||
$previewwidth = $configuration['previewwidth'];
|
||||
$previewwidth = $theme->previewsize;
|
||||
|
||||
/**
|
||||
* Höhe der Thumbnailbilder.
|
||||
*/
|
||||
$thumbheight = $configuration['thumbheight'];
|
||||
$thumbheight = $theme->thumbsize;
|
||||
|
||||
/**
|
||||
* Prüft, ob eine Galerie mit dem übergebenen Namen existiert.
|
||||
|
|
Reference in a new issue