{** * Simple blog template * Date: 10.10.08 * * @package saurus4 * * @author Saurus * *}
{if $current_class == 'section'} {* year and month to from where to display articles *} {if $smarty.get.year} {* from request *} {assign var="year" value=$smarty.get.year|@intval} {/if} {if $smarty.get.month} {* from request *} {assign var="month" value=$smarty.get.month|@intval} {/if} {* / year and month to display *} {/if} {* blog entries parent section *} {if $current_class == 'section'} {init_object name="blog"} {assign var="blog_href" value=$blog->href} {assign var="blog_parent_id" value=$id} {else} {init_object name="blog_entry"} {init_object name="blog" id=$blog_entry->parent_id} {assign var="blog_parent_id" value=$blog_entry->parent_id} {assign var="blog_href" value=$blog->href} {/if} {******* blog sidebar *********}
{********** / blog side bar *********} {******** Blog list *********} {if $current_class == 'section'}
{if $month || $year} {if $month} {init_articles name="articles" parent=$blog_parent_id where="year(aeg) = '`$year`' and month(aeg) = '`$month`'" order="date desc" on_create="allow_comments" buttons="new,edit,hide,delete"} {else} {init_articles name="articles" parent=$blog_parent_id where="year(aeg) = '`$year`'" order="date desc" on_create="allow_comments" buttons="new,edit,hide,delete"} {/if} {else} {init_articles name="articles" parent=$blog_parent_id start=0 limit=10 order="date desc" on_create="allow_comments" buttons="new,edit,hide,delete"} {/if} {$articles_newbutton} {foreach from=$articles item="article" name="articles_loop"}

{$article->buttons}{if $article->show_headline}{$article->title}{/if}

{$article->fdate|mysql_date_to_string}{if $article->author} | {$article->author}{/if}{if $article->comment_count} | {sysword word="comments" type="saurus4"} ({$article->comment_count}){/if}{if $conf.allow_commenting && $article->forum_allowed && !($conf.only_regusers_comment && !$user)} | {sysword word="add comment" type="saurus4"}{/if}
{init_article name="art" id=$article->id} {if $art->lead && $art->body} {$art->lead} {* Read More link *} {sysword word="More" type="Visual Design"} {else} {$art->lead} {$art->body} {/if} {/foreach}
{else} {******** single entry *********}
{init_article name="article" id=$id buttons="new,edit,hide,delete"}

{$article->buttons}{if $article->show_headline}{$article->title}{/if}

{$article->fdate|mysql_date_to_string}{if $article->author} | {$article->author}{/if}{if $article->comment_count} | {sysword word="comments" type="saurus4"} ({$article->comment_count}){/if}{if $conf.allow_commenting && $article->forum_allowed && !($conf.only_regusers_comment && !$user)} | {sysword word="add comment" type="saurus4"}{/if}

{if $article->lead}{$article->lead} {/if}{$article->body}

{* Article comments *}
{init_messages name="messages" parent=$id order="objekt_id asc"} {if $messages|@sizeof}

{sysword word="comments" type="saurus4"}

{/if} {foreach from=$messages item="message"} {/foreach}
{$message->buttons}{$message->author} {$message->date}

{$message->body|parse_emoticons|parse_html}

{if $conf.allow_commenting && $article->forum_allowed && !($conf.only_regusers_comment && !$user)}
{* New comment form *} {literal} {/literal}

{sysword word="new comment" type="saurus4"}

{*** CAPTCHA ***} {if $conf.check_for_captcha} {/if} {*** //CAPTCHA ***}
*
{* /New comment form *} {* for CAPTCHA failure notice *} {if $smarty.get.lisa_alert == 2} {/if} {* /for CAPTCHA failure notice *} {if !$smarty.get.lisa_alert && session_destroy('scms_last_comment')}{/if}
{/if}{*** comment form ****} {/if}{*** end single entry ****}