From f976025030ad3a6522560007f47c743729baf1ca Mon Sep 17 00:00:00 2001 From: Victor De la Rocha Date: Sat, 25 Oct 2008 17:45:54 +0000 Subject: [PATCH] fixed a bug when no posts. --- index.php | 2 +- themes/tumblr/index.htm | 247 ++++++++++++++++++++-------------------- 2 files changed, 126 insertions(+), 123 deletions(-) diff --git a/index.php b/index.php index fac91a7..857c939 100644 --- a/index.php +++ b/index.php @@ -200,7 +200,7 @@ $theme = new themes; $theme->set('pagination',$p->getPagination()); } else { - $template->renderizaEtiqueta("No posts in this tumblelog.", "div","error"); + $theme->set('error','No posts in this tumblelog.'); } } else { $register = $tumble->getPost($id_post); diff --git a/themes/tumblr/index.htm b/themes/tumblr/index.htm index 41941a0..146eb11 100644 --- a/themes/tumblr/index.htm +++ b/themes/tumblr/index.htm @@ -30,133 +30,136 @@ {/if} - {block {$rows} as {$row}} -
- {$row.Date_Added} + {if {$error}} +
{$error}
+ {else} + {block {$rows} as {$row}} +
+ {$row.Date_Added} +
+ {if {$postType}==1} +
+ Permalink + +
+

{$row.Title}

+ {$row.Body} +
+
+ {elseif {$postType}==2} +
+ Permalink +
+ {$row.PhotoAlt}
+
{$row.Caption}
+
+
+ {elseif {$postType}==3} +
+ Permalink +
+ “ {$row.Quote} +
— {$row.Source}
+
+
+ {elseif {$postType}==4} +
+ Permalink + +
+ {elseif {$postType}==5} +
+ Permalink +
+ ...

{$row.Title}

+ {$row.Conversation} +
+
+ {elseif {$postType}==6} +
+ Permalink +
+ {$row.Video} +
{$row.Caption}
+
+
+ {elseif {$postType}==7} +
+ Permalink +
+ {$row.Mp3} +
{$row.Caption}
+
+
+ {/if} + +
+

Posted by {$row.User} - ( {$row.Comments_Number} ) comments

- {if {$postType}==1} -
- Permalink + {/block} -
-

{$row.Title}

- {$row.Body} -
-
- {elseif {$postType}==2} -
- Permalink -
- {$row.PhotoAlt}
-
{$row.Caption}
-
-
- {elseif {$postType}==3} -
- Permalink -
- “ {$row.Quote} -
— {$row.Source}
-
-
- {elseif {$postType}==4} -
- Permalink - -
- {elseif {$postType}==5} -
- Permalink -
- ...

{$row.Title}

- {$row.Conversation} -
-
- {elseif {$postType}==6} -
- Permalink -
- {$row.Video} -
{$row.Caption}
-
-
- {elseif {$postType}==7} -
- Permalink -
- {$row.Mp3} -
{$row.Caption}
-
-
- {/if} + {if {$id_post}} +
+

{$row.Comments_Number} answers to “{$row.Post_Title}”

+
    + {block {$comments} as {$comment}} +
  1. + + #   + {$comment.Comment_Author} said: + +
    + at {$comment.Date}

    + {$comment.Comment} +

    +
  2. + {/block} +
+
-
-

Posted by {$row.User} - ( {$row.Comments_Number} ) comments

+
+

Add your comment

+ +
+

+ + +

+

+ + +

+

+ + +

+

+ +

+

+ Textile syntax is supported. +

+ +

+

+ + +

+
- {/block} - - {if {$id_post}} -
-

{$row.Comments_Number} answers to “{$row.Post_Title}”

-
    - {block {$comments} as {$comment}} -
  1. - - #   - {$comment.Comment_Author} said: - -
    - at {$comment.Date}

    - {$comment.Comment} -

    -
  2. - {/block} -
-
- -
-

Add your comment

- -
-

- - -

-

- - -

-

- - -

-

- -

-

- Textile syntax is supported. -

- -

-

- - -

-
-
- {else} - {pagination} + {else} + {pagination} + {/if} {/if} -