diff --git a/bl-kernel/admin/controllers/settings-advanced.php b/bl-kernel/admin/controllers/settings-advanced.php index 8ce025c2..55bc6dd9 100644 --- a/bl-kernel/admin/controllers/settings-advanced.php +++ b/bl-kernel/admin/controllers/settings-advanced.php @@ -21,7 +21,6 @@ function setSettings($args) global $dbPages; // Add slash at the begin and end - $args['url'] = Text::addSlashes($args['url'],false,true); $args['uriPage'] = Text::addSlashes($args['uriPage']); $args['uriTag'] = Text::addSlashes($args['uriTag']); $args['uriCategory'] = Text::addSlashes($args['uriCategory']); diff --git a/bl-kernel/boot/init.php b/bl-kernel/boot/init.php index e4512155..543bc07a 100644 --- a/bl-kernel/boot/init.php +++ b/bl-kernel/boot/init.php @@ -259,6 +259,7 @@ define('THEME_DIR_LANG', THEME_DIR.'languages'.DS); // This paths are absolutes for the user / web browsing. define('DOMAIN', $Site->domain()); define('DOMAIN_BASE', DOMAIN.HTML_PATH_ROOT); +define('DOMAIN_THEME', DOMAIN.HTML_PATH_THEME); define('DOMAIN_THEME_CSS', DOMAIN.HTML_PATH_THEME_CSS); define('DOMAIN_THEME_JS', DOMAIN.HTML_PATH_THEME_JS); define('DOMAIN_THEME_IMG', DOMAIN.HTML_PATH_THEME_IMG); diff --git a/bl-kernel/dbpages.class.php b/bl-kernel/dbpages.class.php index c7d3b571..2eecc2b2 100644 --- a/bl-kernel/dbpages.class.php +++ b/bl-kernel/dbpages.class.php @@ -18,7 +18,7 @@ class dbPages extends dbJSON 'category'=> array('inFile'=>false, 'value'=>''), 'md5file'=> array('inFile'=>false, 'value'=>''), 'uuid'=> array('inFile'=>false, 'value'=>''), - 'allowComments'=> array('inFile'=>false, 'value'=>false) + 'allowComments'=> array('inFile'=>false, 'value'=>true) ); function __construct() diff --git a/bl-kernel/helpers/theme.class.php b/bl-kernel/helpers/theme.class.php index 0466ec1a..a4a264a6 100644 --- a/bl-kernel/helpers/theme.class.php +++ b/bl-kernel/helpers/theme.class.php @@ -57,7 +57,7 @@ class Theme { return ''.PHP_EOL; } - public static function css($files, $path=HTML_PATH_THEME) + public static function css($files) { if( !is_array($files) ) { $files = array($files); @@ -65,13 +65,13 @@ class Theme { $links = ''; foreach($files as $file) { - $links .= ''.PHP_EOL; + $links .= ''.PHP_EOL; } return $links; } - public static function javascript($files, $path=HTML_PATH_THEME) + public static function javascript($files) { if( !is_array($files) ) { $files = array($files); @@ -79,15 +79,15 @@ class Theme { $scripts = ''; foreach($files as $file) { - $scripts .= ''.PHP_EOL; + $scripts .= ''.PHP_EOL; } return $scripts; } - public static function js($files, $path=HTML_PATH_THEME) + public static function js($files) { - self::javascript($files, $path); + return self::javascript($files); } public static function plugins($type) @@ -116,13 +116,6 @@ class Theme { return $tmp; } - - - - - - - public static function keywords($keywords, $echo=true) { if(is_array($keywords)) { @@ -138,12 +131,6 @@ class Theme { return $tmp; } - - - - - - public static function jquery($echo=true) { $tmp = ''.PHP_EOL; diff --git a/bl-kernel/page.class.php b/bl-kernel/page.class.php index 38fa8688..a981f007 100644 --- a/bl-kernel/page.class.php +++ b/bl-kernel/page.class.php @@ -149,7 +149,7 @@ class Page { // Returns the permalink // (boolean) $absolute, TRUE returns the page link with the DOMAIN, FALSE without the DOMAIN - public function permalink($absolute=false) + public function permalink($absolute=true) { global $Url; global $Site; @@ -366,6 +366,12 @@ class Page { return $this->getField('title'); } + // Returns TRUE if the page has enabled the comments, FALSE otherwise + public function allowComments() + { + return $this->getField('allowComments'); + } + // Returns the page position public function position() { diff --git a/bl-plugins/disqus/plugin.php b/bl-plugins/disqus/plugin.php index 9caa9009..047db1f3 100644 --- a/bl-plugins/disqus/plugin.php +++ b/bl-plugins/disqus/plugin.php @@ -29,8 +29,8 @@ class pluginDisqus extends Plugin { $html = '
'; $html .= ' - '; + '; + return $html; } return false; } - public function siteHead() - { - return ''; - } - } \ No newline at end of file diff --git a/bl-themes/editorial/assets/css/bludit.css b/bl-themes/editorial/assets/css/bludit.css index 1b7fd90f..f1413d5a 100644 --- a/bl-themes/editorial/assets/css/bludit.css +++ b/bl-themes/editorial/assets/css/bludit.css @@ -52,4 +52,10 @@ div.plugin-menu span.category-name { div.plugin-menu a.page-title { padding: 0; +} + +/* Plugin Disqus +------------------------------------------------------------------------------ */ +#disqus_thread { + margin-top: 60px; } \ No newline at end of file diff --git a/bl-themes/editorial/index.php b/bl-themes/editorial/index.php index d8f23e69..636ab8cd 100644 --- a/bl-themes/editorial/index.php +++ b/bl-themes/editorial/index.php @@ -18,7 +18,9 @@