diff --git a/cfg/conf.sample.php b/cfg/conf.sample.php index e2ba01a..6b9295e 100644 --- a/cfg/conf.sample.php +++ b/cfg/conf.sample.php @@ -7,6 +7,10 @@ ; (optional) set a project name to be displayed on the website ; name = "PrivateBin" +; The full URL, with the domain name and directories that point to the PrivateBin files +; This URL is essential to allow Opengraph images to be displayed on social networks +; basepath = "" + ; enable or disable the discussion feature, defaults to true discussion = true diff --git a/lib/Configuration.php b/lib/Configuration.php index 89db37a..0678370 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -38,6 +38,7 @@ class Configuration private static $_defaults = array( 'main' => array( 'name' => 'PrivateBin', + 'basepath' => '', 'discussion' => true, 'opendiscussion' => false, 'password' => true, diff --git a/lib/Controller.php b/lib/Controller.php index 0c039f5..744a523 100644 --- a/lib/Controller.php +++ b/lib/Controller.php @@ -369,6 +369,7 @@ class Controller $page = new View; $page->assign('NAME', $this->_conf->getKey('name')); + $page->assign('BASEPATH', I18n::_($this->_conf->getKey('basepath'))); $page->assign('ERROR', I18n::_($this->_error)); $page->assign('STATUS', I18n::_($this->_status)); $page->assign('VERSION', self::VERSION); diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index c06372e..003c668 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -74,11 +74,11 @@ endif; - - - + + + - + @@ -86,11 +86,11 @@ endif; - + - + diff --git a/tst/ViewTest.php b/tst/ViewTest.php index 7bab166..6153052 100644 --- a/tst/ViewTest.php +++ b/tst/ViewTest.php @@ -34,6 +34,7 @@ class ViewTest extends PHPUnit_Framework_TestCase /* Setup Routine */ $page = new View; $page->assign('NAME', 'PrivateBinTest'); + $page->assign('BASEPATH', ''); $page->assign('ERROR', self::$error); $page->assign('STATUS', self::$status); $page->assign('VERSION', self::$version);