Files
rockowa.com/templates/article-entry.php
2023-05-08 09:03:09 +02:00

43 lines
1.2 KiB
PHP

<?
global $lang;
if ( isset( $this -> _articles ) && is_array( $this -> _articles ) ) foreach ( $this -> _articles as $art )
{
if ( $art -> get_seo_link() )
$link = $art -> get_seo_link();
else
$link = 'a,' . $art -> get_id() . ',' . \System::seo( $art -> get_title() );
?>
<div class='article_entry'>
<?
if ( $art -> get_show_title() )
{
?><div class='article_title'><a><?=stripslashes( $art -> get_title() );?></a></div><?
}
if ( $art -> getImg() )
{
?>
<div class="article_img">
<div style="background: url( 'resources/thumber.php?img=<?=$art -> getImg();?>&h=150&w=250' ) no-repeat center;"></div>
</div>
<?
}
if ( $art -> get_show_date() )
{
?><div class='article_date'><?=date( 'H:i d/m/Y', strtotime( $art -> get_date_add() ) );?></div><?
}
?>
<div style="text-align: justify;">
<?
$text = $art -> getModifyText( true );
echo mb_substr( strip_tags( $text ) , 0 , 500 , 'UTF-8' );
if ( strlen( $text ) > 500 )
echo '...';
?>
</div>
<a href="<?=$link;?>" class='article_more'><?=$lang -> getTrans( 'T_WIECEJ' );?></a>
<p style='clear:both'></p>
</div>
<?
}
?>