Code: Select all
[PHP]
if (logged_in())
echo '{CONTENT}';
else
echo "Dies ist ein Bereich für Benutzer. Logge dich ein oder melde dich an!";
[/PHP]
If I include the content part with only {CONTENT} it function.
Code: Select all
[PHP]
if (logged_in())
echo '{CONTENT}';
else
echo "Dies ist ein Bereich für Benutzer. Logge dich ein oder melde dich an!";
[/PHP]
Code: Select all
<!--LOGIN_CHECK_START//-->
{CONTENT}
<!--LOGIN_CHECK_END//-->
Code: Select all
<?php
if(!logged_in()) {
$_login_text = 'Dies ist ein Bereich für Benutzer. Logge dich ein oder melde dich an!';
$content['all'] = replace_tmpl_section('LOGIN_CHECK', $content['all'], $_login_text);
} else {
$content['all'] = str_replace('<!--LOGIN_CHECK_START//-->', '', $content['all']);
$content['all'] = str_replace('<!--LOGIN_CHECK_END//-->', '', $content['all']);
}
?>