Browse Source

* Changes on class themes.

Victor De la Rocha 16 years ago
parent
commit
756faf3220
5 changed files with 108 additions and 86 deletions
  1. 24 24
      admin/themes/admin/index.htm
  2. 49 27
      classes/themes.class.php
  3. 2 2
      index.php
  4. 16 16
      themes/Dreamscape/index.htm
  5. 17 17
      themes/tumblr/index.htm

File diff suppressed because it is too large
+ 24 - 24
admin/themes/admin/index.htm


File diff suppressed because it is too large
+ 49 - 27
classes/themes.class.php


+ 2 - 2
index.php View File

312
 				$theme->set('rows',$rows);
312
 				$theme->set('rows',$rows);
313
         }
313
         }
314
 
314
 
315
-		$theme->set('URL_Tumble',$conf->urlGelato);
315
+		$theme->set('URL_Tumble',$conf->urlGelato);
316
 		$theme->display(Absolute_Path.'themes/'.$conf->template.'/index.htm');
316
 		$theme->display(Absolute_Path.'themes/'.$conf->template.'/index.htm');
317
-?>
317
+?>

+ 16 - 16
themes/Dreamscape/index.htm View File

48
             <div id="description">
48
             <div id="description">
49
                 {Description}
49
                 {Description}
50
             </div>
50
             </div>
51
-			{if {$error}}
51
+			{if $error}
52
 				<div class="error">{$error}</div>
52
 				<div class="error">{$error}</div>
53
 			{else}
53
 			{else}
54
-				{block {$rows} as {$row}}
54
+				{block $rows as $row}
55
 					<div class="post">
55
 					<div class="post">
56
 						<div class="permalink"><a href="{$row.Permalink}">•</a></div>
56
 						<div class="permalink"><a href="{$row.Permalink}">•</a></div>
57
 						<div class="date">
57
 						<div class="date">
58
 							{$row.Date_Added}
58
 							{$row.Date_Added}
59
 						</div>
59
 						</div>
60
 
60
 
61
-					{if {$row.postType}=='post'}
61
+					{if $row.postType=='post'}
62
 						<div class="regular">
62
 						<div class="regular">
63
 							<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
63
 							<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
64
 							{$row.Body}
64
 							{$row.Body}
65
 						</div>
65
 						</div>
66
-					{elseif {$row.postType}=='photo'}
66
+					{elseif $row.postType=='photo'}
67
 						<div class="photo">
67
 						<div class="photo">
68
 							<a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}"></a>
68
 							<a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}"></a>
69
 							<div class="caption">
69
 							<div class="caption">
70
 								{$row.Caption}
70
 								{$row.Caption}
71
 							</div>
71
 							</div>
72
 						</div>
72
 						</div>
73
-					{elseif {$row.postType}=='quote'}
73
+					{elseif $row.postType=='quote'}
74
 						<div class="quote">
74
 						<div class="quote">
75
 							<span class="quote">
75
 							<span class="quote">
76
 								<big class="quote">“</big> <a href="{$row.Permalink}">{$row.Quote}</a>
76
 								<big class="quote">“</big> <a href="{$row.Permalink}">{$row.Quote}</a>
77
 							</span>
77
 							</span>
78
 							<span class="source">{$row.Source}</span>
78
 							<span class="source">{$row.Source}</span>
79
 						</div>
79
 						</div>
80
-					{elseif {$row.postType}=='url'}
80
+					{elseif $row.postType=='url'}
81
 	                    <div class="link">
81
 	                    <div class="link">
82
 		                    <a href="{$row.URL}" class="link" >{$row.Name}</a>
82
 		                    <a href="{$row.URL}" class="link" >{$row.Name}</a>
83
 	                        <div class="description">{$row.Description}</div>
83
 	                        <div class="description">{$row.Description}</div>
84
 	                    </div>
84
 	                    </div>
85
-					{elseif {$row.postType}=='conversation'}
85
+					{elseif $row.postType=='conversation'}
86
 						<div class="conversation">
86
 						<div class="conversation">
87
 							...<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
87
 							...<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
88
 							{$row.Conversation}
88
 							{$row.Conversation}
89
 						</div>
89
 						</div>
90
-					{elseif {$row.postType}=='video'}
90
+					{elseif $row.postType=='video'}
91
 						<div class="video">
91
 						<div class="video">
92
 							{$row.Video}
92
 							{$row.Video}
93
 							<div class="caption">{$row.Caption}</div>
93
 							<div class="caption">{$row.Caption}</div>
94
 						</div>
94
 						</div>
95
-					{elseif {$row.postType}=='mp3'}
95
+					{elseif $row.postType=='mp3'}
96
 						<div class="video">
96
 						<div class="video">
97
 							{$row.Mp3}
97
 							{$row.Mp3}
98
 							<div class="caption">{$row.Caption}</div>
98
 							<div class="caption">{$row.Caption}</div>
99
 						</div>
99
 						</div>
100
 					{/if}
100
 					{/if}
101
 					</div>
101
 					</div>
102
-					{if !{$id_post}}
102
+					{if !$id_post}
103
 						<div class="totalComments">
103
 						<div class="totalComments">
104
-							<h3>{__("Posted by")} {$row.User} {if {$allowComments}}- <a href="{$row.Permalink}#comments">( {$row.Comments_Number} ) {__("comments")}{/if}</a></h3>
104
+							<h3>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments">( {$row.Comments_Number} ) {__("comments")}{/if}</a></h3>
105
 						</div>
105
 						</div>
106
 					{/if}
106
 					{/if}
107
 				{/block}
107
 				{/block}
108
 
108
 
109
-				{if {$id_post}}
110
-					{if {$row.Comments_Number}>0}
109
+				{if $id_post}
110
+					{if $row.Comments_Number>0}
111
 						<div class="containerComments">
111
 						<div class="containerComments">
112
 							<h3 id="comments">{$row.Comments_Number} {__("answers to")} &#8220;{$row.Post_Title}&#8221;</h3>
112
 							<h3 id="comments">{$row.Comments_Number} {__("answers to")} &#8220;{$row.Post_Title}&#8221;</h3>
113
 							<ol class="commentlist">
113
 							<ol class="commentlist">
114
-								{block {$comments} as {$comment}}
114
+								{block $comments as $comment}
115
 								<li class="alt" id="comment-{$comment.Id_Comment}">
115
 								<li class="alt" id="comment-{$comment.Id_Comment}">
116
 									<cite>
116
 									<cite>
117
 										<a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>&nbsp;&nbsp;
117
 										<a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>&nbsp;&nbsp;
127
 						</div>
127
 						</div>
128
 					{/if}
128
 					{/if}
129
 
129
 
130
-					{if {$allowComments}}
130
+					{if $allowComments}
131
 						<div class="containerFormComments">
131
 						<div class="containerFormComments">
132
 							<h3 id="respond">{__("Add your comment")}</h3>
132
 							<h3 id="respond">{__("Add your comment")}</h3>
133
 
133
 
185
         </div>
185
         </div>
186
 
186
 
187
 	</body>
187
 	</body>
188
-</html>
188
+</html>

+ 17 - 17
themes/tumblr/index.htm View File

28
                 {Description}
28
                 {Description}
29
             </div>
29
             </div>
30
 
30
 
31
-		{if {$isAuthenticated}}
31
+		{if $isAuthenticated}
32
 			<div style="padding:4px; border:solid 2px #bbb; display:inline; background-color:#ddd; position:absolute; top:3px; right:3px;">
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;
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;
34
 				<a target="_top" href="{URL_Tumble}/admin/index.php">{__("Add or Edit my posts")}</a>&nbsp;&nbsp;
36
 			</div>
36
 			</div>
37
 		{/if}
37
 		{/if}
38
 
38
 
39
-		{if {$error}}
39
+		{if $error}
40
 			<div class="error">{$error}</div>
40
 			<div class="error">{$error}</div>
41
 		{else}
41
 		{else}
42
-			{block {$rows} as {$row}}
42
+			{block $rows as $row}
43
 				<div class="date">
43
 				<div class="date">
44
 					{$row.Date_Added}
44
 					{$row.Date_Added}
45
 				</div>
45
 				</div>
46
 				<div class="post">
46
 				<div class="post">
47
 					<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
47
 					<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
48
-				{if {$row.postType}=='post'}
48
+				{if $row.postType=='post'}
49
 						<div class="regular">
49
 						<div class="regular">
50
 							<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
50
 							<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
51
 							{$row.Body}
51
 							{$row.Body}
52
 						</div>
52
 						</div>
53
-				{elseif {$row.postType}=='photo'}
53
+				{elseif $row.postType=='photo'}
54
 						<div class="photo">
54
 						<div class="photo">
55
 							<a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}" /></a><br/>
55
 							<a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}" /></a><br/>
56
 							<div class="caption">{$row.Caption}</div>
56
 							<div class="caption">{$row.Caption}</div>
57
 						</div>
57
 						</div>
58
-				{elseif {$row.postType}=='quote'}
58
+				{elseif $row.postType=='quote'}
59
 						<div class="quote">
59
 						<div class="quote">
60
 							<span class="quote"><big class="quote"><a href="{$row.Permalink}">&#147;</a></big> {$row.Quote}</span>
60
 							<span class="quote"><big class="quote"><a href="{$row.Permalink}">&#147;</a></big> {$row.Quote}</span>
61
 							<div class="source">&mdash; {$row.Source}</div>
61
 							<div class="source">&mdash; {$row.Source}</div>
62
 						</div>
62
 						</div>
63
-				{elseif {$row.postType}=='url'}
63
+				{elseif $row.postType=='url'}
64
 						<div class="link">
64
 						<div class="link">
65
 							&#187; <a href="{$row.URL}">{$row.Name}</a>
65
 							&#187; <a href="{$row.URL}">{$row.Name}</a>
66
 							<div class="description">{$row.Description}</div>
66
 							<div class="description">{$row.Description}</div>
67
 						</div>
67
 						</div>
68
-				{elseif {$row.postType}=='conversation'}
68
+				{elseif $row.postType=='conversation'}
69
 						<div class="conversation">
69
 						<div class="conversation">
70
 							...<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
70
 							...<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
71
 							{$row.Conversation}
71
 							{$row.Conversation}
72
 						</div>
72
 						</div>
73
-				{elseif {$row.postType}=='video'}
73
+				{elseif $row.postType=='video'}
74
 						<div class="video">
74
 						<div class="video">
75
 							{$row.Video}
75
 							{$row.Video}
76
 							<div class="caption">{$row.Caption}</div>
76
 							<div class="caption">{$row.Caption}</div>
77
 						</div>
77
 						</div>
78
-				{elseif {$row.postType}=='mp3'}
78
+				{elseif $row.postType=='mp3'}
79
 						<div class="video">
79
 						<div class="video">
80
 							{$row.Mp3}
80
 							{$row.Mp3}
81
 							<div class="caption">{$row.Caption}</div>
81
 							<div class="caption">{$row.Caption}</div>
82
 						</div>
82
 						</div>
83
 				{/if}
83
 				{/if}
84
 				</div>
84
 				</div>
85
-				{if !{$id_post}}
85
+				{if !$id_post}
86
 					<div class="totalComments">
86
 					<div class="totalComments">
87
-						<h3>{__("Posted by")} {$row.User} {if {$allowComments}}- <a href="{$row.Permalink}#comments">( {$row.Comments_Number} ) {__("comments")}{/if}</a></h3>
87
+						<h3>{__("Posted by")} {$row.User} {if $allowComments}- <a href="{$row.Permalink}#comments">( {$row.Comments_Number} ) {__("comments")}{/if}</a></h3>
88
 					</div>
88
 					</div>
89
 				{/if}
89
 				{/if}
90
 			{/block}
90
 			{/block}
91
 
91
 
92
-			{if {$id_post}}
93
-				{if {$row.Comments_Number}>0}
92
+			{if $id_post}
93
+				{if $row.Comments_Number>0}
94
 					<div class="containerComments">
94
 					<div class="containerComments">
95
 						<h3 id="comments">{$row.Comments_Number} {__("answers to")} &#8220;{$row.Post_Title}&#8221;</h3>
95
 						<h3 id="comments">{$row.Comments_Number} {__("answers to")} &#8220;{$row.Post_Title}&#8221;</h3>
96
 						<ol class="commentlist">
96
 						<ol class="commentlist">
97
-							{block {$comments} as {$comment}}
97
+							{block $comments as $comment}
98
 							<li class="alt" id="comment-{$comment.Id_Comment}">
98
 							<li class="alt" id="comment-{$comment.Id_Comment}">
99
 								<cite>
99
 								<cite>
100
 									<a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>&nbsp;&nbsp;
100
 									<a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>&nbsp;&nbsp;
110
 					</div>
110
 					</div>
111
 				{/if}
111
 				{/if}
112
 
112
 
113
-				{if {$allowComments}}
113
+				{if $allowComments}
114
 					<div class="containerFormComments">
114
 					<div class="containerFormComments">
115
 						<h3 id="respond">{__("Add your comment")}</h3>
115
 						<h3 id="respond">{__("Add your comment")}</h3>
116
 
116
 
165
 		{__("powered by")} <a href="http://www.gelatocms.com/">gelato cms</a>
165
 		{__("powered by")} <a href="http://www.gelatocms.com/">gelato cms</a>
166
 	</div>
166
 	</div>
167
 </body>
167
 </body>
168
-</html>
168
+</html>