From a99b71ef077fb5186f525374abfdd71a9f24648a Mon Sep 17 00:00:00 2001 From: Danang Probo Sayekti Date: Sat, 1 Aug 2015 01:32:34 +0700 Subject: [PATCH] Improve blog --- config/config.ini.example | 3 +++ system/includes/functions.php | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config/config.ini.example b/config/config.ini.example index 7bce769..3289e07 100644 --- a/config/config.ini.example +++ b/config/config.ini.example @@ -10,6 +10,9 @@ blog.tagline = "Just another HTMLy blog" blog.description = "Proudly powered by HTMLy, a databaseless blogging platform." blog.copyright = "(c) Your name." +; Show the /blog url as the blog homepage +blog.enable = "false" + ; Social account social.twitter = "https://twitter.com" social.facebook = "https://www.facebook.com" diff --git a/system/includes/functions.php b/system/includes/functions.php index 8f9e1d0..2ff626d 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -1477,12 +1477,12 @@ function generate_rss($posts) if (!empty($rssLength)) { if (strlen(strip_tags($p->body)) < config('rss.char')) { $string = preg_replace('/\s\s+/', ' ', strip_tags($p->body)); - $body = $string . '...' . ' more'; + $body = $string . '...'; } else { $string = preg_replace('/\s\s+/', ' ', strip_tags($p->body)); $string = substr($string, 0, config('rss.char')); $string = substr($string, 0, strrpos($string, ' ')); - $body = $string . '...' . ' more'; + $body = $string . '...'; } } else { $body = $p->body; @@ -1795,7 +1795,7 @@ function Zip($source, $destination, $include_dir = false) function is_index() { $req = $_SERVER['REQUEST_URI']; - if (strpos($req, '/archive/') !== false || strpos($req, '/tag/') !== false || strpos($req, '/search/') !== false || $req == site_path() . '/' || strpos($req, site_path() . '/?page') !== false) { + if (strpos($req, '/archive/') !== false || strpos($req, '/tag/') !== false || strpos($req, '/search/') !== false || strpos($req, '/blog') !== false || $req == site_path() . '/' || strpos($req, site_path() . '/?page') !== false) { return true; } else { return false;