Jump to content


bb codes

  • Please log in to reply
1 reply to this topic

#1 me1000

  • Members
  • PipPipPip
  • Advanced Member
  • 183 posts

Posted 27 May 2006 - 03:41 PM

ok im putting together a tutorial script, that will let people submit tutorials, and read tutorials.

I wanted to know if there was a bbs code script made already, so all i have to do, is include it on the page that converts bb code to html.

if you know of any it would be a great help!

Thanks! [img src=\"style_emoticons/[#EMO_DIR#]/wink.gif\" style=\"vertical-align:middle\" emoid=\":wink:\" border=\"0\" alt=\"wink.gif\" /]

#2 fert

  • Members
  • PipPipPip
  • Advanced Member
  • 1,114 posts

Posted 12 June 2006 - 12:47 AM

$text=str_replace('[b]', '<b>', $text);
    $text=str_replace('[/b]', '</b>', $text);
    $text=str_replace('[s]', '<del>', $text);
    $text=str_replace('[/s]', '</del>', $text);
    $text=str_replace('[i]', '<i>', $text);
    $text=str_replace('[/i]', '</i>', $text);
    $text=str_replace('[u]', '<u>', $text);
    $text=str_replace('[/u]', '</u>', $text);
    $text=str_replace('[url', '<a href=', $text);
    $text=str_replace('[/url]', '</a>', $text);
    $text=str_replace('[size', '<font size"', $text);
    $text=str_replace('[/size]', '</font>', $text);
    $text=str_replace('[color', '<font color', $text);
    $text=str_replace('[/color]', '</font>', $text);
    $text=str_replace('[img]', '<image src=', $text);
    $text=str_replace('[/img]', '>', $text);
    $text=str_replace('[list]', '<ul>', $text);
    $text=str_replace('[/list]', '</ul>', $text);
    $text=str_replace('[*]', '<li>', $text);
    $text=str_replace('[/*]', '</li>', $text);
    $text=str_replace('[list=1]', '<ol>', $text);
    $text=str_replace('[/list=1]', '</ol>', $text);
    $text=str_replace('[quote]', '<blockquote>', $text);
    $text=str_replace('[/qoute]', '</blockquote>', $text);
    $text=str_replace('[php]', '<image src="php.gif" alt=php banner><code>', $text);
    $text=str_replace('[/php]', '</code>', $text);
    $text=str_replace('[sql]', '<image src="sql.gif" alt=sql banner><code>', $text);
    $text=str_replace('[/sql]', '</code>', $text);
    $text=str_replace('[c]', '<image src="c.gif" alt=c banner><code>', $text);
    $text=str_replace('[/c]', '</code>', $text);
    $text=str_replace('[html]', '<image src="html.gif" alt=html banner><code>', $text);
    $text=str_replace('[/html]', '</code>', $text);
    $text=str_replace('[js]', '<image src="js.gif" alt=php banner><code>', $text);
    $text=str_replace('[/js]', '</code>', $text);
    $text=str_replace(']', '>', $text);

Si hoc legere scis nimium eruditionis habes
Gentoo Linux 2007.0 Firefox 2

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users