Page 1 of 1
Problems with pragraph
Posted: Tue 17. Apr 2007, 23:09
by thebadflo
My content part is included with this code:
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]
With this code the content is showed without any paragraphs (<br>, etc.).
If I include the content part with only {CONTENT} it function.
Posted: Fri 20. Apr 2007, 17:45
by Oliver Georgi
You can not do this! [PHP] is processed after {CONTENT} was replaced!
Posted: Fri 20. Apr 2007, 19:49
by thebadflo
and how can i fix this? or which ways are better?
Posted: Sat 21. Apr 2007, 08:04
by Oliver Georgi
Über frontend_render ist das besser zu handeln. Und dann schneidet man einfach den Bereich heraus.
Template:
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']);
}
?>
Oliver
Posted: Sat 21. Apr 2007, 15:17
by thebadflo
Danke, könntest du mir evtl. noch kurz erklären woe ich den PHP Code eintragen muss?
Posted: Sat 21. Apr 2007, 15:31
by Oliver Georgi
template/inc_script/frontend_render/neuedatei.php
Oliver
Posted: Sat 21. Apr 2007, 17:29
by thebadflo
cool! das funktioniert ja einwandfrei!
Danke!
version 1.3.2
Posted: Mon 30. Apr 2007, 11:05
by thebadflo
hallo ich bekomme seit der neuen version eine fehlermeldung:
http://www.vivian-fanclub.ch/?e_de_email
Posted: Mon 30. Apr 2007, 11:23
by Oliver Georgi
Eine Funktion "logged_in()" gibt es nicht innerhalb von phpwcms - also musst Du Dich selbst darum kümmern und prüfen, wo Du das verbockt hast.
Oliver
Posted: Mon 30. Apr 2007, 18:37
by thebadflo
Hallo habe den Bock gefunden. Jedoch habe ich nun das problem, dass meine funktion login() (setzt die session()) nicht mehr funktioniert. daher die funktion logged_in() gibt immmer false zurück?
hast du eine idee?
Posted: Mon 30. Apr 2007, 18:52
by Oliver Georgi
sorry, ich kann bei Custom Hacks keinen kostenfreien Support leisten.
Oliver