Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

convert bbcode to html

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

convert bbcode to html

Postby glennn » Tue Jun 24, 2003 6:07 pm

two problems - i need a good snippet to convert bbcode to html before the entry is posted to a flatfile, and try as i might i can't figure where to place the snippet in the script (i had one before, a small one...)

the write function is thus:

$Input = "$message";

$New = "$Input";

/* This writes everything to the .txt file and then closes up the script. */

$filename = "caption.txt";
$fp = fopen( $filename,"w");
fwrite($fp, $New, 80000);
fclose( $fp );


thanks for your help

glenn
glennn
New php-forum User
New php-forum User
 
Posts: 3
Joined: Tue Jun 24, 2003 5:02 pm

Postby Joan Garnet » Wed Jun 25, 2003 8:20 am

If you go to posting.php maybe you can see how it works...

Anyway, you can run a script each day using a cron job or whatever that would do that in one step.
I think that it would be better for the forums performance.
User avatar
Joan Garnet
Moderator
Moderator
 
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars

Postby glennn » Wed Jun 25, 2003 10:43 am

huh?
glennn
New php-forum User
New php-forum User
 
Posts: 3
Joined: Tue Jun 24, 2003 5:02 pm


Return to PHP coding => General

Who is online

Users browsing this forum: yetticaretti and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.