News and BBcode

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
klug
Posts: 7
Joined: Thu Nov 06, 2003 7:20 pm

News and BBcode

Post by klug »

Hi.

Thanks a lot for this wonderfull program !

Would it be possible to use BBcode in the news ?
I can put HTML here (to call a picture), but no BBcode.

Thanks again.
klug
Posts: 7
Joined: Thu Nov 06, 2003 7:20 pm

Post by klug »

I made it myself for version 1.3.8 8-)

In admin/news.php replace line 113 by :

Code: Select all

                <td><textarea name="artikel" rows="5" cols="45"><?php print parseUBB($row->artikel); ?></textarea></td>
In admin/news.php replace line 144 and line 161 by :

Code: Select all

        $artikel = addslashes($_REQUEST["artikel"]);
In inc/functions.php replace line 175 by :

Code: Select all

                        $output .= "<p><b class=\"header\">".$row->header."</b><br>\n".nl2br(parseUBB($row->artikel))."\n";
Now you have BBcode working for the news.
Next step : adding the BBcode editor to the news (just like a FAQ artikel).
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

great idea! I'll add this to the development branch.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
klug
Posts: 7
Joined: Thu Nov 06, 2003 7:20 pm

Post by klug »

I made a mistake : line 113 in admin/news.php should be :

Code: Select all

                <td><textarea name="artikel" rows="5" cols="45"><?php print stripslashes($row->artikel); ?></textarea></td>
Is there an easy way (as fast as this little patch) to be able to use the full BBcode Editor (from the artikel) to the news ?
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

phpMyFAQ 1.3.9 RC1 will support BBCode in the News module.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
klug
Posts: 7
Joined: Thu Nov 06, 2003 7:20 pm

Post by klug »

I found a bug in RC2 with the BBcode in the news part.
Once saved, a news artikel shows (in the admin TEXTAREA) a <br/> instead of standard CR/LF...

The <br/> also is in the public website but "hidden" in the HTML code.
Thorsten
Posts: 15739
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I can confirm this bug. It is fixed in phpMyFAQ 1.3.9 RC3 which will be released next week.

Thanks!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply