by NeoThermic » Sun, 26 2004 Dec 02:37:04
Yes, after the intergration with phpBB, the bbcode made the front page (as well as fourm topics) invalid xhtml. Well, thanks to
'Senor FF8Jake', the site is back to valid XHTML

Thanks!
Now to the holiday stuff. Got a few small things from chrimbo, but I'm currently engrossed in the Andy Mcnab book 'Dark Winter'.
So uh, unless I post before New Year, have a great holiday season, and a good New Year...
Edit: I've been asked to show how to do this, so here are some diff's:
First, bbcode.php
Code: Select all
Compare: (<)/Original/includes/bbcode.php (26345 bytes)
with: (>)/Changed/includes/bbcode.php (30547 bytes)
624c734
< $ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
---
> $ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" >\\2</a>", $ret);
630c740
< $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
---
> $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" >\\2</a>", $ret);
762c872
< $repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
---
> $repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" />';
Then bbcode.tpl:
Code: Select all
<!-- BEGIN ulist_open --><ul><li><b>List:</b><!-- END ulist_open -->
<!-- BEGIN ulist_close --></li></ul><!-- END ulist_close -->
<!-- BEGIN olist_open --><ol type="{LIST_TYPE}"><li><b>List:</b><!-- END olist_open -->
<!-- BEGIN olist_close --></li></ol><!-- END olist_close -->
<!-- BEGIN listitem --></li><li><!-- END listitem -->
<!-- BEGIN quote_username_open -->
<div class="quote"><i>{USERNAME} {L_WROTE}:</i><br /><br />
<!-- END quote_username_open -->
<!-- BEGIN quote_open -->
<!-- END quote_open -->
<!-- BEGIN quote_close -->
</div>
<!-- END quote_close -->
<!-- BEGIN code_open -->
<div class="code"><i>{L_CODE} :</i><br /><br />
<!-- END code_open -->
<!-- BEGIN code_close -->
</div>
<!-- END code_close -->
<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->
<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->
<!-- BEGIN i_open --><span style="font-style: italic"><!-- END i_open -->
<!-- BEGIN i_close --></span><!-- END i_close -->
<!-- BEGIN color_open --><span style="color: {COLOR}"><!-- END color_open -->
<!-- BEGIN color_close --></span><!-- END color_close -->
<!-- BEGIN size_open --><span style="font-size: {SIZE}px; line-height: normal"><!-- END size_open -->
<!-- BEGIN size_close --></span><!-- END size_close -->
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
<!-- BEGIN url --><a href="{URL}" class="gif_ul">{DESCRIPTION}</a><!-- END url -->
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL} </A><!-- END email -->
Voila!

Yes, after the intergration with phpBB, the bbcode made the front page (as well as fourm topics) invalid xhtml. Well, thanks to [url=http://www.skippercc.com/plog/]'Senor FF8Jake'[/url], the site is back to valid XHTML :) Thanks!
Now to the holiday stuff. Got a few small things from chrimbo, but I'm currently engrossed in the Andy Mcnab book 'Dark Winter'.
So uh, unless I post before New Year, have a great holiday season, and a good New Year... :D
Edit: I've been asked to show how to do this, so here are some diff's:
First, bbcode.php
[code]
Compare: (<)/Original/includes/bbcode.php (26345 bytes)
with: (>)/Changed/includes/bbcode.php (30547 bytes)
624c734
< $ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
---
> $ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" >\\2</a>", $ret);
630c740
< $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
---
> $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" >\\2</a>", $ret);
762c872
< $repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />';
---
> $repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" />';[/code]
Then bbcode.tpl:
[code]<!-- BEGIN ulist_open --><ul><li><b>List:</b><!-- END ulist_open -->
<!-- BEGIN ulist_close --></li></ul><!-- END ulist_close -->
<!-- BEGIN olist_open --><ol type="{LIST_TYPE}"><li><b>List:</b><!-- END olist_open -->
<!-- BEGIN olist_close --></li></ol><!-- END olist_close -->
<!-- BEGIN listitem --></li><li><!-- END listitem -->
<!-- BEGIN quote_username_open -->
<div class="quote"><i>{USERNAME} {L_WROTE}:</i><br /><br />
<!-- END quote_username_open -->
<!-- BEGIN quote_open -->
<!-- END quote_open -->
<!-- BEGIN quote_close -->
</div>
<!-- END quote_close -->
<!-- BEGIN code_open -->
<div class="code"><i>{L_CODE} :</i><br /><br />
<!-- END code_open -->
<!-- BEGIN code_close -->
</div>
<!-- END code_close -->
<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->
<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->
<!-- BEGIN i_open --><span style="font-style: italic"><!-- END i_open -->
<!-- BEGIN i_close --></span><!-- END i_close -->
<!-- BEGIN color_open --><span style="color: {COLOR}"><!-- END color_open -->
<!-- BEGIN color_close --></span><!-- END color_close -->
<!-- BEGIN size_open --><span style="font-size: {SIZE}px; line-height: normal"><!-- END size_open -->
<!-- BEGIN size_close --></span><!-- END size_close -->
<!-- BEGIN img --><img src="{URL}" border="0" /><!-- END img -->
<!-- BEGIN url --><a href="{URL}" class="gif_ul">{DESCRIPTION}</a><!-- END url -->
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL} </A><!-- END email -->[/code]
Voila! ;)