diff --git a/config/config.ini.example b/config/config.ini.example index 17bdd03..423398c 100644 --- a/config/config.ini.example +++ b/config/config.ini.example @@ -19,7 +19,14 @@ blog.menu = "" ; Breadcrumb home text. Useful when installed on subfolder. breadcrumb.home = "Home" -; Disqus +; Comment system. Choose "facebook" or "disqus". +comment.system = "facebook" + +;Facebook comments +fb.num = "5" +fb.color = "light" + +; Disqus comments disqus.shortname = "" ; Google+ publisher diff --git a/system/includes/functions.php b/system/includes/functions.php index ff58775..1e2e824 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -820,6 +820,7 @@ function copyright(){ // Disqus on post. function disqus($title=null, $url=null){ + $comment = config('comment.system'); $disqus = config('disqus.shortname'); $script = << @@ -833,13 +834,14 @@ function disqus($title=null, $url=null){ })(); EOF; - if (!empty($disqus)) { + if (!empty($disqus) && $comment == 'disqus') { return $script; } } // Disqus comment count on teaser function disqus_count(){ + $comment = config('comment.system'); $disqus = config('disqus.shortname'); $script = << @@ -851,7 +853,7 @@ function disqus_count(){ })(); EOF; - if (!empty($disqus)) { + if (!empty($disqus) && $comment == 'disqus') { return $script; } } @@ -899,11 +901,31 @@ function recent_comments(){ } EOF; - if (!empty($disqus)) { + if (!empty($disqus) && $comment == 'disqus') { return $script; } } +function facebook() { + $comment = config('comment.system'); + $script = << + + +EOF; + + if($comment == 'facebook') { + return $script; + } + +} + // Google Publisher (Google+ page). function publisher(){ $publisher = config('google.publisher'); @@ -1396,7 +1418,7 @@ function head_contents($title, $description, $canonical) { $output .= $title ."\n". $favicon ."\n". $charset ."\n". $generator ."\n". $xua ."\n". $viewport ."\n". $description ."\n". $sitemap ."\n". $canonical ."\n". $feed ."\n". $lightboxcss ."\n". $jquery ."\n". $lightbox ."\n" .$corejs ."\n"; } else { - $output .= $title ."\n". $favicon ."\n". $charset ."\n". $generator ."\n". $xua ."\n". $viewport ."\n". $description ."\n". $sitemap ."\n". $canonical ."\n". $feed ."\n"; + $output .= $title ."\n". $favicon ."\n". $charset ."\n". $generator ."\n". $xua ."\n". $viewport ."\n". $description ."\n". $sitemap ."\n". $canonical ."\n". $feed ."\n". $jquery ."\n"; } return $output; diff --git a/themes/clean/css/style.css b/themes/clean/css/style.css index c313cad..daf0bfe 100644 --- a/themes/clean/css/style.css +++ b/themes/clean/css/style.css @@ -270,8 +270,8 @@ pre code { margin-top: 10px; } -.border #disqus_thread { - padding-top: 1.2em; +.border .fb-comments, .border #disqus_thread { + padding-top: 1.2em; } #disqus_thread { diff --git a/themes/clean/layout.html.php b/themes/clean/layout.html.php index e386eac..6276036 100644 --- a/themes/clean/layout.html.php +++ b/themes/clean/layout.html.php @@ -14,6 +14,7 @@ +