Restore custum tpl dir
This commit is contained in:
parent
81b9c01366
commit
a197ef5e02
5 changed files with 15 additions and 13 deletions
|
@ -189,7 +189,7 @@ public function write($isLoggedIn)
|
||||||
'general.title',
|
'general.title',
|
||||||
'general.header_link',
|
'general.header_link',
|
||||||
'privacy.default_private_links',
|
'privacy.default_private_links',
|
||||||
'redirector.url'
|
'redirector.url',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Only logged in user can alter config.
|
// Only logged in user can alter config.
|
||||||
|
@ -296,6 +296,7 @@ protected function setDefaultValues()
|
||||||
$this->setEmpty('resource.updates', 'data/updates.txt');
|
$this->setEmpty('resource.updates', 'data/updates.txt');
|
||||||
$this->setEmpty('resource.log', 'data/log.txt');
|
$this->setEmpty('resource.log', 'data/log.txt');
|
||||||
$this->setEmpty('resource.update_check', 'data/lastupdatecheck.txt');
|
$this->setEmpty('resource.update_check', 'data/lastupdatecheck.txt');
|
||||||
|
$this->setEmpty('resource.raintpl_tpl', 'tpl/');
|
||||||
$this->setEmpty('resource.theme', 'default');
|
$this->setEmpty('resource.theme', 'default');
|
||||||
$this->setEmpty('resource.raintpl_tmp', 'tmp/');
|
$this->setEmpty('resource.raintpl_tmp', 'tmp/');
|
||||||
$this->setEmpty('resource.thumbnails_cache', 'cache');
|
$this->setEmpty('resource.thumbnails_cache', 'cache');
|
||||||
|
|
|
@ -40,6 +40,7 @@ class ConfigPhp implements ConfigIO
|
||||||
'resource.updates' => 'config.UPDATES_FILE',
|
'resource.updates' => 'config.UPDATES_FILE',
|
||||||
'resource.log' => 'config.LOG_FILE',
|
'resource.log' => 'config.LOG_FILE',
|
||||||
'resource.update_check' => 'config.UPDATECHECK_FILENAME',
|
'resource.update_check' => 'config.UPDATECHECK_FILENAME',
|
||||||
|
'resource.raintpl_tpl' => 'config.RAINTPL_TPL',
|
||||||
'resource.theme' => 'config.theme',
|
'resource.theme' => 'config.theme',
|
||||||
'resource.raintpl_tmp' => 'config.RAINTPL_TMP',
|
'resource.raintpl_tmp' => 'config.RAINTPL_TMP',
|
||||||
'resource.thumbnails_cache' => 'config.CACHEDIR',
|
'resource.thumbnails_cache' => 'config.CACHEDIR',
|
||||||
|
|
|
@ -172,7 +172,7 @@ <h3 id="resources">Resources</h3>
|
||||||
<strong>updates</strong>: File path for the ran updates file.<br />
|
<strong>updates</strong>: File path for the ran updates file.<br />
|
||||||
<strong>log</strong>: Log file path.<br />
|
<strong>log</strong>: Log file path.<br />
|
||||||
<strong>update_check</strong>: Last update check file path.<br />
|
<strong>update_check</strong>: Last update check file path.<br />
|
||||||
<strong>theme</strong>: Templates directory.<br />
|
<strong>raintpl_tpl</strong>: Templates directory.<br />
|
||||||
<strong>raintpl_tmp</strong>: Template engine cache directory.<br />
|
<strong>raintpl_tmp</strong>: Template engine cache directory.<br />
|
||||||
<strong>thumbnails_cache</strong>: Thumbnails cache directory.<br />
|
<strong>thumbnails_cache</strong>: Thumbnails cache directory.<br />
|
||||||
<strong>page_cache</strong>: Shaarli's internal cache directory.<br />
|
<strong>page_cache</strong>: Shaarli's internal cache directory.<br />
|
||||||
|
@ -220,7 +220,7 @@ <h2 id="configuration-file-example">Configuration file example</h2>
|
||||||
<span class="dt">"log"</span><span class="fu">:</span> <span class="st">"data</span><span class="ch">\/</span><span class="st">log.txt"</span><span class="fu">,</span>
|
<span class="dt">"log"</span><span class="fu">:</span> <span class="st">"data</span><span class="ch">\/</span><span class="st">log.txt"</span><span class="fu">,</span>
|
||||||
<span class="dt">"update_check"</span><span class="fu">:</span> <span class="st">"data</span><span class="ch">\/</span><span class="st">lastupdatecheck.txt"</span><span class="fu">,</span>
|
<span class="dt">"update_check"</span><span class="fu">:</span> <span class="st">"data</span><span class="ch">\/</span><span class="st">lastupdatecheck.txt"</span><span class="fu">,</span>
|
||||||
<span class="dt">"raintpl_tmp"</span><span class="fu">:</span> <span class="st">"tmp</span><span class="ch">\/</span><span class="st">"</span><span class="fu">,</span>
|
<span class="dt">"raintpl_tmp"</span><span class="fu">:</span> <span class="st">"tmp</span><span class="ch">\/</span><span class="st">"</span><span class="fu">,</span>
|
||||||
<span class="dt">"theme"</span><span class="fu">:</span> <span class="st">"tpl</span><span class="ch">\/</span><span class="st">"</span><span class="fu">,</span>
|
<span class="dt">"raintpl_tpl"</span><span class="fu">:</span> <span class="st">"tpl</span><span class="ch">\/</span><span class="st">"</span><span class="fu">,</span>
|
||||||
<span class="dt">"thumbnails_cache"</span><span class="fu">:</span> <span class="st">"cache"</span><span class="fu">,</span>
|
<span class="dt">"thumbnails_cache"</span><span class="fu">:</span> <span class="st">"cache"</span><span class="fu">,</span>
|
||||||
<span class="dt">"page_cache"</span><span class="fu">:</span> <span class="st">"pagecache"</span>
|
<span class="dt">"page_cache"</span><span class="fu">:</span> <span class="st">"pagecache"</span>
|
||||||
<span class="fu">},</span>
|
<span class="fu">},</span>
|
||||||
|
|
|
@ -73,7 +73,7 @@ It might be useful if your IP adress often changes.
|
||||||
**updates**: File path for the ran updates file.
|
**updates**: File path for the ran updates file.
|
||||||
**log**: Log file path.
|
**log**: Log file path.
|
||||||
**update_check**: Last update check file path.
|
**update_check**: Last update check file path.
|
||||||
**theme**: Templates directory.
|
**raintpl_tpl**: Templates directory.
|
||||||
**raintpl_tmp**: Template engine cache directory.
|
**raintpl_tmp**: Template engine cache directory.
|
||||||
**thumbnails_cache**: Thumbnails cache directory.
|
**thumbnails_cache**: Thumbnails cache directory.
|
||||||
**page_cache**: Shaarli's internal cache directory.
|
**page_cache**: Shaarli's internal cache directory.
|
||||||
|
@ -134,7 +134,7 @@ It might be useful if your IP adress often changes.
|
||||||
"log": "data\/log.txt",
|
"log": "data\/log.txt",
|
||||||
"update_check": "data\/lastupdatecheck.txt",
|
"update_check": "data\/lastupdatecheck.txt",
|
||||||
"raintpl_tmp": "tmp\/",
|
"raintpl_tmp": "tmp\/",
|
||||||
"theme": "tpl\/",
|
"raintpl_tpl": "tpl\/",
|
||||||
"thumbnails_cache": "cache",
|
"thumbnails_cache": "cache",
|
||||||
"page_cache": "pagecache"
|
"page_cache": "pagecache"
|
||||||
},
|
},
|
||||||
|
@ -208,4 +208,3 @@ It might be useful if your IP adress often changes.
|
||||||
The playvideos plugin may require that you adapt your server's
|
The playvideos plugin may require that you adapt your server's
|
||||||
[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting) [](.html)
|
[Content Security Policy](https://github.com/shaarli/Shaarli/blob/master/plugins/playvideos/README.md#troubleshooting) [](.html)
|
||||||
configuration to work properly.[(.html)]((.html).html)
|
configuration to work properly.[(.html)]((.html).html)
|
||||||
|
|
||||||
|
|
|
@ -123,11 +123,12 @@
|
||||||
$conf->setEmpty('general.timezone', date_default_timezone_get());
|
$conf->setEmpty('general.timezone', date_default_timezone_get());
|
||||||
$conf->setEmpty('general.title', 'Shared links on '. escape(index_url($_SERVER)));
|
$conf->setEmpty('general.title', 'Shared links on '. escape(index_url($_SERVER)));
|
||||||
$conf->setEmpty('resource.theme', 'default');
|
$conf->setEmpty('resource.theme', 'default');
|
||||||
RainTPL::$tpl_dir = 'tpl/'.$conf->get('resource.theme').'/'; // template directory
|
RainTPL::$tpl_dir = $conf->get('resource.raintpl_tpl').'/'.$conf->get('resource.theme').'/'; // template directory
|
||||||
RainTPL::$cache_dir = $conf->get('resource.raintpl_tmp'); // cache directory
|
RainTPL::$cache_dir = $conf->get('resource.raintpl_tmp'); // cache directory
|
||||||
|
|
||||||
$pluginManager = new PluginManager($conf);
|
$pluginManager = new PluginManager($conf);
|
||||||
$pluginManager->load($conf->get('general.enabled_plugins'));
|
$pluginManager->load($conf->get('general.enabled_plugins'));
|
||||||
|
|
||||||
date_default_timezone_set($conf->get('general.timezone', 'UTC'));
|
date_default_timezone_set($conf->get('general.timezone', 'UTC'));
|
||||||
|
|
||||||
ob_start(); // Output buffering for the page cache.
|
ob_start(); // Output buffering for the page cache.
|
||||||
|
|
Loading…
Reference in a new issue