Problems with pragraph

Please post all install related problems here. Visit this forum first for troubleshooting.
Post Reply
thebadflo
Posts: 21
Joined: Sat 26. Feb 2005, 12:28

Problems with pragraph

Post 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.
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

You can not do this! [PHP] is processed after {CONTENT} was replaced!
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
thebadflo
Posts: 21
Joined: Sat 26. Feb 2005, 12:28

Post by thebadflo »

and how can i fix this? or which ways are better?
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
thebadflo
Posts: 21
Joined: Sat 26. Feb 2005, 12:28

Post by thebadflo »

Danke, könntest du mir evtl. noch kurz erklären woe ich den PHP Code eintragen muss?
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

template/inc_script/frontend_render/neuedatei.php

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
thebadflo
Posts: 21
Joined: Sat 26. Feb 2005, 12:28

Post by thebadflo »

cool! das funktioniert ja einwandfrei!

Danke!
thebadflo
Posts: 21
Joined: Sat 26. Feb 2005, 12:28

version 1.3.2

Post by thebadflo »

hallo ich bekomme seit der neuen version eine fehlermeldung:
http://www.vivian-fanclub.ch/?e_de_email
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
thebadflo
Posts: 21
Joined: Sat 26. Feb 2005, 12:28

Post 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?
User avatar
Oliver Georgi
Site Admin
Posts: 9889
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

sorry, ich kann bei Custom Hacks keinen kostenfreien Support leisten.

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Post Reply