diff --git a/config/config.ini.example b/config/config.ini.example
index 67d1d9e4..734cfb6c 100644
--- a/config/config.ini.example
+++ b/config/config.ini.example
@@ -7,7 +7,8 @@ timezone = "Asia/Jakarta"
; Date format.
date.format = "d F Y"
-; Your language (example "en_US" for English or "de_DE" for German. See lang directory for available language)
+; Your language (example "en_US" for English or "de_DE" for German.
+; See lang directory for available language)
language = "en_US"
; Blog info
@@ -90,11 +91,15 @@ popular.count = "5"
; Tagcloud
tagcloud.count = "40"
+; Read more link text for "full" teaser type
+read.more = "Read more"
+
; Teaser type: set "trimmed" or "full".
teaser.type = "full"
-; Read more link text for "full" teaser type
-read.more = "Read more"
+; In summary mode, whether check the shortcode first or not before trim the content to x char
+; Options: "default" and "check"
+teaser.behave = "default"
; Teaser character count
teaser.char = "200"
@@ -108,10 +113,12 @@ rss.count = "10"
; RSS feed description length. If left empty we will use full page.
rss.char = "200"
-; Enable views Counter, the options is "true" and "false". If set to "true", you can see the Counts in Admin page and popular posts.
+; Enable views Counter, the options is "true" and "false".
+; If set to "true", you can see the Counts in Admin page and popular posts.
views.counter = "false"
-; Sitemap priorities between "0.0" and "1.0". Set "false" to disable a sitemap for the given type. (See /sitemap.xml)
+; Sitemap priorities between "0.0" and "1.0".
+; Set "false" to disable a sitemap for the given type. (See /sitemap.xml)
sitemap.priority.base = "1.0"
sitemap.priority.post = "0.5"
sitemap.priority.static = "0.5"
diff --git a/system/admin/admin.php b/system/admin/admin.php
index c03993a1..4ab43479 100644
--- a/system/admin/admin.php
+++ b/system/admin/admin.php
@@ -1009,6 +1009,13 @@ function find_draft_page($static = null)
$posts = get_draft_pages();
$tmp = array();
+
+ if (config('views.counter') == 'true') {
+ $viewsFile = "content/data/views.json";
+ if (file_exists($viewsFile)) {
+ $views = json_decode(file_get_contents($viewsFile), true);
+ }
+ }
if (!empty($posts)) {
@@ -1046,7 +1053,7 @@ function find_draft_page($static = null)
$post->body = MarkdownExtra::defaultTransform(remove_html_comments($content));
if (config('views.counter') == 'true') {
- $post->views = get_views('page_' . $post->slug, $post->file);
+ $post->views = get_views('page_' . $post->slug, $post->file, $views);
} else {
$post->views = null;
}
@@ -1070,6 +1077,13 @@ function find_draft_subpage($static = null, $sub_static = null)
$posts = get_draft_subpages($static);
$tmp = array();
+
+ if (config('views.counter') == 'true') {
+ $viewsFile = "content/data/views.json";
+ if (file_exists($viewsFile)) {
+ $views = json_decode(file_get_contents($viewsFile), true);
+ }
+ }
if (!empty($posts)) {
@@ -1116,7 +1130,7 @@ function find_draft_subpage($static = null, $sub_static = null)
$post->body = MarkdownExtra::defaultTransform(remove_html_comments($content));
if (config('views.counter') == 'true') {
- $post->views = get_views('subpage_' . $post->parentSlug .'.'. $post->slug, $post->file);
+ $post->views = get_views('subpage_' . $post->parentSlug .'.'. $post->slug, $post->file, $views);
} else {
$post->views = null;
}
diff --git a/system/admin/views/config-reading.html.php b/system/admin/views/config-reading.html.php
index f25bccbd..3fd17fa1 100644
--- a/system/admin/views/config-reading.html.php
+++ b/system/admin/views/config-reading.html.php
@@ -83,6 +83,26 @@
+
+
+
+
+
+ checked>
+
+
+
+ checked>
+
+
+
+ In summary mode, whether check the shortcode first or not before trim the content to x char
+