$this -> article['language']['seo_link'] ? $url = $this -> article['language']['seo_link'] : $url = 'a-' . $this -> article['id'] . '-' . \S::seo( $this -> article['language']['title'] );
if ( $this -> article['show_title'] )
echo '
' . $this -> article['language']['title'] . '
';
if ( $this -> article['social_icons'] ):
?>
endif;
if ( $this -> article['show_date_add'] )
echo '
' . ucfirst( $lang['data-dodania'] ) . ': ' . date( 'H:i d/m/Y', strtotime( $this -> article['date_add'] ) ) . '
';
if ( $this -> article['show_date_modify'] )
echo '
' . ucfirst( $lang['data-modyfikacji'] ) . ': ' . date( 'H:i d/m/Y', strtotime( $this -> article['date_modify'] ) ) . '
';
if ( $this -> article['tags'] ):
echo '
';
echo '
';
foreach ( $this -> article['tags'] as $tag ):
echo '- ';
echo '' . $tag . '';
echo '
';
endforeach;
echo '
';
echo '
';
endif;
?>
if ( $this -> article['repeat_entry'] ):?>
= $this -> article['language']['entry'];?>
endif;?>
$text = $this -> article['language']['text'];
/* artykuł wewnątrz innego artykułu */
preg_match_all( '/ARTYKUL:[0-9]*/', $this -> article['language']['text'], $articles_list );
if ( is_array( $articles_list[0] ) ) foreach( $articles_list[0] as $article_tmp )
{
$article_tmp = explode( ':', $article_tmp );
if ( $article_tmp[1] != $this -> article['id'] )
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', \front\view\Articles::article_full( $article_tmp[1], $lang_id ), $text );
else
$text = str_replace( '[ARTYKUL:' . $article_tmp[1] . ']', '', $text );
}
/* galeria w innym miejscu niż na końcu */
if ( strpos( $this -> article['language']['text'], '[GALERIA]' ) !== false )
{
ob_start();
if ( is_array( $this -> article['images'] ) ):
?>
foreach ( $this -> article['images'] as $img ):
?>
endforeach;
?>
endif;
$gallery = ob_get_contents();
ob_end_clean();
$text = str_replace( '[GALERIA]', $gallery, $text );
}
/* załączniki w innym miejscu niż na końcu */
if ( strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) !== false )
{
ob_start();
if ( is_array( $this -> article['files'] ) ):
?>
endif;
$files = ob_get_contents();
ob_end_clean();
$text = str_replace( '[ZALACZNIKI]', $files, $text );
}
/* slider */
if ( strpos( $text, '[SLIDER]' ) !== false )
{
while ( strpos( $text, '[SLIDER]' ) !== false )
{
$text_tmp = explode( '[SLIDER]', $text );
$before = $text_tmp[0];
for ( $i = 1; $i < count( $text_tmp ); $i++ )
{
$temp = explode( '[/SLIDER]' , $text_tmp[$i] );
$code = $temp[0];
ob_start();
$images_tmp = explode( '|', $code );
if ( is_array( $images_tmp ) and !empty( $images_tmp ) ) foreach ( $images_tmp as $image_tmp )
{
$image = explode( ';', $image_tmp );
$images[] = $image;
}
$tpl = new \Tpl;
$tpl -> images = $images;
$tpl -> article_id = $this -> article['id'];
$tpl -> i = $i;
echo $tpl -> render( 'articles/slider' );
$out .= ob_get_contents();
ob_end_clean();
$out .= $temp[1];
}
$text = $before . $out;
}
}
echo $text;
?>
if ( is_array( $this -> article['images'] ) and strpos( $this -> article['language']['text'], '[GALERIA]' ) === false ):
?>
foreach ( $this -> article['images'] as $img ):
?>
endforeach;
?>
endif;
if ( is_array( $this -> article['files'] ) and strpos( $this -> article['language']['text'], '[ZALACZNIKI]' ) === false ):
?>
endif;
?>
if ( $this -> article['social_icons'] ):?>
endif;?>