瀏覽代碼

This version is debugged, tested, ready for the production. Created light and dark default themes.

Klectik 7 年之前
父節點
當前提交
0cb5f79f22
共有 58 個文件被更改,包括 6134 次插入775 次删除
  1. 6 6
      admin/admin.php
  2. 0 1
      admin/ajax.php
  3. 6 7
      admin/bm.php
  4. 8 8
      admin/close.php
  5. 10 12
      admin/comments.php
  6. 二進制
      admin/css/images/sorbet-logo.png
  7. 8 8
      admin/feeds.php
  8. 0 1
      admin/index.php
  9. 10 11
      admin/options.php
  10. 8 9
      admin/plugins.php
  11. 4 11
      admin/scripts/jquery.js
  12. 11 11
      admin/settings.php
  13. 7 7
      admin/themes/admin/index.htm
  14. 159 164
      admin/themes/admin/install.htm
  15. 10 10
      admin/themes/admin/login.htm
  16. 5 6
      admin/themes/admin/template_bm.htm
  17. 9 11
      admin/user.php
  18. 3 4
      archive.php
  19. 1 1
      classes/comments.class.php
  20. 56 90
      classes/imgsize.php
  21. 3 4
      classes/textile.class.php
  22. 1 1
      classes/user.class.php
  23. 3 3
      classes/util.class.php
  24. 13 11
      entry.php
  25. 二進制
      images/favicon.ico
  26. 7 8
      index.php
  27. 3 3
      install.php
  28. 0 1
      login.php
  29. 1 2
      rss.php
  30. 二進制
      themes/Dreamscape/images/bg.gif
  31. 二進制
      themes/Dreamscape/images/content_bg.png
  32. 0 189
      themes/Dreamscape/index.htm
  33. 0 1
      themes/Dreamscape/style.css
  34. 11 0
      themes/SorbetDark/css/bootstrap.min.css
  35. 二進制
      themes/SorbetDark/fonts/glyphicons-halflings-regular.eot
  36. 288 0
      themes/SorbetDark/fonts/glyphicons-halflings-regular.svg
  37. 二進制
      themes/SorbetDark/fonts/glyphicons-halflings-regular.ttf
  38. 二進制
      themes/SorbetDark/fonts/glyphicons-halflings-regular.woff
  39. 二進制
      themes/SorbetDark/fonts/glyphicons-halflings-regular.woff2
  40. 195 0
      themes/SorbetDark/index.htm
  41. 2377 0
      themes/SorbetDark/js/bootstrap.js
  42. 7 0
      themes/SorbetDark/js/bootstrap.min.js
  43. 13 0
      themes/SorbetDark/js/npm.js
  44. 11 0
      themes/SorbetLight/css/bootstrap.min.css
  45. 二進制
      themes/SorbetLight/fonts/glyphicons-halflings-regular.eot
  46. 288 0
      themes/SorbetLight/fonts/glyphicons-halflings-regular.svg
  47. 二進制
      themes/SorbetLight/fonts/glyphicons-halflings-regular.ttf
  48. 二進制
      themes/SorbetLight/fonts/glyphicons-halflings-regular.woff
  49. 二進制
      themes/SorbetLight/fonts/glyphicons-halflings-regular.woff2
  50. 195 0
      themes/SorbetLight/index.htm
  51. 2377 0
      themes/SorbetLight/js/bootstrap.js
  52. 7 0
      themes/SorbetLight/js/bootstrap.min.js
  53. 13 0
      themes/SorbetLight/js/npm.js
  54. 二進制
      themes/tumblr/img/bg.gif
  55. 二進制
      themes/tumblr/img/link.gif
  56. 二進制
      themes/tumblr/img/rss.gif
  57. 0 173
      themes/tumblr/index.htm
  58. 0 1
      themes/tumblr/style.css

+ 6 - 6
admin/admin.php 查看文件

@@ -15,13 +15,13 @@ global $user, $conf, $tumble;
15 15
 
16 16
 if ($user->isAdmin()) {
17 17
     ?>
18
-	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
19
-	<html xmlns="http://www.w3.org/1999/xhtml">
18
+	<!DOCTYPE html>
19
+	<html>
20 20
 	<head>
21
-		<title>sorbet :: <?php echo __("admin users")?></title>
22
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
21
+		<title><?= __("admin users")?> - Sorbet CMS</title>
22
+		<meta charset="utf-8" />
23 23
 		<?php $util_class = new util(); ?>
24
-		<meta name="generator" content="sorbet cms <?php echo $util_class->version(); ?>" />
24
+		<meta name="generator" content="Sorbet CMS <?= $util_class->version(); ?>" />
25 25
 		<link rel="shortcut icon" href="<?php echo $conf->urlSorbet; ?>/images/favicon.ico" />
26 26
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/jquery.js"></script>
27 27
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/tools.js"></script>
@@ -140,7 +140,7 @@ if ($user->isAdmin()) {
140 140
 				</div>
141 141
 			</div>
142 142
 			<div id="foot">
143
-				Sorbet CMS :: PHP Tumblelog Content Management System.
143
+				Sorbet CMS - PHP Tumblelog Content Management System.
144 144
 			</div>
145 145
 		</div>
146 146
 	</body>

+ 0 - 1
admin/ajax.php 查看文件

@@ -37,4 +37,3 @@ if (!defined('entry')) {
37 37
             }    // $_GET["action"] == "verify"
38 38
         }    // $_GET["action"]
39 39
     }    // $user->isAdmin()
40
-?>

+ 6 - 7
admin/bm.php 查看文件

@@ -90,12 +90,12 @@ if ($user->isAdmin()) {
90 90
         } else {
91 91
             die(__("Must be a valid URL"));
92 92
         } ?>
93
-	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
94
-	<html xmlns="http://www.w3.org/1999/xhtml">
93
+	<!DOCTYPE html>
94
+	<html>
95 95
 	<head>
96
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
97
-		<meta name="generator" content="sorbet cms <?php echo $util_class->version(); ?>" />
98
-		<title>sorbet :: <?php echo __("bookmarklet")?></title>
96
+		<meta charset="utf-8" />
97
+		<meta name="generator" content="Sorbet CMS <?= $util_class->version(); ?>" />
98
+		<title><?= __("bookmarklet")?> - Sorbet CMS</title>
99 99
 		<link rel="shortcut icon" href="<?php echo $conf->urlSorbet; ?>/images/favicon.ico" />
100 100
         <script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/jquery.js"></script>
101 101
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/tools.js"></script>
@@ -221,7 +221,7 @@ if ($user->isAdmin()) {
221 221
 
222 222
     } ?>
223 223
 			<div id="foot">
224
-				Sorbet CMS :: PHP Tumblelog Content Management System.
224
+				Sorbet CMS - PHP Tumblelog Content Management System.
225 225
 			</div>
226 226
 		</div>
227 227
 	</body>
@@ -232,4 +232,3 @@ if ($user->isAdmin()) {
232 232
     $target = (isset($_GET["url"]))? "/login.php?redirect_url=".$_GET["url"]."&sel=".$_GET["sel"] : "/login.php";
233 233
     header("Location: ".$conf->urlSorbet.$target);
234 234
 }
235
-?>

+ 8 - 8
admin/close.php 查看文件

@@ -12,16 +12,16 @@ if (!defined('entry')) {
12 12
 ?>
13 13
 <?php
14 14
 require '../entry.php';
15
-global $user;
15
+global $user, $util;
16 16
 $closed = $user->closeSession();
17 17
 
18 18
 ?>
19
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
20
-	<html xmlns="http://www.w3.org/1999/xhtml">
19
+<!DOCTYPE html>
20
+	<html>
21 21
 	<head>
22
-		<title>sorbet :: <?php echo __("logout")?></title>
23
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
24
-		<meta name="generator" content="sorbet cms <?php echo util::version();?>" />
22
+		<title><?= __("logout")?> - Sorbet CMS</title>
23
+		<meta charset="utf-8" />
24
+		<meta name="generator" content="Sorbet CMS <?= $util->version();?>" />
25 25
 		<meta http-equiv="Refresh" content="3;URL=../login.php" />
26 26
 		<link rel="shortcut icon" href="<?php echo $conf->urlSorbet;?>/images/favicon.ico" />
27 27
 		<style type="text/css" media="screen">
@@ -31,7 +31,7 @@ $closed = $user->closeSession();
31 31
 <body>
32 32
 <div id="cont">
33 33
 			<div id="head">
34
-				<h1><a href="<?php echo $conf->urlSorbet;?>/" title="sorbet :: <?php echo __("home")?>">sorbet cms</a></h1>
34
+				<h1><a href="<?php echo $conf->urlSorbet;?>/" title="<?= __("home")?> - Sorbet CMS">Sorbet CMS</a></h1>
35 35
 				<ul id="nav">
36 36
 					<li><a href="<?php echo $conf->urlSorbet;?>/" title="<?php echo __("Take me to the tumblelog")?>"><?php echo __("Back to the Tumblelog")?></a></li>
37 37
 			  	</ul>
@@ -66,7 +66,7 @@ $closed = $user->closeSession();
66 66
 				</div>
67 67
 			</div>
68 68
 			<div id="foot">
69
-				Sorbet CMS :: PHP Tumblelog Content Management System.
69
+				Sorbet CMS - PHP Tumblelog Content Management System.
70 70
 			</div>
71 71
 		</div>
72 72
 </body>

+ 10 - 12
admin/comments.php 查看文件

@@ -9,10 +9,9 @@ if (!defined('entry')) {
9 9
   Sorbet CMS is a free software licensed under the GPL 3.0
10 10
 
11 11
   =========================== */
12
-?>
13
-<?php
12
+
14 13
 require_once '../entry.php';
15
-global $user, $conf, $tumble;
14
+global $user, $conf, $tumble, $util;
16 15
 
17 16
 $comment = new comments();
18 17
 $template = new plantillas("admin");
@@ -26,7 +25,7 @@ if (isset($_POST["btnAdd"])) {
26 25
     $_POST["username"] = strip_tags($_POST["username"]);
27 26
     $_POST["email"] =  strip_tags($_POST["email"]);
28 27
     $_POST["web"] = strip_tags($_POST["web"]);
29
-    $_POST["content"] = util::removeBadTags($_POST["content"], true);
28
+    $_POST["content"] = $util->removeBadTags($_POST["content"], true);
30 29
 
31 30
     if (isset($_POST["id_comment"])) {
32 31
         if ($isAdmin) {
@@ -64,12 +63,12 @@ if ($isAdmin) {
64 63
             die();
65 64
         }
66 65
     } ?>
67
-	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
68
-	<html xmlns="http://www.w3.org/1999/xhtml">
66
+	<!DOCTYPE html>
67
+	<html>
69 68
 	<head>
70
-		<title>sorbet :: <?php echo __("comments")?></title>
71
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
72
-		<meta name="generator" content="sorbet cms <?php echo util::version(); ?>" />
69
+		<title><?php echo __("comments")?> - Sorbet CMS</title>
70
+		<meta charset="utf-8" />
71
+		<meta name="generator" content="Sorbet CMS <?= $util->version(); ?>" />
73 72
 		<link rel="shortcut icon" href="<?php echo $conf->urlSorbet; ?>/images/favicon.ico" />
74 73
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/jquery.js"></script>
75 74
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/tools.js"></script>
@@ -89,7 +88,7 @@ if ($isAdmin) {
89 88
 		<div id="div-process" style="display:none;"><?=__("Processing request&hellip;"); ?></div>
90 89
 		<div id="cont">
91 90
 			<div id="head">
92
-				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="sorbet :: <?=__("home")?>">sorbet cms</a></h1>
91
+				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="<?=__("home")?> - Sorbet CMS">Sorbet CMS</a></h1>
93 92
 				<ul id="nav">
94 93
 					<li><a href="<?php echo $conf->urlSorbet; ?>/" title="<?=__("Take me to the tumblelog")?>"><?=__("Back to the Tumblelog")?></a></li>
95 94
 			  	</ul>
@@ -184,7 +183,7 @@ if ($isAdmin) {
184 183
 				</div>
185 184
 			</div>
186 185
 			<div id="foot">
187
-				Sorbet CMS :: PHP Tumblelog Content Management System.
186
+				Sorbet CMS - PHP Tumblelog Content Management System.
188 187
 			</div>
189 188
 		</div>
190 189
 	</body>
@@ -194,4 +193,3 @@ if ($isAdmin) {
194 193
 } else {
195 194
     header("Location: ".$conf->urlSorbet."/login.php");
196 195
 }
197
-?>

二進制
admin/css/images/sorbet-logo.png 查看文件


+ 8 - 8
admin/feeds.php 查看文件

@@ -12,7 +12,7 @@ if (!defined('entry')) {
12 12
 ?>
13 13
 <?php
14 14
 require('../entry.php');
15
-global $user, $conf, $tumble;
15
+global $user, $conf, $tumble; $util;
16 16
 
17 17
 if ($user->isAdmin()) {
18 18
     $message = '';
@@ -31,12 +31,12 @@ if ($user->isAdmin()) {
31 31
             $messageStatus = 'error';
32 32
         }
33 33
     } ?>
34
-	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
35
-	<html xmlns="http://www.w3.org/1999/xhtml">
34
+	<!DOCTYPE html>
35
+	<html>
36 36
 	<head>
37
-		<title>sorbet :: <?php echo __("Feeds")?></title>
38
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
39
-		<meta name="generator" content="sorbet cms <?php echo util::version(); ?>" />
37
+		<title><?php echo __("Feeds")?> - Sorbet CMS</title>
38
+		<meta charset="utf-8" />
39
+		<meta name="generator" content="Sorbet CMS <?= $util->version(); ?>" />
40 40
 		<link rel="shortcut icon" href="<?php echo $conf->urlSorbet; ?>/images/favicon.ico" />
41 41
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/jquery.js"></script>
42 42
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/tools.js"></script>
@@ -71,7 +71,7 @@ if ($user->isAdmin()) {
71 71
 	<body>
72 72
 		<div id="cont">
73 73
 			<div id="head">
74
-				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="sorbet :: <?php echo __("home")?>">sorbet cms</a></h1>
74
+				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="<?php echo __("home")?> - Sorbet CMS">Sorbet CMS</a></h1>
75 75
 				<ul id="nav">
76 76
 					<li><a href="<?php echo $conf->urlSorbet; ?>/" title="<?php echo __("Take me to the tumblelog")?>"><?php echo __("Back to the Tumblelog")?></a></li>
77 77
 			  	</ul>
@@ -142,7 +142,7 @@ if ($user->isAdmin()) {
142 142
 				</div>
143 143
 			</div>
144 144
 			<div id="foot">
145
-				Sorbet CMS :: PHP Tumblelog Content Management System.
145
+				Sorbet CMS - PHP Tumblelog Content Management System.
146 146
 			</div>
147 147
 		</div>
148 148
 	</body>

+ 0 - 1
admin/index.php 查看文件

@@ -320,4 +320,3 @@ if ($user->isAuthenticated()) {
320 320
 } else {
321 321
     header("Location: ".$conf->urlSorbet."/login.php");
322 322
 }
323
-?>

+ 10 - 11
admin/options.php 查看文件

@@ -9,10 +9,9 @@ if (!defined('entry')) {
9 9
   Sorbet CMS is a free software licensed under the GPL 3.0
10 10
 
11 11
   =========================== */
12
-?>
13
-<?php
12
+
14 13
 require_once '../entry.php';
15
-global $user, $conf, $tumble;
14
+global $user, $conf, $tumble, $util;
16 15
 
17 16
 if ($user->isAdmin()) {
18 17
     if (isset($_POST["btnsubmit"])) {
@@ -25,7 +24,7 @@ if ($user->isAdmin()) {
25 24
             die();
26 25
         }
27 26
 
28
-        $off_r= split(",", $_POST['time_offsets']);
27
+        $off_r= explode(",", $_POST['time_offsets']);
29 28
         $_POST['offset_time'] = $off_r[0];
30 29
         $_POST['offset_city'] = $off_r[1];
31 30
         unset($_POST['time_offsets']);
@@ -62,12 +61,12 @@ if ($user->isAdmin()) {
62 61
         die();
63 62
     } else {
64 63
         ?>
65
-	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
66
-	<html xmlns="http://www.w3.org/1999/xhtml">
64
+	<!DOCTYPE html>
65
+	<html>
67 66
 	<head>
68
-		<title>sorbet :: <?php echo __("options")?></title>
69
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
70
-		<meta name="generator" content="sorbet cms <?php echo util::version(); ?>" />
67
+		<title><?php echo __("options")?> - Sorbet CMS</title>
68
+		<meta charset="utf-8" />
69
+		<meta name="generator" content="Sorbet CMS <?= $util->version(); ?>" />
71 70
 		<link rel="shortcut icon" href="<?php echo $conf->urlSorbet; ?>/images/favicon.ico" />
72 71
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/jquery.js"></script>
73 72
 		<script type="text/javascript">
@@ -86,7 +85,7 @@ if ($user->isAdmin()) {
86 85
 		<div id="div-process" style="display:none;"><?php echo __("Processing request&hellip;")?></div>
87 86
 		<div id="cont">
88 87
 			<div id="head">
89
-				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="sorbet :: <?php echo __("home")?>">sorbet cms</a></h1>
88
+				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="<?php echo __("home")?> - Sorbet CMS">Sorbet CMS</a></h1>
90 89
 				<ul id="nav">
91 90
 					<li><a href="<?php echo $conf->urlSorbet; ?>/" title="<?php echo __("Take me to the tumblelog")?>"><?php echo __("Back to the Tumblelog")?></a></li>
92 91
 			  	</ul>
@@ -289,7 +288,7 @@ if ($user->isAdmin()) {
289 288
 				</div>
290 289
 			</div>
291 290
 			<div id="foot">
292
-				Sorbet CMS :: PHP Tumblelog Content Management System.
291
+				Sorbet CMS - PHP Tumblelog Content Management System.
293 292
 			</div>
294 293
 		</div>
295 294
 	</body>

+ 8 - 9
admin/plugins.php 查看文件

@@ -12,7 +12,7 @@ if (!defined('entry')) {
12 12
 ?>
13 13
 <?php
14 14
 require_once '../entry.php';
15
-global $user, $conf, $tumble;
15
+global $user, $conf, $tumble, $util;
16 16
 
17 17
 
18 18
 if ($user->isAdmin()) {
@@ -47,12 +47,12 @@ if ($user->isAdmin()) {
47 47
         die();
48 48
     } else {
49 49
         ?>
50
-	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
51
-	<html xmlns="http://www.w3.org/1999/xhtml">
50
+	<!DOCTYPE html>
51
+	<html>
52 52
 	<head>
53
-		<title>sorbet :: <?php echo __("Plugins")?></title>
54
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
-		<meta name="generator" content="sorbet cms <?php echo util::version(); ?>" />
53
+		<title><?php echo __("Plugins")?> - Sorbet CMS</title>
54
+		<meta charset="utf-8" />
55
+		<meta name="generator" content="Sorbet CMS <?= $util->version(); ?>" />
56 56
 		<link rel="shortcut icon" href="<?php echo $conf->urlSorbet; ?>/images/favicon.ico" />
57 57
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/jquery.js"></script>
58 58
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/tools.js"></script>
@@ -72,7 +72,7 @@ if ($user->isAdmin()) {
72 72
 		<div id="div-process" style="display:none;"><?php echo __("Processing request&hellip;")?></div>
73 73
 		<div id="cont">
74 74
 			<div id="head">
75
-				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="sorbet :: <?php echo __("home")?>">sorbet cms</a></h1>
75
+				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="<?php echo __("home")?> - Sorbet CMS">Sorbet CMS</a></h1>
76 76
 				<ul id="nav">
77 77
 					<li><a href="<?php echo $conf->urlSorbet; ?>/" title="<?php echo __("Take me to the tumblelog")?>"><?php echo __("Back to the Tumblelog")?></a></li>
78 78
 			  	</ul>
@@ -158,7 +158,7 @@ if ($user->isAdmin()) {
158 158
 				</div>
159 159
 			</div>
160 160
 			<div id="foot">
161
-				Sorbet CMS :: PHP Tumblelog Content Management System.
161
+				Sorbet CMS - PHP Tumblelog Content Management System.
162 162
 			</div>
163 163
 		</div>
164 164
 	</body>
@@ -169,4 +169,3 @@ if ($user->isAdmin()) {
169 169
 } else {
170 170
     header("Location: ".$conf->urlSorbet."/login.php");
171 171
 }
172
-?>

文件差異過大導致無法顯示
+ 4 - 11
admin/scripts/jquery.js


+ 11 - 11
admin/settings.php 查看文件

@@ -11,21 +11,21 @@ if (!defined('entry')) {
11 11
   =========================== */
12 12
 
13 13
 require_once '../entry.php';
14
-global $user, $conf, $tumble;
14
+global $user, $conf, $tumble, $util;
15 15
 
16 16
 if ($user->isAdmin()) {
17 17
     if (isset($_POST["btnsubmit"])) {
18 18
         unset($_POST["btnsubmit"]);
19
-        $_POST["url_installation"] = (util::endsWith($_POST["url_installation"], "/")) ? substr($_POST["url_installation"], 0, strlen($_POST["url_installation"])-1) : $_POST["url_installation"] ;
19
+        $_POST["url_installation"] = ($util->endsWith($_POST["url_installation"], "/")) ? substr($_POST["url_installation"], 0, strlen($_POST["url_installation"])-1) : $_POST["url_installation"] ;
20 20
         $tumble->saveSettings($_POST);
21 21
     } else {
22 22
         ?>
23
-	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
24
-	<html xmlns="http://www.w3.org/1999/xhtml">
23
+	<!DOCTYPE html>
24
+	<html>
25 25
 	<head>
26
-		<title>sorbet :: <?php echo __("settings")?></title>
27
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
28
-		<meta name="generator" content="sorbet cms <?php echo util::version(); ?>" />
26
+		<title><?php echo __("settings")?> - Sorbet CMS</title>
27
+		<meta charset="utf-8" />
28
+		<meta name="generator" content="Sorbet CMS <?= $util->version(); ?>" />
29 29
 		<link rel="shortcut icon" href="<?php echo $conf->urlSorbet; ?>/images/favicon.ico" />
30 30
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/jquery.js"></script>
31 31
 		<script type="text/javascript">
@@ -44,7 +44,7 @@ if ($user->isAdmin()) {
44 44
 		<div id="div-process" style="display:none;"><?php echo __("Processing request&hellip;")?></div>
45 45
 		<div id="cont">
46 46
 			<div id="head">
47
-				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="sorbet :: <?php echo __("home")?>">sorbet cms</a></h1>
47
+				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="<?php echo __("home")?> - Sorbet CMS">Sorbet CMS</a></h1>
48 48
 				<ul id="nav">
49 49
 					<li><a href="<?php echo $conf->urlSorbet; ?>/" title="<?php echo __("Take me to the tumblelog")?>"><?php echo __("Back to the Tumblelog")?></a></li>
50 50
 			  	</ul>
@@ -87,7 +87,7 @@ if ($user->isAdmin()) {
87 87
 									<li><label for="lang"><?php echo __("Language:")?></label>
88 88
 										<select id="lang" name="lang">
89 89
 <?php
90
-                                        $langs = util::getLangs();
90
+                                        $langs = $util->getLangs();
91 91
         foreach ($langs as $key=>$lang) {
92 92
             $active = ($conf->lang==$key) ? "selected" : "";
93 93
             echo "<option value=\"".$key."\" ".$active.">".$lang."</option>\n";
@@ -97,7 +97,7 @@ if ($user->isAdmin()) {
97 97
 									<li><label for="template"><?php echo __("Template:")?></label>
98 98
 										<select id="template" name="template">
99 99
 <?php
100
-                                        $themes = util::getThemes();
100
+                                        $themes = $util->getThemes();
101 101
         foreach ($themes as $theme) {
102 102
             $active = ($conf->template==$theme) ? "selected" : "";
103 103
             echo "<option value=\"".$theme."\" ".$active.">".$theme."</option>\n";
@@ -119,7 +119,7 @@ if ($user->isAdmin()) {
119 119
 				</div>
120 120
 			</div>
121 121
 			<div id="foot">
122
-				Sorbet CMS :: PHP Tumblelog Content Management System.
122
+				Sorbet CMS - PHP Tumblelog Content Management System.
123 123
 			</div>
124 124
 		</div>
125 125
 	</body>

+ 7 - 7
admin/themes/admin/index.htm 查看文件

@@ -1,9 +1,9 @@
1
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
-<html xmlns="http://www.w3.org/1999/xhtml">
1
+<!DOCTYPE html>
2
+<html>
3 3
 	<head>
4
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
-		<meta name="generator" content="sorbet cms {version}" />
6
-		<title>sorbet :: {__("control panel")}</title>
4
+		<meta charset="utf-8" />
5
+		<meta name="generator" content="Sorbet CMS {version}" />
6
+		<title>{__("control panel")} - Sorbet CMS</title>
7 7
 		<link rel="shortcut icon" href="{conf.urlSorbet}/images/favicon.ico" />
8 8
 		<script language="javascript" type="text/javascript" src="{conf.urlSorbet}/admin/scripts/jquery.js"></script>
9 9
 		<script language="javascript" type="text/javascript" src="{conf.urlSorbet}/admin/scripts/tools.js"></script>
@@ -45,7 +45,7 @@
45 45
 		<div id="div-process" style="display:none;">{__("Processing request&hellip;")}</div>
46 46
 		<div id="cont">
47 47
 			<div id="head">
48
-				<h1><a href="{conf.urlSorbet}/admin/index.php" title="sorbet :: {__("home")}">sorbet cms</a></h1>
48
+				<h1><a href="{conf.urlSorbet}/admin/index.php" title="{__("home")} - Sorbet CMS">Sorbet CMS</a></h1>
49 49
 				<ul id="nav">
50 50
 					<li><a href="{conf.urlSorbet}/" title="{__("Take me to the tumblelog")}">{__("View Tumblelog")}</a></li>
51 51
 					<li><a href="close.php" title="Log off" >{__("Log out")}</a></li>
@@ -150,7 +150,7 @@
150 150
 				</div>
151 151
 			</div>
152 152
 			<div id="foot">
153
-				Sorbet CMS :: {__("PHP Tumblelog Content Management System.')}
153
+				Sorbet CMS - {__("PHP Tumblelog Content Management System.')}
154 154
 			</div>
155 155
 		</div>
156 156
 	</body>

+ 159 - 164
admin/themes/admin/install.htm 查看文件

@@ -1,169 +1,164 @@
1
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
-<html xmlns="http://www.w3.org/1999/xhtml">
3
-<head>
4
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
-	<meta name="generator" content="sorbet cms {version}" />
6
-	<title>sorbet :: installation</title>
7
-	<link rel="shortcut icon" href="images/favicon.ico" />
8
-	<style type="text/css" media="screen">
9
-		@import "admin/css/style.css";
10
-	</style>
11
-</head>
12
-<body>
13
-<div id="cont">
14
-	<div id="head">
15
-		<h1><a href="index.php" title="sorbet :: home">sorbet cms</a></h1>
16
-	</div>
17
-
18
-	<div id="main">
19
-	{if $showForm}
20
-		<div class="box">
21
-			<ul class="menu manage">
22
-			<h3>sorbet :: installation</h3>
23
-
24
-			<li class="selected"><a>Install</a></li>
25
-			</ul>
26
-
27
-			<div class="tabla">
28
-				<form action="install.php" method="post" id="config_form" autocomplete="off" class="newpost">
29
-					<fieldset class="install">
30
-						<legend class="install">Database Settings</legend>
31
-						{error.6}
32
-						<ul>
33
-							<li><label for="login">User:</label>
34
-								<input type="text" name="db_login" id="db_login" value="{db_login}" class="txt"/>{error.10}</li>
35
-							<li><label for="password">Password:</label>
36
-								<input type="password" name="db_password" id="db_password" value="" class="txt"/></li>
37
-							<li><label for="password2">Re-type password:</label>
38
-								<input type="password" name="db_password2" id="db_password2" value="" class="txt"/>{error.9}</li>
39
-							<li><label for="email">Database Host:</label>
40
-								<input type="text" name="db_host" id="db_host" value="{db_host}" class="txt"/>{error.7}</li>
41
-							<li><label for="email">Database Name:</label>
42
-								<input type="text" name="db_name" id="db_name" value="{db_name}" class="txt"/>{error.8}</li>
43
-						</ul>
44
-					</fieldset><br  />
45
-					<fieldset class="install">
46
-						<legend class="install">Admin user</legend>
47
-						<ul>
48
-							<li><label for="login">User:</label>
49
-								<input type="text" name="login" id="login" value="{login}" class="txt"/>{error.1}</li>
50
-							<li><label for="password">Password:</label>
51
-								<input type="password" name="password" id="password" value="" class="txt"/>{error.2}</li>
52
-							<li><label for="password2">Re-type password:</label>
53
-								<input type="password" name="password2" id="password2" value="" class="txt"/>{error.3}</li>
54
-							<li><label for="email">E-mail:</label>
55
-								<input type="text" name="email" id="email" value="{email}" class="txt"/>{error.4}</li>
56
-						</ul>
57
-					</fieldset><br  />
58
-					<fieldset class="install">
59
-						<legend class="install">Tumblelog configuration</legend>
60
-						<ul>
61
-							<li><label for="title">Title:</label>
62
-								<input type="text" name="title" id="title" value="{title}" class="txt"/></li>
63
-							<li><label for="description">Description:</label>
64
-								<input type="text" name="description" id="description" value="{description}" class="txt"/></li>
65
-							<li><label for="url_installation">Installation URL</label>
66
-								<input type="text" name="url_installation" id="url_installation" value="{url_installation}" class="txt"/>{error.5}</li>
67
-							<li><label for="posts_limit">Post limit:</label>
68
-								<input type="text" name="posts_limit" id="posts_limit" value="10" class="txt"/></li>
69
-							<li><label for="lang">Language:</label>
70
-								<select id="lang" name="lang">
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<meta charset="utf-8" />
5
+		<meta name="generator" content="Sorbet CMS {version}" />
6
+		<title>Installation - Sorbet CMS</title>
7
+		<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico" />
8
+		<link rel="stylesheet" type="text/css" media="screen" href="admin/css/style.css" />
9
+	</head>
10
+	<body>
11
+		<div id="cont">
12
+			<div id="head">
13
+				<h1><a href="index.php" title="Home - Sorbet CMS">Sorbet CMS</a></h1>
14
+			</div>
15
+			<div id="main">
16
+				{if $showForm}
17
+				<div class="box">
18
+					<ul class="menu manage">
19
+						<h3>Installation - Sorbet CMS</h3>
20
+						<li class="selected"><a>Install</a></li>
21
+					</ul>
22
+					<div class="tabla">
23
+						<form action="install.php" method="post" id="config_form" autocomplete="off" class="newpost">
24
+							<fieldset class="install">
25
+								<legend class="install">Database Settings</legend>
26
+								{error.6}
27
+								<ul>
28
+									<li><label for="login">User :</label>
29
+									<input type="text" name="db_login" id="db_login" value="{db_login}" class="txt"/>{error.10}</li>
30
+									<li><label for="password">Password :</label>
31
+									<input type="password" name="db_password" id="db_password" value="" class="txt"/></li>
32
+									<li><label for="password2">Re-type password :</label>
33
+									<input type="password" name="db_password2" id="db_password2" value="" class="txt"/>{error.9}</li>
34
+									<li><label for="email">Database Host :</label>
35
+									<input type="text" name="db_host" id="db_host" value="{db_host}" class="txt"/>{error.7}</li>
36
+									<li><label for="email">Database Name :</label>
37
+									<input type="text" name="db_name" id="db_name" value="{db_name}" class="txt"/>{error.8}</li>
38
+								</ul>
39
+							</fieldset><br />
40
+							<fieldset class="install">
41
+								<legend class="install">Admin user</legend>
42
+								<ul>
43
+									<li><label for="login">User :</label>
44
+									<input type="text" name="login" id="login" value="{login}" class="txt"/>{error.1}</li>
45
+									<li><label for="password">Password :</label>
46
+									<input type="password" name="password" id="password" value="" class="txt"/>{error.2}</li>
47
+									<li><label for="password2">Re-type password :</label>
48
+									<input type="password" name="password2" id="password2" value="" class="txt"/>{error.3}</li>
49
+									<li><label for="email">E-mail :</label>
50
+									<input type="text" name="email" id="email" value="{email}" class="txt"/>{error.4}</li>
51
+								</ul>
52
+							</fieldset><br  />
53
+							<fieldset class="install">
54
+								<legend class="install">Tumblelog configuration</legend>
55
+								<ul>
56
+									<li><label for="title">Title :</label>
57
+									<input type="text" name="title" id="title" value="{title}" class="txt"/></li>
58
+									<li><label for="description">Description :</label>
59
+									<input type="text" name="description" id="description" value="{description}" class="txt"/></li>
60
+									<li><label for="url_installation">Installation URL</label>
61
+									<input type="text" name="url_installation" id="url_installation" value="{url_installation}" class="txt"/>{error.5}</li>
62
+									<li><label for="posts_limit">Post limit :</label>
63
+									<input type="text" name="posts_limit" id="posts_limit" value="10" class="txt"/></li>
64
+									<li><label for="lang">Language :</label>
65
+									<select id="lang" name="lang">
71 66
 									<option value="en" selected="selected">english</option>
72
-								</select>
73
-							</li>
74
-							<li><label for="template">Template:</label>
75
-								<select id="template" name="template">
76
-									{block $themes as $theme}
67
+									</select>
68
+									</li>
69
+									<li><label for="template">Template :</label>
70
+									<select id="template" name="template">
71
+										{block $themes as $theme}
77 72
 										<option value="{$theme}">{$theme}</option>
78
-									{/block}
79
-								</select>
80
-							<li>
81
-							<li><label for="time_offsets">Time Offset:</label>
82
-								<select id="time_offsets" name="time_offsets">
83
-									<option value="-12,Pacific/Kwajalein">(GMT -12:00) International Date Line West</option>
84
-									<option value="-11,Pacific/Samoa">(GMT -11:00) Midway Island, Samoa</option>
85
-									<option value="-10,Pacific/Honolulu">(GMT -10:00) Hawaii</option>
86
-									<option value="-9,US/Alaska">(GMT -9:00) Alaska</option>
87
-									<option value="-8,US/Pacific">(GMT -8:00) Pacific Time (US &amp; Canada); Tijuana</option>
88
-									<option value="-7,US/Mountain">(GMT -7:00) Mountain Time (US &amp; Canada)</option>
89
-									<option value="-7,US/Arizona">(GMT -7:00) Arizona</option>
90
-									<option value="-7,Mexico/BajaNorte">(GMT -7:00) Chihuahua, La Paz, Mazatlan</option>
91
-									<option value="-6,US/Central">(GMT -6:00) Central Time (US &amp; Canada)</option>
92
-									<option value="-6,America/Costa_Rica">(GMT -6:00) Central America</option>
93
-									<option value="-6,Mexico/General" selected="selected">(GMT -6:00) Guadalajara, Mexico City, Monterrey</option>
94
-									<option value="-6,Canada/Saskatchewan">(GMT -6:00) Saskatchewan</option>
95
-									<option value="-5,US/Eastern">(GMT -5:00) Eastern Time (US &amp; Canada)</option>
96
-									<option value="-5,America/Bogota">(GMT -5:00) Bogota, Lima, Quito</option>
97
-									<option value="-5,US/East-Indiana">(GMT -5:00) Indiana (East)</option>
98
-									<option value="-4,Canada/Eastern">(GMT -4:00) Atlantic Time (Canada)</option>
99
-									<option value="-4,America/Caracas">(GMT -4:00) Caracas, La Paz</option>
100
-									<option value="-4,America/Santiago">(GMT -4:00) Santiago</option>
101
-									<option value="-3.50,Canada/Newfoundland">(GMT -3:30) Newfoundland</option>
102
-									<option value="-3,Canada/Atlantic">(GMT -3:00) Brasilia, Greenland</option>
103
-									<option value="-3,America/Buenos_Aires">(GMT -3:00) Buenos Aires, Georgetown</option>
104
-									<option value="-2,Atlantic/Central">(GMT -2:00) Atlantic Central</option>
105
-									<option value="-1,Atlantic/Cape_Verde">(GMT -1:00) Cape Verde Is.</option>
106
-									<option value="-1,Atlantic/Azores">(GMT -1:00) Azores</option>
107
-									<option value="0,Africa/Casablanca">(GMT) Casablanca, Monrovia</option>
108
-									<option value="0,Europe/Dublin">(GMT) Greenwich Mean Time : Dublin, Edinburgh, London</option>
109
-									<option value="1,Europe/Amsterdam">(GMT +1:00) Amsterdam, Berlin, Rome, Stockholm, Vienna</option>
110
-									<option value="1,Europe/Prague">(GMT +1:00) Belgrade, Bratislava, Budapest, Prague</option>
111
-									<option value="1,Europe/Paris">(GMT +1:00) Brussels, Copenhagen, Madrid, Paris</option>
112
-									<option value="1,Europe/Warsaw">(GMT +1:00) Sarajevo, Skopje, Warsaw, Zagreb</option>
113
-									<option value="1,Africa/Bangui">(GMT +1:00) West Central Africa</option>
114
-									<option value="2,Europe/Istanbul">(GMT +2:00) Athens, Beirut, Bucharest, Cairo, Istanbul	</option>
115
-									<option value="2,Asia/Jerusalem">(GMT +2:00) Harare, Jerusalem, Pretoria</option>
116
-									<option value="2,Europe/Kiev">(GMT +2:00) Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius</option>
117
-									<option value="3,Asia/Riyadh">(GMT +3:00) Kuwait, Nairobi, Riyadh</option>
118
-									<option value="3,Europe/Moscow">(GMT +3:00) Baghdad, Moscow, St. Petersburg, Volgograd</option>
119
-									<option value="3.50,Asia/Tehran">(GMT +3:30) Tehran</option>
120
-									<option value="4,Asia/Muscat">(GMT +4:00) Abu Dhabi, Muscat</option>
121
-									<option value="4,Asia/Baku">(GMT +4:00) Baku, Tbilsi, Yerevan</option>
122
-									<option value="4.50,Asia/Kabul">(GMT +4:30) Kabul</option>
123
-									<option value="5,Asia/Yekaterinburg">(GMT +5:00) Yekaterinburg</option>
124
-									<option value="5,Asia/Karachi">(GMT +5:00) Islamabad, Karachi, Tashkent</option>
125
-									<option value="5.50,Asia/Calcutta">(GMT +5:30) Chennai, Calcutta, Mumbai, New Delhi</option>
126
-									<option value="5.75,Asia/Katmandu">(GMT +5:45) Katmandu</option>
127
-									<option value="6,Asia/Almaty">(GMT +6:00) Almaty, Novosibirsk</option>
128
-									<option value="6,Asia/Dhaka">(GMT +6:00) Astana, Dhaka, Sri Jayawardenepura</option>
129
-									<option value="6.50,Asia/Rangoon">(GMT +6:30) Rangoon</option>
130
-									<option value="7,Asia/Bangkok">(GMT +7:00) Bangkok, Hanoi, Jakarta</option>
131
-									<option value="7,Asia/Krasnoyarsk">(GMT +7:00) Krasnoyarsk</option>
132
-									<option value="8,Asia/Hong_Kong">(GMT +8:00) Beijing, Chongqing, Hong Kong, Urumqi</option>
133
-									<option value="8,Asia/Irkutsk">(GMT +8:00) Irkutsk, Ulaan Bataar</option>
134
-									<option value="8,Asia/Singapore">(GMT +8:00) Kuala Lumpar, Perth, Singapore, Taipei</option>
135
-									<option value="9,Asia/Tokyo">(GMT +9:00) Osaka, Sapporo, Tokyo</option>
136
-									<option value="9,Asia/Seoul">(GMT +9:00) Seoul</option>
137
-									<option value="9,Asia/Yakutsk">(GMT +9:00) Yakutsk</option>
138
-									<option value="9.50,Australia/Adelaide">(GMT +9:30) Adelaide</option>
139
-									<option value="9.50Australia/Darwin">(GMT +9:30) Darwin</option>
140
-									<option value="10,Australia/Brisbane">(GMT +10:00) Brisbane, Guam, Port Moresby</option>
141
-									<option value="10,Australia/Canberra">(GMT +10:00) Canberra, Hobart, Melbourne, Sydney</option>
142
-									<option value="11,Asia/Magadan">(GMT +11:00) Magadan, Soloman Is., New Caledonia</option>
143
-									<option value="12,Pacific/Auckland">(GMT +12:00) Auckland, Wellington</option>
144
-									<option value="12,Pacific/Fiji">(GMT +12:00) Fiji, Kamchatka, Marshall Is.</option>
145
-								</select>
146
-							</li>
147
-						</ul>
148
-					</fieldset>
149
-					<p>
150
-						<input type="hidden" name="website" id="website" value="" />
151
-						<input type="hidden" name="about" id="about" value="" />
152
-						<input type="hidden" name="action" id="action" value="config" />
153
-						<input type="submit" name="btnsubmit" id="btnsubmit" value="<< Install >>" class="submit"/>
154
-					</p>
155
-				</form>
73
+										{/block}
74
+									</select>
75
+									<li>
76
+									<li><label for="time_offsets">Time Offset:</label>
77
+									<select id="time_offsets" name="time_offsets">
78
+										<option value="-12,Pacific/Kwajalein">(GMT -12:00) International Date Line West</option>
79
+										<option value="-11,Pacific/Samoa">(GMT -11:00) Midway Island, Samoa</option>
80
+										<option value="-10,Pacific/Honolulu">(GMT -10:00) Hawaii</option>
81
+										<option value="-9,US/Alaska">(GMT -9:00) Alaska</option>
82
+										<option value="-8,US/Pacific">(GMT -8:00) Pacific Time (US &amp; Canada); Tijuana</option>
83
+										<option value="-7,US/Mountain">(GMT -7:00) Mountain Time (US &amp; Canada)</option>
84
+										<option value="-7,US/Arizona">(GMT -7:00) Arizona</option>
85
+										<option value="-7,Mexico/BajaNorte">(GMT -7:00) Chihuahua, La Paz, Mazatlan</option>
86
+										<option value="-6,US/Central">(GMT -6:00) Central Time (US &amp; Canada)</option>
87
+										<option value="-6,America/Costa_Rica">(GMT -6:00) Central America</option>
88
+										<option value="-6,Mexico/General" selected="selected">(GMT -6:00) Guadalajara, Mexico City, Monterrey</option>
89
+										<option value="-6,Canada/Saskatchewan">(GMT -6:00) Saskatchewan</option>
90
+										<option value="-5,US/Eastern">(GMT -5:00) Eastern Time (US &amp; Canada)</option>
91
+										<option value="-5,America/Bogota">(GMT -5:00) Bogota, Lima, Quito</option>
92
+										<option value="-5,US/East-Indiana">(GMT -5:00) Indiana (East)</option>
93
+										<option value="-4,Canada/Eastern">(GMT -4:00) Atlantic Time (Canada)</option>
94
+										<option value="-4,America/Caracas">(GMT -4:00) Caracas, La Paz</option>
95
+										<option value="-4,America/Santiago">(GMT -4:00) Santiago</option>
96
+										<option value="-3.50,Canada/Newfoundland">(GMT -3:30) Newfoundland</option>
97
+										<option value="-3,Canada/Atlantic">(GMT -3:00) Brasilia, Greenland</option>
98
+										<option value="-3,America/Buenos_Aires">(GMT -3:00) Buenos Aires, Georgetown</option>
99
+										<option value="-2,Atlantic/Central">(GMT -2:00) Atlantic Central</option>
100
+										<option value="-1,Atlantic/Cape_Verde">(GMT -1:00) Cape Verde Is.</option>
101
+										<option value="-1,Atlantic/Azores">(GMT -1:00) Azores</option>
102
+										<option value="0,Africa/Casablanca">(GMT) Casablanca, Monrovia</option>
103
+										<option value="0,Europe/Dublin">(GMT) Greenwich Mean Time : Dublin, Edinburgh, London</option>
104
+										<option value="1,Europe/Amsterdam">(GMT +1:00) Amsterdam, Berlin, Rome, Stockholm, Vienna</option>
105
+										<option value="1,Europe/Prague">(GMT +1:00) Belgrade, Bratislava, Budapest, Prague</option>
106
+										<option value="1,Europe/Paris">(GMT +1:00) Brussels, Copenhagen, Madrid, Paris</option>
107
+										<option value="1,Europe/Warsaw">(GMT +1:00) Sarajevo, Skopje, Warsaw, Zagreb</option>
108
+										<option value="1,Africa/Bangui">(GMT +1:00) West Central Africa</option>
109
+										<option value="2,Europe/Istanbul">(GMT +2:00) Athens, Beirut, Bucharest, Cairo, Istanbul	</option>
110
+										<option value="2,Asia/Jerusalem">(GMT +2:00) Harare, Jerusalem, Pretoria</option>
111
+										<option value="2,Europe/Kiev">(GMT +2:00) Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius</option>
112
+										<option value="3,Asia/Riyadh">(GMT +3:00) Kuwait, Nairobi, Riyadh</option>
113
+										<option value="3,Europe/Moscow">(GMT +3:00) Baghdad, Moscow, St. Petersburg, Volgograd</option>
114
+										<option value="3.50,Asia/Tehran">(GMT +3:30) Tehran</option>
115
+										<option value="4,Asia/Muscat">(GMT +4:00) Abu Dhabi, Muscat</option>
116
+										<option value="4,Asia/Baku">(GMT +4:00) Baku, Tbilsi, Yerevan</option>
117
+										<option value="4.50,Asia/Kabul">(GMT +4:30) Kabul</option>
118
+										<option value="5,Asia/Yekaterinburg">(GMT +5:00) Yekaterinburg</option>
119
+										<option value="5,Asia/Karachi">(GMT +5:00) Islamabad, Karachi, Tashkent</option>
120
+										<option value="5.50,Asia/Calcutta">(GMT +5:30) Chennai, Calcutta, Mumbai, New Delhi</option>
121
+										<option value="5.75,Asia/Katmandu">(GMT +5:45) Katmandu</option>
122
+										<option value="6,Asia/Almaty">(GMT +6:00) Almaty, Novosibirsk</option>
123
+										<option value="6,Asia/Dhaka">(GMT +6:00) Astana, Dhaka, Sri Jayawardenepura</option>
124
+										<option value="6.50,Asia/Rangoon">(GMT +6:30) Rangoon</option>
125
+										<option value="7,Asia/Bangkok">(GMT +7:00) Bangkok, Hanoi, Jakarta</option>
126
+										<option value="7,Asia/Krasnoyarsk">(GMT +7:00) Krasnoyarsk</option>
127
+										<option value="8,Asia/Hong_Kong">(GMT +8:00) Beijing, Chongqing, Hong Kong, Urumqi</option>
128
+										<option value="8,Asia/Irkutsk">(GMT +8:00) Irkutsk, Ulaan Bataar</option>
129
+										<option value="8,Asia/Singapore">(GMT +8:00) Kuala Lumpar, Perth, Singapore, Taipei</option>
130
+										<option value="9,Asia/Tokyo">(GMT +9:00) Osaka, Sapporo, Tokyo</option>
131
+										<option value="9,Asia/Seoul">(GMT +9:00) Seoul</option>
132
+										<option value="9,Asia/Yakutsk">(GMT +9:00) Yakutsk</option>
133
+										<option value="9.50,Australia/Adelaide">(GMT +9:30) Adelaide</option>
134
+										<option value="9.50Australia/Darwin">(GMT +9:30) Darwin</option>
135
+										<option value="10,Australia/Brisbane">(GMT +10:00) Brisbane, Guam, Port Moresby</option>
136
+										<option value="10,Australia/Canberra">(GMT +10:00) Canberra, Hobart, Melbourne, Sydney</option>
137
+										<option value="11,Asia/Magadan">(GMT +11:00) Magadan, Soloman Is., New Caledonia</option>
138
+										<option value="12,Pacific/Auckland">(GMT +12:00) Auckland, Wellington</option>
139
+										<option value="12,Pacific/Fiji">(GMT +12:00) Fiji, Kamchatka, Marshall Is.</option>
140
+									</select>
141
+									</li>
142
+								</ul>
143
+							</fieldset>
144
+							<p>
145
+								<input type="hidden" name="website" id="website" value="" />
146
+								<input type="hidden" name="about" id="about" value="" />
147
+								<input type="hidden" name="action" id="action" value="config" />
148
+								<input type="submit" name="btnsubmit" id="btnsubmit" value="Install" class="submit" />
149
+							</p>
150
+						</form>
151
+					</div>
152
+					<div class="footer-box">&nbsp;</div>
153
+				</div>
154
+				{else}
155
+				<p class="install_box">Success !</p>
156
+				<p class="install_box">Now you can <a href="login.php" class="inslnl">log in</a> with your username and password</p>
157
+				{/if}
158
+			</div>
159
+			<div id="foot">
160
+				Sorbet CMS - PHP Tumblelog Content Management System.
156 161
 			</div>
157
-			<div class="footer-box">&nbsp;</div>
158 162
 		</div>
159
-	{else}
160
-		<p class="install_box"><em>Finished!</em></p>
161
-		<p class="install_box">Now you can <a href="login.php" class="inslnl">log in</a> with your <strong>username</strong> and <strong>password</strong></p>
162
-	{/if}
163
-	</div>
164
-	<div id="foot">
165
-		Sorbet CMS :: PHP Tumblelog Content Management System.
166
-	</div>
167
-</div>
168
-</body>
163
+	</body>
169 164
 </html>

+ 10 - 10
admin/themes/admin/login.htm 查看文件

@@ -1,9 +1,9 @@
1
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
-	<html xmlns="http://www.w3.org/1999/xhtml">
1
+<!DOCTYPE html>
2
+<html>
3 3
 	<head>
4
-		<title>sorbet :: {__("login screen")}</title>
5
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
-		<meta name="generator" content="sorbet cms {version}" />
4
+		<title>{__("Login")} - Sorbet CMS</title>
5
+		<meta charset="utf-8" />
6
+		<meta name="generator" content="Sorbet CMS {version}" />
7 7
 		<link rel="shortcut icon" href="{conf.urlSorbet}/images/favicon.ico" />
8 8
 		<script language="javascript" type="text/javascript" src="{conf.urlSorbet}/admin/scripts/jquery.js"></script>
9 9
 		<script language="javascript" type="text/javascript" src="{conf.urlSorbet}/admin/scripts/jquery.validate.min.js"></script>
@@ -34,7 +34,7 @@
34 34
 		<div id="div-process" style="display:none;">{__("Processing request&hellip;")}</div>
35 35
 		<div id="cont">
36 36
 			<div id="head">
37
-				<h1><a href="{conf.urlSorbet}/" title="sorbet :: {__("home")}">sorbet cms</a></h1>
37
+				<h1><a href="{conf.urlSorbet}/" title="sorbet :: {__("home")}">Sorbet CMS</a></h1>
38 38
 				<ul id="nav">
39 39
 					<li><a href="{conf.urlSorbet}/" title="{__("Take me to the tumblelog")}">{__("Back to the Tumblelog")}</a></li>
40 40
 			  	</ul>
@@ -56,11 +56,11 @@
56 56
 									{/if}
57 57
 									<fieldset>
58 58
 									<ul>
59
-										<li><label for="login">{__("User:")}</label>
59
+										<li><label for="login">{__("User :")}</label>
60 60
 											<input id="login" name="login" type="text" class="txt" /></li>
61
-										<li><label for="pass">{__("Password:")}</label>
61
+										<li><label for="pass">{__("Password :")}</label>
62 62
 											<input id="pass" name="pass" type="password" class="txt" /></li>
63
-										<li><label for="save_pass">{__("Remember me:")}</label>
63
+										<li><label for="save_pass">{__("Remember me")}</label>
64 64
 											<input id="save_pass" name="save_pass" type="checkbox" /></li>
65 65
 										<li><input name="btnLogin" type="submit" value="Login" /></li>
66 66
 									</ul>
@@ -82,7 +82,7 @@
82 82
 				</div>
83 83
 			</div>
84 84
 			<div id="foot">
85
-				Sorbet CMS :: PHP Tumblelog Content Management System.
85
+				Sorbet CMS - PHP Tumblelog Content Management System.
86 86
 			</div>
87 87
 		</div>
88 88
 	</body>

+ 5 - 6
admin/themes/admin/template_bm.htm 查看文件

@@ -1,9 +1,8 @@
1
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
-	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
1
+<!DOCTYPE html>
2
+<html lang="en">
4 3
     <head>
5
-    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
-    	<title>sorbet bookmarklet</title>
4
+    	<meta charset="utf-8"/>
5
+    	<title>Sorbet Bookmarklet</title>
7 6
     	<style type="text/css">
8 7
     	    body {
9 8
     	        background-color: #e1e1e1;
@@ -40,7 +39,7 @@
40 39
 
41 40
     <body>
42 41
         <div id="content">
43
-            <div style="margin-bottom:10px; font-size:40px; color:#777;">Done!</div>
42
+            <div style="margin-bottom:10px; font-size:40px; color:#777;">Done !</div>
44 43
 
45 44
             <a href="#" onclick="javascript:self.close(); return false;"
46 45
             style="color:#777;">Close this window</a>

+ 9 - 11
admin/user.php 查看文件

@@ -9,10 +9,9 @@ if (!defined('entry')) {
9 9
   Sorbet CMS is a free software licensed under the GPL 3.0
10 10
 
11 11
   =========================== */
12
-?>
13
-<?php
12
+
14 13
 require '../entry.php';
15
-global $user, $conf, $tumble;
14
+global $user, $conf, $tumble, $util;
16 15
 
17 16
 $isEdition = isset($_GET["edit"]);
18 17
 $userId = ($isEdition) ? $_GET["edit"] : null;
@@ -40,12 +39,12 @@ if ($user->isAdmin()) {
40 39
         if ($isEdition) {
41 40
             $register = $user->getUserByID($userId);
42 41
         } ?>
43
-	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
44
-	<html xmlns="http://www.w3.org/1999/xhtml">
42
+	<!DOCTYPE html>
43
+	<html>
45 44
 	<head>
46
-		<title>sorbet :: <?php echo __("add user")?></title>
47
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
48
-		<meta name="generator" content="sorbet cms <?php echo util::version(); ?>" />
45
+		<title><?php echo __("add user")?> - Sorbet CMS</title>
46
+		<meta charset="utf-8" />
47
+		<meta name="generator" content="Sorbet CMS <?= $util->version(); ?>" />
49 48
 		<link rel="shortcut icon" href="<?php echo $conf->urlSorbet; ?>/images/favicon.ico" />
50 49
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/jquery.js"></script>
51 50
 		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlSorbet; ?>/admin/scripts/tools.js"></script>
@@ -58,7 +57,7 @@ if ($user->isAdmin()) {
58 57
 		<div id="div-process" style="display:none;"><?php echo __("Processing request&hellip;"); ?></div>
59 58
 		<div id="cont">
60 59
 			<div id="head">
61
-				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="sorbet :: <?php echo __("home")?>">sorbet cms</a></h1>
60
+				<h1><a href="<?php echo $conf->urlSorbet; ?>/admin/index.php" title="<?php echo __("home")?> - Sorbet CMS">Sorbet CMS</a></h1>
62 61
 				<ul id="nav">
63 62
 					<li><a href="<?php echo $conf->urlSorbet; ?>/" title="<?php echo __("Take me to the tumblelog")?>"><?php echo __("Back to the Tumblelog")?></a></li>
64 63
 			  	</ul>
@@ -137,7 +136,7 @@ if ($user->isAdmin()) {
137 136
 				</div>
138 137
 			</div>
139 138
 			<div id="foot">
140
-				Sorbet CMS :: PHP Tumblelog Content Management System.
139
+				Sorbet CMS - PHP Tumblelog Content Management System.
141 140
 			</div>
142 141
 		</div>
143 142
 	</body>
@@ -148,4 +147,3 @@ if ($user->isAdmin()) {
148 147
 } else {
149 148
     header("Location: ".$conf->urlSorbet."/login.php");
150 149
 }
151
-?>

+ 3 - 4
archive.php 查看文件

@@ -120,12 +120,11 @@ function handleNode($node)
120 120
 }
121 121
 ?>
122 122
 
123
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
124
-	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
125
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
123
+<!DOCTYPE html>
124
+<html lang="en">
126 125
 
127 126
 	<head>
128
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
127
+		<meta charset="utf-8" />
129 128
 		<meta name="generator" content="sorbet <?php echo $util_class->codeName()." (".$util_class->version().")"; ?>" />
130 129
 		<link rel="shortcut icon" href="<?php echo $conf->urlSorbet;?>/images/favicon.ico" />
131 130
 		<link rel="alternate" type="application/rss+xml" title="RSS" href="<?php echo $conf->urlSorbet.($conf->urlFriendly ? "/rss/" : "/rss.php"); ?>"/>

文件差異過大導致無法顯示
+ 1 - 1
classes/comments.class.php


+ 56 - 90
classes/imgsize.php 查看文件

@@ -1,102 +1,68 @@
1 1
 <?php
2
- if (!defined('entry')) {
3
-     define('entry', true);
4
- }
5
-header("Content-type: image/jpeg");
6
-header('Cache-Control: max-age=172800, must-revalidate');
7
-header('Expires: ' . date('r', time()+120));
8
-/*
9
-JPEG / PNG Image Resizer
10
-Parameters (passed via URL):
11
-
12
-img = path / url of jpeg or png image file
13
-
14
-percent = if this is defined, image is resized by it's
15
-          value in percent (i.e. 50 to divide by 50 percent)
16
-
17
-w = image width
18
-
19
-h = image height
20
-
21
-constrain = if this is parameter is passed and w and h are set
22
-            to a size value then the size of the resulting image
23
-            is constrained by whichever dimension is smaller
24
-
25
-Requires the PHP GD Extension
26
-
27
-Outputs the resulting image in JPEG Format
28
-
29
-By: Michael John G. Lopez - www.sydel.net
30
-Filename : imgsize.php
31
-*/
32
-
33
-$img = $_GET['img'];
34
-
35
-$ext=substr($img, -3);
36
-if ($ext != "jpg" && $ext !="gif" && $ext !="png") {
37
-    die("This is not a valid image file!!");
2
+if (!defined('entry')) {
3
+    define('entry', true);
38 4
 }
39 5
 
6
+$img = @$_GET['img'];
7
+$w = @$_GET['w'];
8
+$h = @$_GET['h'];
40 9
 
41
-$percent = $_GET['percent'];
42
-$constrain = $_GET['constrain'];
43
-$w = $_GET['w'];
44
-$h = $_GET['h'];
45
-
46
-// get image size of img
47
-$x = @getimagesize($img);
48
-// image width
10
+$x = getimagesize($img);
49 11
 $sw = $x[0];
50
-// image height
51 12
 $sh = $x[1];
52 13
 
53
-if ($percent > 0) {
54
-    // calculate resized height and width if percent is defined
55
-    $percent = $percent * 0.01;
56
-    $w = $sw * $percent;
57
-    $h = $sh * $percent;
58
-} else {
59
-    if (isset($w) and !isset($h)) {
60
-        // autocompute height if only width is set
61
-        $h = (100 / ($sw / $w)) * .01;
62
-        $h = @round($sh * $h);
63
-    } elseif (isset($h) and !isset($w)) {
64
-        // autocompute width if only height is set
65
-        $w = (100 / ($sh / $h)) * .01;
66
-        $w = @round($sw * $w);
67
-    } elseif (isset($h) and isset($w) and isset($constrain)) {
68
-        // get the smaller resulting image dimension if both height
69
-        // and width are set and $constrain is also set
70
-        $hx = (100 / ($sw / $w)) * .01;
71
-        $hx = @round($sh * $hx);
72
-
73
-        $wx = (100 / ($sh / $h)) * .01;
74
-        $wx = @round($sw * $wx);
75
-
76
-        if ($hx < $h) {
77
-            $h = (100 / ($sw / $w)) * .01;
78
-            $h = @round($sh * $h);
79
-        } else {
80
-            $w = (100 / ($sh / $h)) * .01;
81
-            $w = @round($sw * $w);
82
-        }
83
-    }
14
+if (isset($w) and !isset($h)) {
15
+  $h = (100 / ($sw / $w)) * .01;
16
+  $h = @round($sh * $h);
17
+} elseif (isset($h) and !isset($w)) {
18
+  $w = (100 / ($sh / $h)) * .01;
19
+  $w = @round($sw * $w);
84 20
 }
85 21
 
86
-$im = @ImageCreateFromJPEG($img) or // Read JPEG Image
87
-$im = @ImageCreateFromPNG($img) or // or PNG Image
88
-$im = @ImageCreateFromGIF($img) or // or GIF Image
89
-$im = false; // If image is not JPEG, PNG, or GIF
22
+$imgext = pathinfo($img, PATHINFO_EXTENSION);
23
+
24
+switch ($imgext) {
25
+  case 'png':
26
+    header("Content-type: image/png");
27
+    $s_img = imagecreatefrompng($img);
28
+    break;
29
+  case 'jpg':
30
+  case 'jpeg':
31
+    header("Content-type: image/jpeg");
32
+    $s_img = imagecreatefromjpeg($img);
33
+    break;
34
+  case 'gif':
35
+    header("Content-type: image/gif");
36
+    $s_img = imagecreatefromgif($img);
37
+    break;
38
+  default:
39
+    readfile($img);
40
+    exit();
41
+    break;
42
+}
90 43
 
91
-if (!$im) {
92
-    // We get errors from PHP's ImageCreate functions...
93
-    // So let's echo back the contents of the actual image.
44
+$d_img = imagecreatetruecolor($w, $h);
45
+
46
+$sw = imagesx($s_img);
47
+$sh = imagesy($s_img);
48
+$dw = imagesx($d_img);
49
+$dh = imagesy($d_img);
50
+
51
+imagecopyresampled($d_img, $s_img, 0, 0, 0, 0, $dw, $dh, $sw, $sh);
52
+
53
+switch ($imgext) {
54
+  case 'png':
55
+    imagepng($d_img);
56
+    break;
57
+  case 'jpg':
58
+  case 'jpeg':
59
+    imagejpeg($d_img);
60
+    break;
61
+  case 'gif':
62
+    imagegif($d_img);
63
+    break;
64
+  default:
94 65
     readfile($img);
95
-} else {
96
-    // Create the resized image destination
97
-    $thumb = @ImageCreateTrueColor($w, $h);
98
-    // Copy from image source, resize it, and paste to image destination
99
-    @ImageCopyResampled($thumb, $im, 0, 0, 0, 0, $w, $h, $sw, $sh);
100
-    // Output resized image
101
-    @ImageJPEG($thumb);
66
+    exit();
67
+    break;
102 68
 }

+ 3 - 4
classes/textile.class.php 查看文件

@@ -220,7 +220,7 @@ class Textile
220 220
     public $pnct;
221 221
     public $rel;
222 222
     public $fn;
223
-    
223
+
224 224
     public $shelf = array();
225 225
     public $restricted = false;
226 226
     public $noimage = false;
@@ -228,7 +228,7 @@ class Textile
228 228
     public $url_schemes = array();
229 229
     public $glyph = array();
230 230
     public $hu = '';
231
-    
231
+
232 232
     public $ver = '2.0.0';
233 233
     public $rev = '$Rev: 216 $';
234 234
 
@@ -900,9 +900,8 @@ class Textile
900 900
             do {
901 901
                 $old = $text;
902 902
                 $text = strtr($text, $this->shelf);
903
-            }
903
+            } while ($text != $old);
904 904
         }
905
-        while ($text != $old);
906 905
 
907 906
         return $text;
908 907
     }

+ 1 - 1
classes/user.class.php 查看文件

@@ -154,7 +154,7 @@ class user
154 154
         $msg .=    "Password: <strong>".$password."</strong><br/><br/>";
155 155
         $msg .=    "<em>Don't tell your password to anybody!!</em><br/><br/></font>";
156 156
 
157
-        sendMail($email, "Register confirmation on Sorbet CMS", $msg, "no-reply@sorbetcms.net");
157
+        $util->sendMail($email, "Register confirmation on Sorbet CMS", $msg, "no-reply@sorbetcms.net");
158 158
     }
159 159
 }
160 160
 ?>

+ 3 - 3
classes/util.class.php 查看文件

@@ -9,8 +9,7 @@ if (!defined('entry') || !entry) {
9 9
   Sorbet CMS is a free software licensed under the GPL 3.0
10 10
 
11 11
   =========================== */
12
-?>
13
-<?php
12
+
14 13
 class util
15 14
 {
16 15
     public function version()
@@ -20,7 +19,7 @@ class util
20 19
 
21 20
     public function codeName()
22 21
     {
23
-        return "vaniglia ALPHA";
22
+        return "Strawberry";
24 23
     }
25 24
 
26 25
     public function beginsWith($str, $sub)
@@ -469,6 +468,7 @@ class util
469 468
 
470 469
     public function getLangs()
471 470
     {
471
+        $util_class = new util();
472 472
         $langs_dir = "languages";
473 473
         $dirs = array();
474 474
         $path = getcwd();

+ 13 - 11
entry.php 查看文件

@@ -1,7 +1,9 @@
1 1
 <?php
2
+
2 3
 ob_start();
4
+
3 5
 if (!defined('entry') || !entry) {
4
-    die('Not a valid page');
6
+    die("Not a valid page");
5 7
 }
6 8
 
7 9
 error_reporting(E_ALL);
@@ -10,20 +12,20 @@ ini_set('display_errors', '1');
10 12
 // PHP settings specific to Sorbet
11 13
 ini_set('pcre.backtrack_limit', '10000');
12 14
 
13
-define('Absolute_Path', dirname(__FILE__).DIRECTORY_SEPARATOR);
15
+define('Absolute_Path', dirname(__FILE__) . DIRECTORY_SEPARATOR);
14 16
 $installed = true;
15
-$configFile = Absolute_Path.'config.php';
17
+$configFile = Absolute_Path . "config.php";
16 18
 
17
-$dir = (strpos($_SERVER['REQUEST_URI'], '/admin')) ? "../" : "";
19
+$dir = (strpos($_SERVER['REQUEST_URI'], "/admin")) ? "../" : "";
18 20
 
19
-if (!file_exists($configFile) and basename($_SERVER['PHP_SELF'])!='install.php') {
21
+if (!file_exists($configFile) and basename($_SERVER["PHP_SELF"]) != "install.php") {
20 22
     header("Location: {$dir}install.php");
21 23
     exit;
22 24
 } else {
23
-    include_once(Absolute_Path.'classes/install.class.php');
25
+    include_once(Absolute_Path . "classes/install.class.php");
24 26
     $install = new Install();
25 27
     if (!$install->is_sorbet_installed()) {
26
-        if (basename($_SERVER['PHP_SELF'])!='install.php') {
28
+        if (basename($_SERVER['PHP_SELF']) != "install.php") {
27 29
             header("Location: {$dir}install.php");
28 30
             exit;
29 31
         }
@@ -32,7 +34,7 @@ if (!file_exists($configFile) and basename($_SERVER['PHP_SELF'])!='install.php')
32 34
 }
33 35
 
34 36
 if ($installed) {
35
-    require_once($configFile);
37
+    require_once $configFile;
36 38
 }
37 39
 
38 40
 if (!extension_loaded('json')) {
@@ -73,15 +75,15 @@ if ($installed) {
73 75
     $conf = new configuration();
74 76
     $tumble = new sorbet();
75 77
     $user = new user();
78
+    $util = new util();
76 79
 
77 80
     session_start();
78 81
 
79
-    $util_init_plugins = new util();
80
-    $util_init_plugins -> init_plugins();
82
+    $util->init_plugins();
81 83
 
82 84
     $plugin_instance = new plugin();
83 85
 
84
-    $trigger =& $plugin_instance -> instance(); //DO NOT remove the & after the =
86
+    $trigger =& $plugin_instance->instance(); //DO NOT remove the & after the =
85 87
 
86 88
     $trigger->call('sorbet_init');
87 89
 

二進制
images/favicon.ico 查看文件


+ 7 - 8
index.php 查看文件

@@ -1,7 +1,5 @@
1 1
 <?php
2
-if (!defined('entry')) {
3
-    define('entry', true);
4
-}
2
+
5 3
 /* ===========================
6 4
 
7 5
   Sorbet CMS - A PHP based tumblelog CMS forked from Gelato CMS
@@ -9,11 +7,13 @@ if (!defined('entry')) {
9 7
   Sorbet CMS is a free software licensed under the GPL 3.0
10 8
 
11 9
   =========================== */
12
-?>
13
-<?php
10
+
11
+if (!defined('entry')) {
12
+    define('entry', true);
13
+}
14 14
 
15 15
 // Received a valid request
16
-require_once('entry.php');
16
+require_once "entry.php";
17 17
 global $user, $tumble, $conf;
18 18
 
19 19
 $theme = new themes;
@@ -310,7 +310,7 @@ $util_class = new util();
310 310
                 $whois['Web_Cookie'] = isset($_COOKIE['cookie_sor_web'])?$_COOKIE['cookie_sor_web']:'';
311 311
                 $whois['Id_Post'] = $register["id_post"];
312 312
 
313
-                $theme->set('Date_Added', gmmktime());
313
+                $theme->set('Date_Added', time());
314 314
                 $theme->set('Form_Action', $conf->urlSorbet."/admin/comments.php");
315 315
                 $theme->set('whois', $whois);
316 316
             }
@@ -323,4 +323,3 @@ $util_class = new util();
323 323
 
324 324
         $theme->set('URL_Tumble', $conf->urlSorbet);
325 325
         $theme->display(Absolute_Path.'themes/'.$conf->template.'/index.htm');
326
-?>

+ 3 - 3
install.php 查看文件

@@ -11,13 +11,13 @@ if (!defined('entry') || !entry) {
11 11
   =========================== */
12 12
 
13 13
 // Received a valid request, better start setting globals we'll need throughout the app in entry.php
14
-require_once('entry.php');
14
+require_once "entry.php";
15 15
 
16
-$configFile = Absolute_Path."config.php";
16
+$configFile = Absolute_Path . "config.php";
17 17
 if (file_exists($configFile)) {
18 18
     require_once($configFile);
19 19
 } else {
20
-    exit('You need to rename config-sample.php to config.php and fill out the required details.');
20
+    exit('Error while parsing the config file');
21 21
 }
22 22
 
23 23
 global $user, $conf, $tumble;

+ 0 - 1
login.php 查看文件

@@ -45,4 +45,3 @@ if ($user->isAuthenticated()) {
45 45
         $theme->display(Absolute_Path.'admin/themes/admin/login.htm');
46 46
     }
47 47
 }
48
-?>

+ 1 - 2
rss.php 查看文件

@@ -9,8 +9,7 @@ if (!defined('entry')) {
9 9
   Sorbet CMS is a free software licensed under the GPL 3.0
10 10
 
11 11
   =========================== */
12
-?>
13
-<?php
12
+
14 13
     require('entry.php');
15 14
     $trigger->call('feed_header');
16 15
 

二進制
themes/Dreamscape/images/bg.gif 查看文件


二進制
themes/Dreamscape/images/content_bg.png 查看文件


+ 0 - 189
themes/Dreamscape/index.htm 查看文件

@@ -1,189 +0,0 @@
1
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
-<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
3
-		{Sorbet_includes}
4
-		<link rel="stylesheet" type="text/css" href="{URL_Tumble}/themes/{Template_name}/style.css"/>
5
-		<script language="javascript" type="text/javascript" src="{URL_Tumble}/admin/scripts/jquery.js"></script>
6
-		<script language="javascript" type="text/javascript" src="{URL_Tumble}/admin/scripts/lightbox.js"></script>
7
-		<link rel="stylesheet" type="text/css" href="{URL_Tumble}/admin/css/lightbox.css" />
8
-
9
-        <!-- DEFAULT COLORS -->
10
-        <meta name="color:Background" content="#002c43">
11
-        <meta name="color:Content Background" content="#005885">
12
-        <meta name="color:Content Border" content="#003955">
13
-        <meta name="color:Title" content="#fff">
14
-        <meta name="color:Description" content="#568">
15
-        <meta name="color:Post Title" content="#fff">
16
-        <meta name="color:Text" content="#fff">
17
-        <meta name="color:Inline Link" content="#ff9900">
18
-        <meta name="color:Quote" content="#fff">
19
-        <meta name="color:Quote Source" content="#aaa">
20
-        <meta name="color:Link Post" content="#ff9900">
21
-        <meta name="color:Conversation Background" content="#46a6e9">
22
-        <meta name="color:Conversation Border" content="#0070ba">
23
-        <meta name="color:Conversation Text" content="#000">
24
-        <meta name="color:Photo Border" content="#eee">
25
-        <meta name="color:Date 1" content="#888">
26
-        <meta name="color:Date 2" content="#4075a2">
27
-        <!-- END DEFAULT COLORS -->
28
-
29
-        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
30
-	    <title>{Page_Title}</title>
31
-	    <link rel="alternate" type="application/rss+xml" title="RSS" href="{rssFeed}" />
32
-
33
-        <!--[if lt IE 7]>
34
-            <style type="text/css">
35
-                #content {
36
-                    background-image: none;
37
-                }
38
-
39
-                .post .date {
40
-                    right: 600px;
41
-                }
42
-            </style>
43
-        <![endif]-->
44
-    </head>
45
-    <body>
46
-        <div id="content">
47
-            <h1><a href="{URL_Tumble}">{Title}</a></h1>
48
-            <div id="description">
49
-                {Description}
50
-            </div>
51
-			{if $error}
52
-				<div class="error">{$error}</div>
53
-			{else}
54
-				{block $rows as $row}
55
-					<div class="post">
56
-						<div class="permalink"><a href="{$row.Permalink}">•</a></div>
57
-						<div class="date">
58
-							{$row.Date_Added}
59
-						</div>
60
-
61
-					{if $row.postType=='post'}
62
-						<div class="regular">
63
-							<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
64
-							{$row.Body}
65
-						</div>
66
-					{elseif $row.postType=='photo'}
67
-						<div class="photo">
68
-							<a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}"></a>
69
-							<div class="caption">
70
-								{$row.Caption}
71
-							</div>
72
-						</div>
73
-					{elseif $row.postType=='quote'}
74
-						<div class="quote">
75
-							<span class="quote">
76
-								<big class="quote">“</big> <a href="{$row.Permalink}">{$row.Quote}</a>
77
-							</span>
78
-							<span class="source">{$row.Source}</span>
79
-						</div>
80
-					{elseif $row.postType=='url'}
81
-	                    <div class="link">
82
-		                    <a href="{$row.URL}" class="link" >{$row.Name}</a>
83
-	                        <div class="description">{$row.Description}</div>
84
-	                    </div>
85
-					{elseif $row.postType=='conversation'}
86
-						<div class="conversation">
87
-							...<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
88
-							{$row.Conversation}
89
-						</div>
90
-					{elseif $row.postType=='video'}
91
-						<div class="video">
92
-							{$row.Video}
93
-							<div class="caption">{$row.Caption}</div>
94
-						</div>
95
-					{elseif $row.postType=='mp3'}
96
-						<div class="video">
97
-							{$row.Mp3}
98
-							<div class="caption">{$row.Caption}</div>
99
-						</div>
100
-					{/if}
101
-					</div>
102
-					{if !$id_post}
103
-						<div class="totalComments">
104
-							<h3>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments">( {$row.Comments_Number} ) {__("comments")}{/if}</a></h3>
105
-						</div>
106
-					{/if}
107
-				{/block}
108
-
109
-				{if $id_post}
110
-					{if $row.Comments_Number>0}
111
-						<div class="containerComments">
112
-							<h3 id="comments">{$row.Comments_Number} {__("answers to")} &#8220;{$row.Post_Title}&#8221;</h3>
113
-							<ol class="commentlist">
114
-								{block $comments as $comment}
115
-								<li class="alt" id="comment-{$comment.Id_Comment}">
116
-									<cite>
117
-										<a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>&nbsp;&nbsp;
118
-										{$comment.Comment_Author} {__("said")}:
119
-									</cite>
120
-									<br />
121
-									<span class="timestampComment"> {__("at")} {$comment.Date}</span><br /><br />
122
-									{$comment.Comment}
123
-									<br /><br />
124
-								</li>
125
-								{/block}
126
-							</ol>
127
-						</div>
128
-					{/if}
129
-
130
-					{if $allowComments}
131
-						<div class="containerFormComments">
132
-							<h3 id="respond">{__("Add your comment")}</h3>
133
-
134
-							<form action="{Form_Action}" method="post" name="commentForm" id="commentForm">
135
-								<p>
136
-									<label for="username">
137
-										<small>{__("Name:")}</small>
138
-									</label>
139
-									<input name="username" id="username" value="{whois.User_Cookie}" size="22" tabindex="1" type="text" />
140
-								</p>
141
-								<p>
142
-									<label for="email">
143
-										<small>{__("E-mail:")}</small>
144
-									</label>
145
-									<input name="email" id="email" value="{whois.Email_Cookie}" size="22" tabindex="2" type="text" />
146
-								</p>
147
-								<p>
148
-									<label for="web">
149
-										<small>{__("Website:")}</small>
150
-									</label>
151
-									<input name="web" id="web" value="{whois.Web_Cookie}" size="22" tabindex="3" type="text" />
152
-								</p>
153
-								<p>
154
-									<textarea name="content" id="content" cols=" rows="10" tabindex="4"></textarea>
155
-								</p>
156
-								<p>
157
-									<span style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;">
158
-				                    	{__("Some HTML allowed:")}<br />
159
-				                        &nbsp;&nbsp;&nbsp;&nbsp;
160
-				                        <code>
161
-				                            &lt;blockquote&gt; &lt;code&gt; &lt;em&gt; &lt;strong&gt; &lt;a&gt;
162
-				                        </code>
163
-				                	</span>
164
-				                </p>
165
-						  		<p>
166
-									<input type="submit" value="Add comment" name="btnAdd" id="btnAdd" tabindex="5" />
167
-								</p>
168
-								<p>
169
-									<input name="id_post" id="id_post" value="{id_post}" type="hidden" />
170
-									<input name="comment_date" id="comment_date" value="{Date_Added}" type="hidden" />
171
-								</p>
172
-							</form>
173
-						</div>
174
-					{/if}
175
-				{else}
176
-					{pagination}
177
-				{/if}
178
-			{/if}
179
-            <div id="footer">
180
-                <p class="tiny">
181
-                	<a href="{URL_Tumble}/archive.php">{__("archive")}</a> &nbsp;/&nbsp;
182
-                	{__("subscribe via")} <a href="{URL_Tumble}/rss.php">rss</a> &nbsp;/&nbsp;
183
-					{__("powered by")} sorbet cms
184
-                </p>
185
-            </div>
186
-        </div>
187
-
188
-	</body>
189
-</html>

文件差異過大導致無法顯示
+ 0 - 1
themes/Dreamscape/style.css


文件差異過大導致無法顯示
+ 11 - 0
themes/SorbetDark/css/bootstrap.min.css


二進制
themes/SorbetDark/fonts/glyphicons-halflings-regular.eot 查看文件


文件差異過大導致無法顯示
+ 288 - 0
themes/SorbetDark/fonts/glyphicons-halflings-regular.svg


二進制
themes/SorbetDark/fonts/glyphicons-halflings-regular.ttf 查看文件


二進制
themes/SorbetDark/fonts/glyphicons-halflings-regular.woff 查看文件


二進制
themes/SorbetDark/fonts/glyphicons-halflings-regular.woff2 查看文件


+ 195 - 0
themes/SorbetDark/index.htm 查看文件

@@ -0,0 +1,195 @@
1
+<!DOCTYPE html>
2
+<html>
3
+  <head>
4
+    <meta charset="utf-8" />
5
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+    <title>{Page_Title}</title>
8
+    {Sorbet_includes}
9
+    <link rel="stylesheet" type="text/css" href="{URL_Tumble}/themes/{Template_name}/css/bootstrap.min.css" />
10
+		<link rel="stylesheet" type="text/css" href="{URL_Tumble}/admin/css/lightbox.css" />
11
+		<link rel="alternate" type="application/rss+xml" title="RSS" href="{rssFeed}" />
12
+  </head>
13
+  <body>
14
+    <div class="container">
15
+      <header>
16
+        <h1><a href="{URL_Tumble}">{Title}</a></h1>
17
+        <p class="lead">{Description}</p>
18
+      </header>
19
+      {if $isAuthenticated}
20
+      <nav class="navbar navbar-default">
21
+        <div class="container-fluid">
22
+          <div class="navbar-header">
23
+            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
24
+              <span class="sr-only">Toggle navigation</span>
25
+              <span class="icon-bar"></span>
26
+              <span class="icon-bar"></span>
27
+              <span class="icon-bar"></span>
28
+            </button>
29
+            <a class="navbar-brand" href="{URL_Tumble}">{User}</a>
30
+          </div>
31
+
32
+          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
33
+            <ul class="nav navbar-nav navbar-right">
34
+              <li><a target="_top" href="{URL_Tumble}/admin/index.php">{__("Dashboard")}</a></li>
35
+              <li><a target="_top" href="{URL_Tumble}/admin/close.php">{__("Sign out")}</a></li>
36
+            </ul>
37
+          </div>
38
+        </div>
39
+      </nav>
40
+      {/if}
41
+      {if $error}
42
+        <div>{$error}</div>
43
+      {else}
44
+        <section>
45
+          {block $rows as $row}
46
+            <article class="panel panel-default">
47
+              {if $row.postType=='post'}
48
+    						<div class="panel-heading">
49
+                  <h3><a href="{$row.Permalink}">{$row.Title}</a></h3>
50
+    						</div>
51
+                <div class="panel-body">
52
+    						  <p>{$row.Body}</p>
53
+                  {if !$id_post}
54
+                    <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
55
+                  {/if}
56
+                </div>
57
+      				{elseif $row.postType=='photo'}
58
+                <div class="panel-body">
59
+                  <a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}" /></a>
60
+                  <h3>{$row.Caption}</h3>
61
+                  {if !$id_post}
62
+                    <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
63
+                  {/if}
64
+                </div>
65
+      				{elseif $row.postType=='quote'}
66
+                <div class="panel-body">
67
+                  <a href="{$row.Permalink}">
68
+                    <blockquote>
69
+                      {$row.Quote}
70
+                      <cite>- {$row.Source}</cite>
71
+                    </blockquote>
72
+                  </a>
73
+                  {if !$id_post}
74
+                    <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
75
+                  {/if}
76
+                </div>
77
+      				{elseif $row.postType=='url'}
78
+              <div class="panel-heading"><a href="{$row.URL}">{$row.Name}</a></div>
79
+              <div class="panel-body">
80
+                <p>{$row.Description}</p>
81
+                {if !$id_post}
82
+                  <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
83
+                {/if}
84
+              </div>
85
+      				{elseif $row.postType=='conversation'}
86
+                <div class="panel-heading">
87
+                  <a href="{$row.Permalink}">{$row.Title}</a>
88
+                </div>
89
+                <div class="panel-body">
90
+                  <pre>
91
+                    {$row.Conversation}
92
+                  </pre>
93
+                  {if !$id_post}
94
+                    <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
95
+                  {/if}
96
+                </div>
97
+      				{elseif $row.postType=='video'}
98
+              <div class="panel-body">
99
+                {$row.Video}
100
+                <p>{$row.Caption}</p>
101
+                {if !$id_post}
102
+                  <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
103
+                {/if}
104
+              </div>
105
+      				{elseif $row.postType=='mp3'}
106
+              <div class="panel-body">
107
+                {$row.Mp3}
108
+                <p>{$row.Caption}</p>
109
+                {if !$id_post}
110
+                  <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
111
+                {/if}
112
+              </div>
113
+      				{/if}
114
+            </article>
115
+          {/block}
116
+        </section>
117
+        {if $id_post}
118
+  				{if $row.Comments_Number>0}
119
+  					<div>
120
+  						<h3>{$row.Comments_Number} {__("comments on")} &#8220;{$row.Post_Title}&#8221;</h3>
121
+  						<ol>
122
+  							{block $comments as $comment}
123
+  							<li>
124
+  								<cite>
125
+  									<a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>&nbsp;&nbsp;
126
+  									{$comment.Comment_Author} {__("said")}:
127
+  								</cite>
128
+  								<br />
129
+  								<span class="timestampComment"> {__("at")} {$comment.Date}</span><br /><br />
130
+  								{$comment.Comment}
131
+  								<br /><br />
132
+  							</li>
133
+  							{/block}
134
+  						</ol>
135
+  					</div>
136
+  				{/if}
137
+
138
+  				{if $allowComments}
139
+          <form action="{Form_Action}" method="post" class="form-horizontal" name="commentForm">
140
+            <fieldset>
141
+              <legend>{__("Add your comment")}</legend>
142
+              <div class="form-group">
143
+                <label for="username" class="col-lg-2 control-label">{__("Name:")}</label>
144
+                <div class="col-lg-10">
145
+                  <input type="text" class="form-control" id="username" name="username" value="{whois.User_Cookie}" />
146
+                </div>
147
+              </div>
148
+              <div class="form-group">
149
+                <label for="email" class="col-lg-2 control-label">{__("E-mail:")}</label>
150
+                <div class="col-lg-10">
151
+                  <input type="email" class="form-control" name="email" id="email" value="{whois.Email_Cookie}" />
152
+                </div>
153
+              </div>
154
+              <div class="form-group">
155
+                <label for="web" class="col-lg-2 control-label">{__("Website:")}</label>
156
+                <div class="col-lg-10">
157
+                  <input type="url" class="form-control" name="web" id="web" value="{whois.Web_Cookie}" />
158
+                </div>
159
+              </div>
160
+              <div class="form-group">
161
+                <label for="content" class="col-lg-2 control-label">{__("Comment:")}</label>
162
+                <div class="col-lg-10">
163
+                  <textarea class="form-control" name="content" id="content" rows="10"></textarea>
164
+                  <span class="help-block">{__("Some HTML allowed:")}
165
+                    <code>
166
+                      &lt;blockquote&gt; &lt;code&gt; &lt;em&gt; &lt;strong&gt; &lt;a&gt;
167
+                    </code>
168
+                  </span>
169
+                </div>
170
+              </div>
171
+              <div class="form-group">
172
+                <div class="col-lg-10 col-lg-offset-2">
173
+                  <button type="submit" name="btnAdd" class="btn btn-success">Add comment</button>
174
+                  <input name="id_post" id="id_post" value="{id_post}" type="hidden" />
175
+                  <input name="comment_date" id="comment_date" value="{Date_Added}" type="hidden" />
176
+                </div>
177
+              </div>
178
+            </fieldset>
179
+          </form>
180
+  				{/if}
181
+  			{else}
182
+  				{pagination}
183
+  			{/if}
184
+  		{/if}
185
+      <footer style="text-align:center;margin:20px">
186
+          <a href="{URL_Tumble}/archive.php">{__("Archive")}</a> &nbsp;/&nbsp;
187
+          {__("Subscribe via")} <a href="{URL_Tumble}/rss.php">RSS</a> &nbsp;/&nbsp;
188
+          {__("Powered by")} Sorbet CMS
189
+      </footer>
190
+    </div>
191
+    <script type="text/javascript" src="{URL_Tumble}/admin/scripts/jquery.js"></script>
192
+    <script type="text/javascript" src="{URL_Tumble}/themes/{Template_name}/js/bootstrap.min.js"></script>
193
+		<script type="text/javascript" src="{URL_Tumble}/admin/scripts/lightbox.js"></script>
194
+  </body>
195
+</html>

文件差異過大導致無法顯示
+ 2377 - 0
themes/SorbetDark/js/bootstrap.js


文件差異過大導致無法顯示
+ 7 - 0
themes/SorbetDark/js/bootstrap.min.js


+ 13 - 0
themes/SorbetDark/js/npm.js 查看文件

@@ -0,0 +1,13 @@
1
+// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
2
+require('../../js/transition.js')
3
+require('../../js/alert.js')
4
+require('../../js/button.js')
5
+require('../../js/carousel.js')
6
+require('../../js/collapse.js')
7
+require('../../js/dropdown.js')
8
+require('../../js/modal.js')
9
+require('../../js/tooltip.js')
10
+require('../../js/popover.js')
11
+require('../../js/scrollspy.js')
12
+require('../../js/tab.js')
13
+require('../../js/affix.js')

文件差異過大導致無法顯示
+ 11 - 0
themes/SorbetLight/css/bootstrap.min.css


二進制
themes/SorbetLight/fonts/glyphicons-halflings-regular.eot 查看文件


文件差異過大導致無法顯示
+ 288 - 0
themes/SorbetLight/fonts/glyphicons-halflings-regular.svg


二進制
themes/SorbetLight/fonts/glyphicons-halflings-regular.ttf 查看文件


二進制
themes/SorbetLight/fonts/glyphicons-halflings-regular.woff 查看文件


二進制
themes/SorbetLight/fonts/glyphicons-halflings-regular.woff2 查看文件


+ 195 - 0
themes/SorbetLight/index.htm 查看文件

@@ -0,0 +1,195 @@
1
+<!DOCTYPE html>
2
+<html>
3
+  <head>
4
+    <meta charset="utf-8" />
5
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+    <title>{Page_Title}</title>
8
+    {Sorbet_includes}
9
+    <link rel="stylesheet" type="text/css" href="{URL_Tumble}/themes/{Template_name}/css/bootstrap.min.css" />
10
+		<link rel="stylesheet" type="text/css" href="{URL_Tumble}/admin/css/lightbox.css" />
11
+		<link rel="alternate" type="application/rss+xml" title="RSS" href="{rssFeed}" />
12
+  </head>
13
+  <body>
14
+    <div class="container">
15
+      <header>
16
+        <h1><a href="{URL_Tumble}">{Title}</a></h1>
17
+        <p class="lead">{Description}</p>
18
+      </header>
19
+      {if $isAuthenticated}
20
+      <nav class="navbar navbar-default">
21
+        <div class="container-fluid">
22
+          <div class="navbar-header">
23
+            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
24
+              <span class="sr-only">Toggle navigation</span>
25
+              <span class="icon-bar"></span>
26
+              <span class="icon-bar"></span>
27
+              <span class="icon-bar"></span>
28
+            </button>
29
+            <a class="navbar-brand" href="{URL_Tumble}">{User}</a>
30
+          </div>
31
+
32
+          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
33
+            <ul class="nav navbar-nav navbar-right">
34
+              <li><a target="_top" href="{URL_Tumble}/admin/index.php">{__("Dashboard")}</a></li>
35
+              <li><a target="_top" href="{URL_Tumble}/admin/close.php">{__("Sign out")}</a></li>
36
+            </ul>
37
+          </div>
38
+        </div>
39
+      </nav>
40
+      {/if}
41
+      {if $error}
42
+        <div>{$error}</div>
43
+      {else}
44
+        <section>
45
+          {block $rows as $row}
46
+            <article class="panel panel-default">
47
+              {if $row.postType=='post'}
48
+    						<div class="panel-heading">
49
+                  <h3><a href="{$row.Permalink}">{$row.Title}</a></h3>
50
+    						</div>
51
+                <div class="panel-body">
52
+    						  <p>{$row.Body}</p>
53
+                  {if !$id_post}
54
+                    <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
55
+                  {/if}
56
+                </div>
57
+      				{elseif $row.postType=='photo'}
58
+                <div class="panel-body">
59
+                  <a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}" /></a>
60
+                  <h3>{$row.Caption}</h3>
61
+                  {if !$id_post}
62
+                    <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
63
+                  {/if}
64
+                </div>
65
+      				{elseif $row.postType=='quote'}
66
+                <div class="panel-body">
67
+                  <a href="{$row.Permalink}">
68
+                    <blockquote>
69
+                      {$row.Quote}
70
+                      <cite>- {$row.Source}</cite>
71
+                    </blockquote>
72
+                  </a>
73
+                  {if !$id_post}
74
+                    <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
75
+                  {/if}
76
+                </div>
77
+      				{elseif $row.postType=='url'}
78
+              <div class="panel-heading"><a href="{$row.URL}">{$row.Name}</a></div>
79
+              <div class="panel-body">
80
+                <p>{$row.Description}</p>
81
+                {if !$id_post}
82
+                  <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
83
+                {/if}
84
+              </div>
85
+      				{elseif $row.postType=='conversation'}
86
+                <div class="panel-heading">
87
+                  <a href="{$row.Permalink}">{$row.Title}</a>
88
+                </div>
89
+                <div class="panel-body">
90
+                  <pre>
91
+                    {$row.Conversation}
92
+                  </pre>
93
+                  {if !$id_post}
94
+                    <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
95
+                  {/if}
96
+                </div>
97
+      				{elseif $row.postType=='video'}
98
+              <div class="panel-body">
99
+                {$row.Video}
100
+                <p>{$row.Caption}</p>
101
+                {if !$id_post}
102
+                  <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
103
+                {/if}
104
+              </div>
105
+      				{elseif $row.postType=='mp3'}
106
+              <div class="panel-body">
107
+                {$row.Mp3}
108
+                <p>{$row.Caption}</p>
109
+                {if !$id_post}
110
+                  <small>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments"> {$row.Comments_Number} {__("comments")}{/if}</a></small>
111
+                {/if}
112
+              </div>
113
+      				{/if}
114
+            </article>
115
+          {/block}
116
+        </section>
117
+        {if $id_post}
118
+  				{if $row.Comments_Number>0}
119
+  					<div>
120
+  						<h3>{$row.Comments_Number} {__("comments on")} &#8220;{$row.Post_Title}&#8221;</h3>
121
+  						<ol>
122
+  							{block $comments as $comment}
123
+  							<li>
124
+  								<cite>
125
+  									<a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>&nbsp;&nbsp;
126
+  									{$comment.Comment_Author} {__("said")}:
127
+  								</cite>
128
+  								<br />
129
+  								<span class="timestampComment"> {__("at")} {$comment.Date}</span><br /><br />
130
+  								{$comment.Comment}
131
+  								<br /><br />
132
+  							</li>
133
+  							{/block}
134
+  						</ol>
135
+  					</div>
136
+  				{/if}
137
+
138
+  				{if $allowComments}
139
+          <form action="{Form_Action}" method="post" class="form-horizontal" name="commentForm">
140
+            <fieldset>
141
+              <legend>{__("Add your comment")}</legend>
142
+              <div class="form-group">
143
+                <label for="username" class="col-lg-2 control-label">{__("Name:")}</label>
144
+                <div class="col-lg-10">
145
+                  <input type="text" class="form-control" id="username" name="username" value="{whois.User_Cookie}" />
146
+                </div>
147
+              </div>
148
+              <div class="form-group">
149
+                <label for="email" class="col-lg-2 control-label">{__("E-mail:")}</label>
150
+                <div class="col-lg-10">
151
+                  <input type="email" class="form-control" name="email" id="email" value="{whois.Email_Cookie}" />
152
+                </div>
153
+              </div>
154
+              <div class="form-group">
155
+                <label for="web" class="col-lg-2 control-label">{__("Website:")}</label>
156
+                <div class="col-lg-10">
157
+                  <input type="url" class="form-control" name="web" id="web" value="{whois.Web_Cookie}" />
158
+                </div>
159
+              </div>
160
+              <div class="form-group">
161
+                <label for="content" class="col-lg-2 control-label">{__("Comment:")}</label>
162
+                <div class="col-lg-10">
163
+                  <textarea class="form-control" name="content" id="content" rows="10"></textarea>
164
+                  <span class="help-block">{__("Some HTML allowed:")}
165
+                    <code>
166
+                      &lt;blockquote&gt; &lt;code&gt; &lt;em&gt; &lt;strong&gt; &lt;a&gt;
167
+                    </code>
168
+                  </span>
169
+                </div>
170
+              </div>
171
+              <div class="form-group">
172
+                <div class="col-lg-10 col-lg-offset-2">
173
+                  <button type="submit" name="btnAdd" class="btn btn-success">Add comment</button>
174
+                  <input name="id_post" id="id_post" value="{id_post}" type="hidden" />
175
+                  <input name="comment_date" id="comment_date" value="{Date_Added}" type="hidden" />
176
+                </div>
177
+              </div>
178
+            </fieldset>
179
+          </form>
180
+  				{/if}
181
+  			{else}
182
+  				{pagination}
183
+  			{/if}
184
+  		{/if}
185
+      <footer style="text-align:center;margin:20px">
186
+          <a href="{URL_Tumble}/archive.php">{__("Archive")}</a> &nbsp;/&nbsp;
187
+          {__("Subscribe via")} <a href="{URL_Tumble}/rss.php">RSS</a> &nbsp;/&nbsp;
188
+          {__("Powered by")} Sorbet CMS
189
+      </footer>
190
+    </div>
191
+    <script type="text/javascript" src="{URL_Tumble}/admin/scripts/jquery.js"></script>
192
+    <script type="text/javascript" src="{URL_Tumble}/themes/{Template_name}/js/bootstrap.min.js"></script>
193
+		<script type="text/javascript" src="{URL_Tumble}/admin/scripts/lightbox.js"></script>
194
+  </body>
195
+</html>

文件差異過大導致無法顯示
+ 2377 - 0
themes/SorbetLight/js/bootstrap.js


文件差異過大導致無法顯示
+ 7 - 0
themes/SorbetLight/js/bootstrap.min.js


+ 13 - 0
themes/SorbetLight/js/npm.js 查看文件

@@ -0,0 +1,13 @@
1
+// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
2
+require('../../js/transition.js')
3
+require('../../js/alert.js')
4
+require('../../js/button.js')
5
+require('../../js/carousel.js')
6
+require('../../js/collapse.js')
7
+require('../../js/dropdown.js')
8
+require('../../js/modal.js')
9
+require('../../js/tooltip.js')
10
+require('../../js/popover.js')
11
+require('../../js/scrollspy.js')
12
+require('../../js/tab.js')
13
+require('../../js/affix.js')

二進制
themes/tumblr/img/bg.gif 查看文件


二進制
themes/tumblr/img/link.gif 查看文件


二進制
themes/tumblr/img/rss.gif 查看文件


+ 0 - 173
themes/tumblr/index.htm 查看文件

@@ -1,173 +0,0 @@
1
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
-	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
-<head>
5
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6
-	{Sorbet_includes}
7
-	<link rel="stylesheet" type="text/css" href="{URL_Tumble}/themes/{Template_name}/style.css"/>
8
-	<script language="javascript" type="text/javascript" src="{URL_Tumble}/admin/scripts/jquery.js"></script>
9
-	<script language="javascript" type="text/javascript" src="{URL_Tumble}/admin/scripts/lightbox.js"></script>
10
-	<link rel="stylesheet" type="text/css" href="{URL_Tumble}/admin/css/lightbox.css" />
11
-	<link rel="alternate" type="application/rss+xml" title="RSS" href="{rssFeed}" />
12
-    <title>{Page_Title}</title>
13
-    <!--[if IE]>
14
-        <style type="text/css">
15
-            div.post div.quote span.quote big.quote {
16
-                line-height: 40px;
17
-            }
18
-        </style>
19
-    <![endif]-->
20
-</head>
21
-<body>
22
-    <div id="container">
23
-        <a href="{rssFeed}"><img src="{URL_Tumble}/themes/{Template_name}/img/rss.gif" id="rss" alt="RSS" title="RSS" /></a>
24
-
25
-        <h1><a href="{URL_Tumble}/">{Title}</a></h1>
26
-
27
-            <div id="description">
28
-                {Description}
29
-            </div>
30
-
31
-		{if $isAuthenticated}
32
-			<div style="padding:4px; border:solid 2px #bbb; display:inline; background-color:#ddd; position:absolute; top:3px; right:3px;">
33
-				<b>Hi, {User}.</b>&nbsp;&nbsp;
34
-				<a target="_top" href="{URL_Tumble}/admin/index.php">{__("Add or Edit my posts")}</a>&nbsp;&nbsp;
35
-				<a target="_top" href="{URL_Tumble}/admin/close.php">{__("Sign out")}</a>
36
-			</div>
37
-		{else}
38
-			<div style="padding:4px; border:solid 2px #bbb; display:inline; background-color:#ddd; position:absolute; top:3px; right:3px;">
39
-				<b><a target="_top" href="{URL_Tumble}/login.php">{__("Log in")}</a></b>
40
-			</div>
41
-		{/if}
42
-
43
-		{if $error}
44
-			<div class="error">{$error}</div>
45
-		{else}
46
-			{block $rows as $row}
47
-				<div class="date">
48
-					{$row.Date_Added}
49
-				</div>
50
-				<div class="post">
51
-					<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
52
-				{if $row.postType=='post'}
53
-						<div class="regular">
54
-							<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
55
-							{$row.Body}
56
-						</div>
57
-				{elseif $row.postType=='photo'}
58
-						<div class="photo">
59
-							<a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}" /></a><br/>
60
-							<div class="caption">{$row.Caption}</div>
61
-						</div>
62
-				{elseif $row.postType=='quote'}
63
-						<div class="quote">
64
-							<span class="quote"><big class="quote"><a href="{$row.Permalink}">&#147;</a></big> {$row.Quote}</span>
65
-							<div class="source">&mdash; {$row.Source}</div>
66
-						</div>
67
-				{elseif $row.postType=='url'}
68
-						<div class="link">
69
-							&#187; <a href="{$row.URL}">{$row.Name}</a>
70
-							<div class="description">{$row.Description}</div>
71
-						</div>
72
-				{elseif $row.postType=='conversation'}
73
-						<div class="conversation">
74
-							...<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
75
-							{$row.Conversation}
76
-						</div>
77
-				{elseif $row.postType=='video'}
78
-						<div class="video">
79
-							{$row.Video}
80
-							<div class="caption">{$row.Caption}</div>
81
-						</div>
82
-				{elseif $row.postType=='mp3'}
83
-						<div class="video">
84
-							{$row.Mp3}
85
-							<div class="caption">{$row.Caption}</div>
86
-						</div>
87
-				{/if}
88
-				</div>
89
-				{if !$id_post}
90
-					<div class="totalComments">
91
-						<h3>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments">( {$row.Comments_Number} ) {__("comments")}{/if}</a></h3>
92
-					</div>
93
-				{/if}
94
-			{/block}
95
-
96
-			{if $id_post}
97
-				{if $row.Comments_Number>0}
98
-					<div class="containerComments">
99
-						<h3 id="comments">{$row.Comments_Number} {__("answers to")} &#8220;{$row.Post_Title}&#8221;</h3>
100
-						<ol class="commentlist">
101
-							{block $comments as $comment}
102
-							<li class="alt" id="comment-{$comment.Id_Comment}">
103
-								<cite>
104
-									<a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>&nbsp;&nbsp;
105
-									{$comment.Comment_Author} {__("said")}:
106
-								</cite>
107
-								<br />
108
-								<span class="timestampComment"> {__("at")} {$comment.Date}</span><br /><br />
109
-								{$comment.Comment}
110
-								<br /><br />
111
-							</li>
112
-							{/block}
113
-						</ol>
114
-					</div>
115
-				{/if}
116
-
117
-				{if $allowComments}
118
-					<div class="containerFormComments">
119
-						<h3 id="respond">{__("Add your comment")}</h3>
120
-
121
-						<form action="{Form_Action}" method="post" name="commentForm" id="commentForm">
122
-							<p>
123
-								<label for="username">
124
-									<small>{__("Name:")}</small>
125
-								</label>
126
-								<input name="username" id="username" value="{whois.User_Cookie}" size="22" tabindex="1" type="text" />
127
-							</p>
128
-							<p>
129
-								<label for="email">
130
-									<small>{__("E-mail:")}</small>
131
-								</label>
132
-								<input name="email" id="email" value="{whois.Email_Cookie}" size="22" tabindex="2" type="text" />
133
-							</p>
134
-							<p>
135
-								<label for="web">
136
-									<small>{__("Website:")}</small>
137
-								</label>
138
-								<input name="web" id="web" value="{whois.Web_Cookie}" size="22" tabindex="3" type="text" />
139
-							</p>
140
-							<p>
141
-								<textarea name="content" id="content" cols="100" rows="10" tabindex="4"></textarea>
142
-							</p>
143
-							<p>
144
-								<span style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;">
145
-			                    	{__("Some HTML allowed:")}<br />
146
-			                        &nbsp;&nbsp;&nbsp;&nbsp;
147
-			                        <code>
148
-			                            &lt;blockquote&gt; &lt;code&gt; &lt;em&gt; &lt;strong&gt; &lt;a&gt;
149
-			                        </code>
150
-			                	</span>
151
-			                </p>
152
-					  		<p>
153
-								<input type="submit" value="Add comment" name="btnAdd" id="btnAdd" tabindex="5" />
154
-							</p>
155
-							<p>
156
-								<input name="id_post" id="id_post" value="{id_post}" type="hidden" />
157
-								<input name="comment_date" id="comment_date" value="{Date_Added}" type="hidden" />
158
-							</p>
159
-						</form>
160
-					</div>
161
-				{/if}
162
-			{else}
163
-				{pagination}
164
-			{/if}
165
-		{/if}
166
-	</div>
167
-	<div id="footer">
168
-    	<a href="{URL_Tumble}/archive.php">{__("archive")}</a> &nbsp;/&nbsp;
169
-		{__("subscribe via")} <a href="{URL_Tumble}/rss.php">rss</a> &nbsp;/&nbsp;
170
-		{__("powered by")} sorbet cms
171
-	</div>
172
-</body>
173
-</html>

文件差異過大導致無法顯示
+ 0 - 1
themes/tumblr/style.css