fixed a bug when no posts.
parent
d4f4e72049
commit
f976025030
|
|
@ -200,7 +200,7 @@ $theme = new themes;
|
||||||
|
|
||||||
$theme->set('pagination',$p->getPagination());
|
$theme->set('pagination',$p->getPagination());
|
||||||
} else {
|
} else {
|
||||||
$template->renderizaEtiqueta("No posts in this tumblelog.", "div","error");
|
$theme->set('error','No posts in this tumblelog.');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$register = $tumble->getPost($id_post);
|
$register = $tumble->getPost($id_post);
|
||||||
|
|
|
||||||
|
|
@ -30,133 +30,136 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{block {$rows} as {$row}}
|
{if {$error}}
|
||||||
<div class="date">
|
<div class="error">{$error}</div>
|
||||||
{$row.Date_Added}
|
{else}
|
||||||
|
{block {$rows} as {$row}}
|
||||||
|
<div class="date">
|
||||||
|
{$row.Date_Added}
|
||||||
|
</div>
|
||||||
|
{if {$postType}==1}
|
||||||
|
<div class="post">
|
||||||
|
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
||||||
|
|
||||||
|
<div class="regular">
|
||||||
|
<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
|
||||||
|
{$row.Body}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{elseif {$postType}==2}
|
||||||
|
<div class="post">
|
||||||
|
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
||||||
|
<div class="photo">
|
||||||
|
<a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}" /></a><br/>
|
||||||
|
<div class="caption">{$row.Caption}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{elseif {$postType}==3}
|
||||||
|
<div class="post">
|
||||||
|
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
||||||
|
<div class="quote">
|
||||||
|
<span class="quote"><big class="quote"><a href="{$row.Permalink}">“</a></big> {$row.Quote}</span>
|
||||||
|
<div class="source">— {$row.Source}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{elseif {$postType}==4}
|
||||||
|
<div class="post">
|
||||||
|
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
||||||
|
<div class="link">
|
||||||
|
» <a href="{$row.URL}">{$row.Name}</a>
|
||||||
|
<div class="description">{$row.Description}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{elseif {$postType}==5}
|
||||||
|
<div class="post">
|
||||||
|
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
||||||
|
<div class="conversation">
|
||||||
|
...<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
|
||||||
|
{$row.Conversation}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{elseif {$postType}==6}
|
||||||
|
<div class="post">
|
||||||
|
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
||||||
|
<div class="video">
|
||||||
|
{$row.Video}
|
||||||
|
<div class="caption">{$row.Caption}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{elseif {$postType}==7}
|
||||||
|
<div class="post">
|
||||||
|
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
||||||
|
<div class="video">
|
||||||
|
{$row.Mp3}
|
||||||
|
<div class="caption">{$row.Caption}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
<div class="totalComments">
|
||||||
|
<h3>Posted by {$row.User} - <a href="{$row.Permalink}#comments">( {$row.Comments_Number} ) comments</a></h3>
|
||||||
</div>
|
</div>
|
||||||
{if {$postType}==1}
|
{/block}
|
||||||
<div class="post">
|
|
||||||
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
|
||||||
|
|
||||||
<div class="regular">
|
{if {$id_post}}
|
||||||
<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
|
<div class="containerComments">
|
||||||
{$row.Body}
|
<h3 id="comments">{$row.Comments_Number} answers to “{$row.Post_Title}”</h3>
|
||||||
</div>
|
<ol class="commentlist">
|
||||||
</div>
|
{block {$comments} as {$comment}}
|
||||||
{elseif {$postType}==2}
|
<li class="alt" id="comment-{$comment.Id_Comment}">
|
||||||
<div class="post">
|
<cite>
|
||||||
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
<a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>
|
||||||
<div class="photo">
|
{$comment.Comment_Author} said:
|
||||||
<a {$row.Effect}><img src="{$row.PhotoURL}" alt="{$row.PhotoAlt}" /></a><br/>
|
</cite>
|
||||||
<div class="caption">{$row.Caption}</div>
|
<br />
|
||||||
</div>
|
<span class="timestampComment"> at {$comment.Date}</span><br /><br />
|
||||||
</div>
|
{$comment.Comment}
|
||||||
{elseif {$postType}==3}
|
<br /><br />
|
||||||
<div class="post">
|
</li>
|
||||||
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
{/block}
|
||||||
<div class="quote">
|
</ol>
|
||||||
<span class="quote"><big class="quote"><a href="{$row.Permalink}">“</a></big> {$row.Quote}</span>
|
</div>
|
||||||
<div class="source">— {$row.Source}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{elseif {$postType}==4}
|
|
||||||
<div class="post">
|
|
||||||
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
|
||||||
<div class="link">
|
|
||||||
» <a href="{$row.URL}">{$row.Name}</a>
|
|
||||||
<div class="description">{$row.Description}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{elseif {$postType}==5}
|
|
||||||
<div class="post">
|
|
||||||
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
|
||||||
<div class="conversation">
|
|
||||||
...<h2><a href="{$row.Permalink}">{$row.Title}</a></h2>
|
|
||||||
{$row.Conversation}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{elseif {$postType}==6}
|
|
||||||
<div class="post">
|
|
||||||
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
|
||||||
<div class="video">
|
|
||||||
{$row.Video}
|
|
||||||
<div class="caption">{$row.Caption}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{elseif {$postType}==7}
|
|
||||||
<div class="post">
|
|
||||||
<a href="{$row.Permalink}"><img src="{URL_Tumble}/themes/tumblr/img/link.gif" class="permalink" alt="Permalink"/></a>
|
|
||||||
<div class="video">
|
|
||||||
{$row.Mp3}
|
|
||||||
<div class="caption">{$row.Caption}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
<div class="totalComments">
|
<div class="containerFormComments">
|
||||||
<h3>Posted by {$row.User} - <a href="{$row.Permalink}#comments">( {$row.Comments_Number} ) comments</a></h3>
|
<h3 id="respond">Add your comment</h3>
|
||||||
|
|
||||||
|
<form action="{Form_Action}" method="post" name="commentForm" id="commentForm">
|
||||||
|
<p>
|
||||||
|
<label for="username">
|
||||||
|
<small>Name:</small>
|
||||||
|
</label>
|
||||||
|
<input name="username" id="username" value="{whois.User_Cookie}" size="22" tabindex="1" type="text" />
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label for="email">
|
||||||
|
<small>E-mail:</small>
|
||||||
|
</label>
|
||||||
|
<input name="email" id="email" value="{whois.Email_Cookie}" size="22" tabindex="2" type="text" />
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label for="web">
|
||||||
|
<small>Website:</small>
|
||||||
|
</label>
|
||||||
|
<input name="web" id="web" value="{whois.Web_Cookie}" size="22" tabindex="3" type="text" />
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<textarea name="content" id="content" cols="100" rows="10" tabindex="4"></textarea>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<span style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;"><a href="http://hobix.com/textile/">Textile</a> syntax is supported.</span>
|
||||||
|
<p>
|
||||||
|
<input type="submit" value="Add comment" name="btnAdd" id="btnAdd" tabindex="5" />
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<input name="id_post" id="id_post" value="{id_post}" type="hidden" />
|
||||||
|
<input name="comment_date" id="comment_date" value="{Date_Added}" type="hidden" />
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{else}
|
||||||
|
{pagination}
|
||||||
{if {$id_post}}
|
{/if}
|
||||||
<div class="containerComments">
|
|
||||||
<h3 id="comments">{$row.Comments_Number} answers to “{$row.Post_Title}”</h3>
|
|
||||||
<ol class="commentlist">
|
|
||||||
{block {$comments} as {$comment}}
|
|
||||||
<li class="alt" id="comment-{$comment.Id_Comment}">
|
|
||||||
<cite>
|
|
||||||
<a href="#comment-{$comment.Id_Comment}" title="Comment permalink">#</a>
|
|
||||||
{$comment.Comment_Author} said:
|
|
||||||
</cite>
|
|
||||||
<br />
|
|
||||||
<span class="timestampComment"> at {$comment.Date}</span><br /><br />
|
|
||||||
{$comment.Comment}
|
|
||||||
<br /><br />
|
|
||||||
</li>
|
|
||||||
{/block}
|
|
||||||
</ol>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="containerFormComments">
|
|
||||||
<h3 id="respond">Add your comment</h3>
|
|
||||||
|
|
||||||
<form action="{Form_Action}" method="post" name="commentForm" id="commentForm">
|
|
||||||
<p>
|
|
||||||
<label for="username">
|
|
||||||
<small>Name:</small>
|
|
||||||
</label>
|
|
||||||
<input name="username" id="username" value="{whois.User_Cookie}" size="22" tabindex="1" type="text" />
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<label for="email">
|
|
||||||
<small>E-mail:</small>
|
|
||||||
</label>
|
|
||||||
<input name="email" id="email" value="{whois.Email_Cookie}" size="22" tabindex="2" type="text" />
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<label for="web">
|
|
||||||
<small>Website:</small>
|
|
||||||
</label>
|
|
||||||
<input name="web" id="web" value="{whois.Web_Cookie}" size="22" tabindex="3" type="text" />
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<textarea name="content" id="content" cols="100" rows="10" tabindex="4"></textarea>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<span style="color: rgb(136, 136, 136); margin-bottom: 10px; font-size: 10px;"><a href="http://hobix.com/textile/">Textile</a> syntax is supported.</span>
|
|
||||||
<p>
|
|
||||||
<input type="submit" value="Add comment" name="btnAdd" id="btnAdd" tabindex="5" />
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<input name="id_post" id="id_post" value="{id_post}" type="hidden" />
|
|
||||||
<input name="comment_date" id="comment_date" value="{Date_Added}" type="hidden" />
|
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
{else}
|
|
||||||
{pagination}
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
subscribe via <a href="{URL_Tumble}/rss.php">rss</a> /
|
subscribe via <a href="{URL_Tumble}/rss.php">rss</a> /
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue