[BR] im Titel

Hier bekommst Du deutschsprachigen Support. Keine Fehlermeldungen oder Erweiterungswünsche bitte!
Post Reply
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

[BR] im Titel

Post by update »

als Umbruch für lange Titel(Untertitel)zeilen. Ging mal / geht, aber wieso nicht in dieser nagelneuen Installation?
Beispiel:
Aus Little Paws [BR]wird MYKKET MORTON
Es bleibt immer der tag sichbar und er hat keinen Effekt...
Was muss ich tun?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: [BR] im Titel

Post by update »

So, jetzt habe ich folgendes erreicht: Das [BR] wird sauber entfernt (nicht mehr sichtbar), gibt aber immer noch keinen Zeilenumbruch...
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: [BR] im Titel

Post by update »

Liegt's vielleicht an diesem Konstrukt (ich rendere den Artikeltitel außerhalb des Artikeltemplates):

Code: Select all

if(strpos($content["all"],'{ARTICLE_TITLE}')!==false) {
    $content["all"] = render_cnt_template($content["all"], 'ARTICLE_TITLE', $content['article_title'],'');
	}
if( (strpos($content["all"],'{ARTICLE_SUBTITLE}')!==false)) {
    $content["all"] = render_cnt_template($content["all"], 'ARTICLE_SUBTITLE', $content['articles'][$content['article_id']]['article_subtitle'],'');
	}
Im Template steht dann

Code: Select all

<!-- Page Title -->[ARTICLE_TITLE]<h1>{ARTICLE_TITLE} </h1>[/ARTICLE_TITLE]<!-- /Page Title -->
<!-- Page Title else -->[ARTICLE_TITLE_ELSE]<h1>Artikellisting</h1>[/ARTICLE_TITLE_ELSE]<!-- /Page Title else -->
<!-- Page sub Title -->[ARTICLE_SUBTITLE]<h2>{ARTICLE_SUBTITLE} </h2>[/ARTICLE_SUBTITLE]<!-- /Page sub Title -->
<!-- Page sub Title else -->[ARTICLE_SUBTITLE_ELSE]<h2></h2>[/ARTICLE_SUBTITLE_ELSE]<!-- /Page sub Title else -->
Und das Cleanerscript dazu

Code: Select all

<?php
$content["article_title"] = clean_slweg( html_parser( $content['article_title'] ) );
$content["article_subtitle"] = clean_slweg( html_parser( $content['article_subtitle'] ) );
?>
Wie gesagt, kein [BR] mehr sichtbar, aber auch kein Zeilenumbruch. Und ohne Script kein Zeilenumbruch, aber das [BR] sichtbar. Hmmm...
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: [BR] im Titel

Post by update »

Und wenn ich

Code: Select all

<?php
$content["article_title"] = str_replace(array('[br]', '[BR]'), '<br />', $content['article_title']);
?>
schreibe, bricht die Schoose sauber um, aber das [BR] steht im Quellcode immer noch im Titel.

AAlso, kann da wer den entschreidenden Fehler/Schritt in die richtige Richtung aufzeigen?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: [BR] im Titel

Post by update »

So, ich hab's:

Code: Select all

<?php
//replacement
$content["article_title"] = str_replace(array('[br]', '[BR]'), '<br />', $content['article_title']);
//Cleaning
$content["pagetitle"] = clean_slweg( html_parser( $content['pagetitle'] ) );
?>
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: [BR] im Titel

Post by update »

Tolles Solo!
War aber wieder gut, mal mit jemandem darüber reden zu können :lol:
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: [BR] im Titel

Post by update »

So, nun habe ich das für den Titel, aber nicht für den Untertitel gelöst. Vielleicht hat ja jemand wieder eine Idee?
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
User avatar
Oliver Georgi
Site Admin
Posts: 9907
Joined: Fri 3. Oct 2003, 22:22
Contact:

Re: [BR] im Titel

Post by Oliver Georgi »

Das BR wird ganz sauber vom normalen Rendering Prozess dank BBCode-Parsing umgewandelt. Also nicht nötig, es selbst anzufassen.

Lediglich für den Seitentitel, muss man dort noch heran.

Code: Select all

$content["pagetitle"] = strip_tags(str_replace(array('[br]', '[BR]'), ' ', $content["pagetitle"]));
// naja alternativ, dann aber nur noch zusätzlich so

Code: Select all

$content["all"] = str_replace(array('[br]', '[BR]'), ' ', $content["all"]);
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Re: [BR] im Titel

Post by update »

Danke für den Anstoß!
Jetzt habe ich

Code: Select all

<?php
$content["all"] = str_replace(array('[br]', '[BR]'), ' <br />', $content["all"]);
$content["pagetitle"] = strip_tags(str_replace(array('[br]', '[BR]'), ' ', $content["pagetitle"]));
?>
und title und subtitle werden umgebrochen und das [BR] aus dem Seitentitel entfernt.
Ohne das zusätzliche '<br />' wird der Untertitel nicht umgebrochen :(
Liegt vielleicht tatsächlich daran, dass mein Titel/Untertitel nicht aus dem Artikeltemplate kommt ( siehe http://forum.phpwcms.org/viewtopic.php?p=145717#p145717 )
It's mostly all about maintaining two or three customer's sites Still supporter for the band Mykket Morton. Visit Mykket Morton on FB. Listen Mykket Morton and live videos on youtube.
Now building a venue for young artists to get wet on stage, rehearsal rooms, a studio, a guitar shop - yes I'm going to build some guitars.
Post Reply