2 Commits 31ec02e169 ... 47a93b6ea7

Autor SHA1 Mensaje Fecha
  richard 47a93b6ea7 Correction of current source code URL in footer hace 6 meses
  richard 4c2350f740 Also change date format when inside a specific post hace 6 meses
Se han modificado 2 ficheros con 174 adiciones y 1 borrados
  1. 1 1
      index.php
  2. 173 0
      themes/tumblr/index.htm

+ 1 - 1
index.php Ver fichero

@@ -208,7 +208,7 @@ $util_class = new util();
208 208
         } else {
209 209
             $register = $tumble->getPost($id_post);
210 210
 
211
-            $formatedDate = gmdate("M d", strtotime($register["date"]) + $util_class->transform_offset($conf->offsetTime));
211
+            $formatedDate = gmdate("M d Y", strtotime($register["date"]) + $util_class->transform_offset($conf->offsetTime));
212 212
             $permalink = $tumble->getPermalink($register["id_post"]);
213 213
 
214 214
             $conversation = $register["description"];

+ 173 - 0
themes/tumblr/index.htm Ver fichero

@@ -0,0 +1,173 @@
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}" width="100%" /></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")} <a href="https://git.pagelibre.org/richard/sorbetcms">Sorbet CMS</a>
171
+	</div>
172
+</body>
173
+</html>