$this->tmpl->assign('to_date', $this->get_calendar('to'));
$this->tmpl->assign('sort_field', $this->get_sort_field());
$this->tmpl->assign('content_page', 'welcome.tpl');
+ $this->tmpl->assign('template_path', 'themes/'. $this->cfg->theme_name);
$this->tmpl->show("index.tpl");
var $web_path = "/phpfspot";
+ var $theme_name = "default";
+
/* it's enough if this database is readonly for the webserver */
var $fspot_db = "/var/www/f-spot-dbs/photos.db";
if(!isset($this->hide_tags))
$this->showError("Please set \$hide_tags in phpfspot_cfg");
+ if(!isset($this->theme_name))
+ $this->showError("Please set \$theme_name in phpfspot_cfg");
+
if(isset($this->error_found) && $this->error_found)
exit(1);
public function __construct($parent)
{
+ if(!file_exists($parent->cfg->base_path .'/themes/'. $parent->cfg->theme_name .'/templates')) {
+ print "No templates found in ". $parent->cfg->base_path .'/themes/'. $parent->cfg->theme_name .'/templates';
+ exit(1);
+ }
+
$this->Smarty();
- $this->template_dir = $parent->cfg->base_path .'/templates';
+ $this->template_dir = $parent->cfg->base_path .'/themes/'. $parent->cfg->theme_name .'/templates';
$this->compile_dir = $parent->cfg->base_path .'/templates_c';
$this->config_dir = $parent->cfg->base_path .'/smarty_config';
$this->cache_dir = $parent->cfg->base_path .'/smarty_cache';
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$page_title}</title>
- <link href="stylesheet.css" type="text/css" rel="stylesheet" />
+ <link href="{$template_path}/stylesheet.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="rpc.php?mode=init&client=all"></script>
<script type="text/javascript" src="phpfspot.js"></script>
<link rel="shortcut icon" href="resources/gpl_16.png" type="image/png" />