Output of news text in html

Need some help with the script?

Output of news text in html

Postby Hawk » Tue Jun 30, 2009 7:58 am

I've noticed that all the code, using both standard & tinyFCK editor for writing a text/post images/etc, is written in single line. Is there a way to output the records which would break html code into some structure, example new line when <p> or <br /> codes are found in text?
User avatar
Hawk
 
Posts: 279
Joined: Tue Aug 29, 2006 9:00 pm

Postby FI-DD » Sun Jul 05, 2009 8:09 pm

In inc/functions.inc.php try changing this:
Code: Select all
if ($way == 'show'){
      $find    = array('{nl}');
      $replace = array('<br />');


to this:
Code: Select all
if ($way == 'show'){
      $find    = array('{nl}');
      $replace = array("<br />\n");
User avatar
FI-DD
Admin
 
Posts: 2971
Joined: Thu Sep 22, 2005 11:27 am
Location: Germany

Postby Hawk » Mon Jul 06, 2009 1:14 pm

The code which you wrote doesn't give any results. I've also tried this:
Code: Select all
   if ($way == 'show'){
      $find    = array('{nl}');
      $replace = array('<br />', "\n");
      $sourse    = stripslashes($sourse);

That doesn't work either.

However, if tinyFCK is activated, it's quite possible there is FormatSwitcher with HTML activated aswell. In that case, <p> & </p> would be the most important codes which should be used to structure the data.
User avatar
Hawk
 
Posts: 279
Joined: Tue Aug 29, 2006 9:00 pm

Postby mark99 » Wed Jul 08, 2009 11:30 am

Don't forget to clear your cache after making any changes like that.
mark99
 
Posts: 123
Joined: Mon Feb 09, 2009 6:01 pm

Postby Hawk » Mon Jul 13, 2009 8:18 am

I did clear the cache, but no changes have apeared.
User avatar
Hawk
 
Posts: 279
Joined: Tue Aug 29, 2006 9:00 pm


Return to Help



Who is online

Users browsing this forum: No registered users and 0 guests

cron