' => '
' . $txt['smf238'] . ':
', '[/code]
' => '
', '[code]' => '
' . $txt['smf238'] . ':
', '[/code]' => '
', // [php] '[php]
' => '', '[/php]
' => '', '[php]' => '', '[/php]' => '', // [b], [i], [u], [s] '[b]' => '', '[/b]' => '', '[i]' => '', '[/i]' => '', '[u]' => '', '[/u]' => '', '[s]' => '', '[/s]' => '', // [move] can't really be printed. '[move]' => '', '[/move]' => '', // Colors can't well be displayed... supposed to be black and white. '[black]' => '', '[/black]' => '', '[white]' => '', '[/white]' => '', '[red]' => '', '[/red]' => '', '[green]' => '', '[/green]' => '', '[blue]' => '', '[/blue]' => '', // Aligning text passes.. '[left]' => '
', '[/left]' => '
', '[right]' => '
', '[/right]' => '
', '[center]' => '
', '[/center]' => '
', // Some of the more basic textual 'effects' are fine as well. '[tt]' => '', '[/tt]' => '', '[sub]' => '', '[/sub]' => '', '[sup]' => '', '[/sup]' => '', // Horizontal rules and breaks.. '[hr]' => '
', '[hr /]' => '
', '[hr/]' => '
', '[br]' => '
', '[br /]' => '
', '[br/]' => '
', // Links are useless on paper... just show the link. '[ftp]' => '', '[/ftp]' => '', // Preformatted is arguably the best. '[pre]' => '
',
			'[/pre]' => '
', // [list], [*], [li], etc. '[list]' => '', '[*]' => '
  • ', '[@]' => '
  • ', '[+]' => '
  • ', '[x]' => '
  • ', '[#]' => '
  • ', '[o]' => '
  • ', '[O]' => '
  • ', '[0]' => '
  • ', '[li]' => '
  • ', '[/li]' => '
  • ', )); // [glow] and [shadow] can't be printed either. $row['body'] = preg_replace(array('/\[glow(.+?)\](.+?)\[\/glow\]/is', '/\[shadow(.+?)\](.+?)\[\/shadow\]/is'), '$2', $row['body']); // Removing colors is good too. $row['body'] = preg_replace('~\[color=(#[\da-fA-F]{3}|#[\da-fA-F]{6}|[\w]{1,12})\](.*?)\[/color\]~i', '$2', $row['body']); // [font] and [size] are okay.. $row['body'] = preg_replace('~\[font=([\w,\-\s]+?)\](.+?)\[/font\]~i', '$2', $row['body']); $row['body'] = preg_replace('~\[size=([\d]{1,2}p[xt]|(?:x-)?small(?:er)?|(?:x-)?large[r]?)\](.+?)\[/size\]~i', '$2', $row['body']); $row['body'] = preg_replace('~\[size=([\d])\](.+?)\[/size\]~i', '$2', $row['body']); // Images are not printed - unless the user specifically requests it. if (isset($_GET['images'])) $row['body'] = preg_replace('~\[img(\s+width=([\d]+))?(\s+height=([\d]+))?\s*\](?:
    )*(.+?)(?:
    )*\[/img\]~ei', '\'\'', $row['body']); else $row['body'] = preg_replace(array('~\[img=(.*?)\](.+?)\[/img\]~', '~\[img\](.+?)\[/img\]~'), '($1)', $row['body']); // URLs and emails just get parenthesized. $row['body'] = preg_replace(array('/\[url=(.+?)\]([^\]]+)\s*\[\/url\]/', '/\[email=(.*)\](.*)\[\/email\]/'), '$2 ($1)', $row['body']); $row['body'] = preg_replace(array('/\[url\](.+)\[\/url\]/', '/\[email\](.*)\[\/email\]/'), '$1', $row['body']); // Quotes are okay. Important, actually. $row['body'] = preg_replace( array( '/(?:
    )?\[quote(?: author)?="(.+?)"\](?:
    )*/i', '/(?:
    )?\[quote author=(.{1,80}?) link=(.+?) date=(.+?)\](?:
    )*/ei', '/(?:
    )?\[quote author=(.{1,80}?)\](?:
    )*/i', '/(?:
    )?\[quote\](?:
    )*/i', '/\[\/quote\]/i' ), array( '
    ' . $txt['smf239'] . ': $1
    ', "'
    ' . \$txt['smf239'] . ': \$1 ' . \$txt[176] . ' ' . timeformat('\$3', false) . '
    '", '
    ' . $txt['smf239'] . ': $1
    ', '
    ' . $txt['smf240'] . ':
    ', '
    ' ), $row['body'] ); // [me=...]say something[/me] $row['body'] = preg_replace(array('/\[me="(.+?)"\]/', '/\[me=([^\]]+)\]/', '/\[\/me\]/is'), array('* $1 ', '* $1 ', ''), $row['body']); // Oh sure, let's print some flash. $row['body'] = preg_replace('/\[flash=(.*)\](.*)\[\/flash\]/', '$2', $row['body']); // [table], [tr], [td]... they go together. $row['body'] = preg_replace('/\[table\]/', '', $row['body']); $row['body'] = str_replace('[/table]', '
    ', $row['body']); $row['body'] = str_replace(array('[tr]', '[td]'), array('', ''), $row['body']); $row['body'] = str_replace(array('[/tr]', '[/td]'), array('', ''), $row['body']); // Censor the subject and message. censorText($row['subject']); censorText($row['body']); $context['posts'][] = array( 'subject' => $row['subject'], 'member' => $row['posterName'], 'time' => timeformat($row['posterTime'], false), 'timestamp' => $row['posterTime'], 'body' => $row['body'] ); if (!isset($context['topic_subject'])) $context['topic_subject'] = $row['subject']; } mysql_free_result($request); } ?>