Browse Source

Cleaning up

pull/189/head
Danang Probo Sayekti 10 years ago
parent
commit
2ab20034db
4 changed files with 76 additions and 75 deletions
  1. +23
    -18
      config/config.ini.example
  2. +52
    -52
      system/admin/editor/js/image.js
  3. +1
    -2
      system/includes/functions.php
  4. +0
    -3
      system/resources/js/htmly.js

+ 23
- 18
config/config.ini.example View File

@ -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 = "" site.url = ""
; Your timezone
timezone = "Asia/Jakarta" timezone = "Asia/Jakarta"
; Blog info ; Blog info
@ -26,7 +28,7 @@ breadcrumb.home = "Home"
; Comment system. Choose "facebook", "disqus", or "disable". ; Comment system. Choose "facebook", "disqus", or "disable".
comment.system = "disable" comment.system = "disable"
;Facebook comments
; Facebook comments
fb.appid = "" fb.appid = ""
fb.num = "5" fb.num = "5"
fb.color = "light" fb.color = "light"
@ -51,7 +53,7 @@ google.reCaptcha.public = ""
google.reCaptcha.private = "" google.reCaptcha.private = ""
; Pagination, RSS, and JSON ; Pagination, RSS, and JSON
posts.perpage = "5"
posts.perpage = "10"
tag.perpage = "10" tag.perpage = "10"
archive.perpage = "10" archive.perpage = "10"
search.perpage = "10" search.perpage = "10"
@ -59,7 +61,10 @@ profile.perpage = "10"
json.count = "10" json.count = "10"
; Related posts ; Related posts
related.count = "4"
related.count = "3"
; Recent posts
recent.count = "5"
; Author info on blog post. Set "true" or "false". ; Author info on blog post. Set "true" or "false".
author.info = "true" author.info = "true"
@ -67,33 +72,33 @@ author.info = "true"
; Teaser type: set "trimmed" or "full". ; Teaser type: set "trimmed" or "full".
teaser.type = "trimmed" teaser.type = "trimmed"
; Teaser char count
; Teaser character count
teaser.char = "200" teaser.char = "200"
; Description char count
; Description character count
description.char = "150" description.char = "150"
;RSS feed count
; RSS feed count
rss.count = "10" 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. ; 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 = "" 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. ; Framework config. No need to edit.
views.layout = "layout" views.layout = "layout"

+ 52
- 52
system/admin/editor/js/image.js View File

@ -1,66 +1,66 @@
(function () { (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();
})(); })();

+ 1
- 2
system/includes/functions.php View File

@ -1866,13 +1866,12 @@ function head_contents()
$viewport = '<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />'; $viewport = '<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />';
$sitemap = '<link rel="sitemap" href="' . site_url() . 'sitemap.xml" />'; $sitemap = '<link rel="sitemap" href="' . site_url() . 'sitemap.xml" />';
$feed = '<link rel="alternate" type="application/rss+xml" title="' . blog_title() . ' Feed" href="' . site_url() . 'feed/rss" />'; $feed = '<link rel="alternate" type="application/rss+xml" title="' . blog_title() . ' Feed" href="' . site_url() . 'feed/rss" />';
$corejs = '<script src="' . site_url() . 'system/resources/htmly.js"></script>';
$webmasterTools = ''; $webmasterTools = '';
if (!empty($wmt_id)) { if (!empty($wmt_id)) {
$webmasterTools = '<meta name="google-site-verification" content="' . $wmt_id . '" />'; $webmasterTools = '<meta name="google-site-verification" content="' . $wmt_id . '" />';
} }
$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; return $output;
} }


+ 0
- 3
system/resources/js/htmly.js View File

@ -1,3 +0,0 @@
(function ($) {
})(jQuery);

Loading…
Cancel
Save