From 2ab20034dbf85ff78cd7f84cacbe427254f3cbed Mon Sep 17 00:00:00 2001 From: Danang Probo Sayekti Date: Fri, 24 Jul 2015 22:23:12 +0700 Subject: [PATCH] Cleaning up --- config/config.ini.example | 41 +++++++++------- system/admin/editor/js/image.js | 104 ++++++++++++++++++++-------------------- system/includes/functions.php | 3 +- system/resources/js/htmly.js | 3 -- 4 files changed, 76 insertions(+), 75 deletions(-) delete mode 100644 system/resources/js/htmly.js diff --git a/config/config.ini.example b/config/config.ini.example index 89a1049..d1d3bb0 100644 --- a/config/config.ini.example +++ b/config/config.ini.example @@ -1,6 +1,8 @@ -; The URL of your blog. Include the http or https. +; The URL of your blog. Include the http or https. +; If you are using Facebook or Disqus comments than use absolute URLs site.url = "" +; Your timezone timezone = "Asia/Jakarta" ; Blog info @@ -26,7 +28,7 @@ breadcrumb.home = "Home" ; Comment system. Choose "facebook", "disqus", or "disable". comment.system = "disable" -;Facebook comments +; Facebook comments fb.appid = "" fb.num = "5" fb.color = "light" @@ -51,7 +53,7 @@ google.reCaptcha.public = "" google.reCaptcha.private = "" ; Pagination, RSS, and JSON -posts.perpage = "5" +posts.perpage = "10" tag.perpage = "10" archive.perpage = "10" search.perpage = "10" @@ -59,7 +61,10 @@ profile.perpage = "10" json.count = "10" ; Related posts -related.count = "4" +related.count = "3" + +; Recent posts +recent.count = "5" ; Author info on blog post. Set "true" or "false". author.info = "true" @@ -67,33 +72,33 @@ author.info = "true" ; Teaser type: set "trimmed" or "full". teaser.type = "trimmed" -; Teaser char count +; Teaser character count teaser.char = "200" -; Description char count +; Description character count description.char = "150" -;RSS feed count +; RSS feed count rss.count = "10" -;RSS feed description length. If left empty we will use full page. -rss.char = "" +; RSS feed description length. If left empty we will use full page. +rss.char = "200" ; Enable image thumbnail on teaser, the options is "true" and "false". If set to "true", you can specify the default thumbnail also. -img.thumbnail = "true" +img.thumbnail = "false" default.thumbnail = "" -;Enable or disable jQuery, if Lightbox is "on" then this option ignored. -jquery = "disable" +; Enable view Counter, the options is "true" and "false". If set to "true", you can see the Counts in Admin page. +views.counter = "true" -; Lightbox inline image handling. This can slowdown your page load, especially when Disqus enabled. "on" or "off". -lightbox = "off" +; Also install pre-release +prerelease = false -; Set the theme here -views.root = "themes/logs" +; Switch on and off the file cache for development purposes. +cache.off = false - ;Enable view Counter, the options is "true" and "false". If set to "true", you can see the Counts in Admin page. -views.counter = "true" +; Set the theme here +views.root = "themes/blog" ; Framework config. No need to edit. views.layout = "layout" diff --git a/system/admin/editor/js/image.js b/system/admin/editor/js/image.js index 24cd56a..ddb5f2c 100644 --- a/system/admin/editor/js/image.js +++ b/system/admin/editor/js/image.js @@ -1,66 +1,66 @@ (function () { - var converter = new Markdown.Converter(); - var editor = new Markdown.Editor(converter); + var converter = new Markdown.Converter(); + var editor = new Markdown.Editor(converter); - var $dialog = $('#insertImageDialog').dialog({ - autoOpen: false, - closeOnEscape: false, - open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); } - }); + var $dialog = $('#insertImageDialog').dialog({ + autoOpen: false, + closeOnEscape: false, + open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); } + }); - var $url = $('input[type=text]', $dialog); - var $file = $('input[type=file]', $dialog); + var $url = $('input[type=text]', $dialog); + var $file = $('input[type=file]', $dialog); - editor.hooks.set('insertImageDialog', function(callback) { + editor.hooks.set('insertImageDialog', function(callback) { - var dialogClose = function() { - $url.val(''); - $file.val(''); - $dialog.dialog('close'); - }; + var dialogClose = function() { + $url.val(''); + $file.val(''); + $dialog.dialog('close'); + }; - $dialog.dialog({ - buttons : { - "Insert" : { - text: "Insert", - id: "insert", - click: function(){ - callback($url.val().length > 0 ? $url.val(): null); - dialogClose(); - } - }, - "Cancel" : { - text: "Cancel", - id: "cancel", - click: function(){ - dialogClose(); - callback(null); - } - } - } - }); + $dialog.dialog({ + buttons : { + "Insert" : { + text: "Insert", + id: "insert", + click: function(){ + callback($url.val().length > 0 ? $url.val(): null); + dialogClose(); + } + }, + "Cancel" : { + text: "Cancel", + id: "cancel", + click: function(){ + dialogClose(); + callback(null); + } + } + } + }); - var uploadComplete = function(response) { - if (response.error == '0') { - $url.val(base_path + response.path); - $("#insert").trigger('click'); - } else { - alert(response.error); - $file.val(''); - } - }; + var uploadComplete = function(response) { + if (response.error == '0') { + $url.val(base_path + response.path); + $("#insert").trigger('click'); + } else { + alert(response.error); + $file.val(''); + } + }; - $file.ajaxfileupload({ - 'action': base_path + 'upload.php', - 'onComplete': uploadComplete, - }); + $file.ajaxfileupload({ + 'action': base_path + 'upload.php', + 'onComplete': uploadComplete, + }); - $dialog.dialog('open'); + $dialog.dialog('open'); - return true; // tell the editor that we'll take care of getting the image url - }); + return true; // tell the editor that we'll take care of getting the image url + }); - editor.run(); + editor.run(); })(); \ No newline at end of file diff --git a/system/includes/functions.php b/system/includes/functions.php index a775894..ce206cd 100644 --- a/system/includes/functions.php +++ b/system/includes/functions.php @@ -1866,13 +1866,12 @@ function head_contents() $viewport = ''; $sitemap = ''; $feed = ''; - $corejs = ''; $webmasterTools = ''; if (!empty($wmt_id)) { $webmasterTools = ''; } - $output .= $charset . "\n" . $xua . "\n" . $viewport . "\n" . $generator . "\n" . $favicon . "\n" . $sitemap . "\n" . $feed . "\n" . $corejs . "\n" . $webmasterTools . "\n"; + $output .= $charset . "\n" . $xua . "\n" . $viewport . "\n" . $generator . "\n" . $favicon . "\n" . $sitemap . "\n" . $feed . "\n" . $webmasterTools . "\n"; return $output; } diff --git a/system/resources/js/htmly.js b/system/resources/js/htmly.js deleted file mode 100644 index 71aa673..0000000 --- a/system/resources/js/htmly.js +++ /dev/null @@ -1,3 +0,0 @@ -(function ($) { - -})(jQuery);