convert bbcode to html

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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

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

User avatar
Joan Garnet
Moderator
Moderator
Posts: 387
Joined: Sat Aug 03, 2002 2:56 am
Location: Mars
Contact:

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.

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

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

huh?


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 4 guests