Alexander Ipp
BANNED | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору Вот вам, кстати, коды из YaBB: Код: $threadpost =~ s~<br>~\n~ig; $threadpost =~ s~\[code\]\n*(.+?)\n*\[/code\]~<BR><B>Code:</B><br><table bgcolor=#000000 cellspacing=1><tr><td><table cellpadding=2 cellspacing=0 bgcolor=#FFFFFF><tr><td><font face=Courier size=1 color=#000000>$1</font></td></tr></table></td></tr></table>~isg; $threadpost =~ s~\[([^\]]{0,30})\n([^\]]{0,30})\]~\[$1$2\]~g; $threadpost =~ s~\[/([^\]]{0,30})\n([^\]]{0,30})\]~\[/$1$2\]~g; $threadpost =~ s~(\w+://[^<>\s\n\"\]\[]+)\n([^<>\s\n\"\]\[]+)~$1\n$2~g; $threadpost =~ s~\[b\](.+?)\[/b\]~<b>$1</b>~isg; $threadpost =~ s~\[i\](.+?)\[/i\]~<i>$1</i>~isg; $threadpost =~ s~\[u\](.+?)\[/u\]~<u>$1</u>~isg; $threadpost =~ s~\[s\](.+?)\[/s\]~<s>$1</s>~isg; $threadpost =~ s~\[move\](.+?)\[/move\]~$1~isg; $threadpost =~ s~\[glow(.*?)\](.*?)\[/glow\]~&elimnests($2)~eisg; $threadpost =~ s~\[shadow(.*?)\](.*?)\[/shadow\]~&elimnests($2)~eisg; $threadpost =~ s~\[shadow=(\S+?),(.+?),(.+?)\](.+?)\[/shadow\]~$4~eisg; $threadpost =~ s~\[glow=(\S+?),(.+?),(.+?)\](.+?)\[/glow\]~$4~eisg; $threadpost =~ s~\[color=([\w#]+)\](.*?)\[/color\]~$2~isg; $threadpost =~ s~\[black\](.*?)\[/black\]~$1~isg; $threadpost =~ s~\[white\](.*?)\[/white\]~$1~isg; $threadpost =~ s~\[red\](.*?)\[/red\]~$1~isg; $threadpost =~ s~\[green\](.*?)\[/green\]~$1~isg; $threadpost =~ s~\[blue\](.*?)\[/blue\]~$1~isg; $threadpost =~ s~\[font=(.+?)\](.+?)\[/font\]~<font face="$1">$2</font>~isg; $threadpost =~ s~\[size=(.+?)\](.+?)\[/size\]~<font size="$1">$2</font>~isg; $threadpost =~ s~\[img\](.+?)\[/img\]~$1~isg; $threadpost =~ s~\[img width=(\d+) height=(\d+)\](.+?)\[/img\]~$3~eisg; $threadpost =~ s~\[tt\](.*?)\[/tt\]~<tt>$1</tt>~isg; $threadpost =~ s~\[left\](.+?)\[/left\]~<p align=left>$1</p>~isg; $threadpost =~ s~\[center\](.+?)\[/center\]~<center>$1</center>~isg; $threadpost =~ s~\[right\](.+?)\[/right\]~<p align=right>$1</p>~isg; $threadpost =~ s~\[sub\](.+?)\[/sub\]~<sub>$1</sub>~isg; $threadpost =~ s~\[sup\](.+?)\[/sup\]~<sup>$1</sup>~isg; $threadpost =~ s~\[fixed\](.+?)\[/fixed\]~<font face="Courier New">$1</font>~isg; $threadpost =~ s~\[\[~\{\{~g; $threadpost =~ s~\]\]~\}\}~g; $threadpost =~ s~\|~\|~g; $threadpost =~ s~\[hr\]\n~<hr width=40% align=left size=1>~g; $threadpost =~ s~\[hr\]~<hr width=40% align=left size=1>~g; $threadpost =~ s~\[br\]~\n~ig; $threadpost =~ s~\[url\]www\.\s*(.+?)\s*\[/url\]~www.$1~isg; $threadpost =~ s~\[url=\s*(\w+\://.+?)\](.+?)\s*\[/url\]~$2 ($1)~isg; $threadpost =~ s~\[url=\s*(.+?)\]\s*(.+?)\s*\[/url\]~$2 (http://$1)~isg; $threadpost =~ s~\[url\]\s*(.+?)\s*\[/url\]~$1~isg; $threadpost =~ s~\[email\]\s*(\S+?\@\S+?)\s*\[/email\]~$1~isg; $threadpost =~ s~\[email=\s*(\S+?\@\S+?)\]\s*(.*?)\s*\[/email\]~$2 ($1)~isg; $threadpost =~ s~\[news\](.+?)\[/news\]~$1~isg; $threadpost =~ s~\[gopher\](.+?)\[/gopher\]~$1~isg; $threadpost =~ s~\[ftp\](.+?)\[/ftp\]~$1~isg; $threadpost =~ s~\[quote\s+author=(.*?)link=(.*?)\s+date=(.*?)\s*\]\n*(.*?)\n*\[/quote\]~<BR><i>on $3, <a href=$scripturl?action=display;$2>$1 wrote</a>:</i><table bgcolor=#000000 cellspacing=1 width=90%><tr><td width=100%><table cellpadding=2 cellspacing=0 width=100% bgcolor=#FFFFFF><tr><td width=100%><font size=1 color=#000000>$4</font></td></tr></table></td></tr></table>~isg; $threadpost =~ s~\[quote\]\n*(.+?)\n*\[/quote\]~<BR><i>Quote:</i><table bgcolor=#000000 cellspacing=1 width=90%><tr><td width=100%><table cellpadding=2 cellspacing=0 width=100% bgcolor=#FFFFFF><tr><td width="100%"><font face="Arial,Helvetica" size="1" color=#000000>$1</font></td></tr></table></td></tr></table>~isg; $threadpost =~ s~\[list\]~<ul>~isg; $threadpost =~ s~\[\*\]~<li>~isg; $threadpost =~ s~\[/list\]~</ul>~isg; $threadpost =~ s~\[pre\](.+?)\[/pre\]~'<pre>' . dopre($1) . '</pre>'~iseg; $threadpost =~ s~\[flash=(\S+?),(\S+?)\](\S+?)\[/flash\]~$3~isg; $threadpost =~ s~\{\{~\[~g; $threadpost =~ s~\}\}~\]~g; if( $threadpost =~ m~\[table\]~i ) { $threadpost =~ s~\n{0,1}\[table\]\n*(.+?)\n*\[/table\]\n{0,1}~<table>$1</table>~isg; while( $threadpost =~ s~\<table\>(.*?)\n*\[tr\]\n*(.*?)\n*\[/tr\]\n*(.*?)\</table\>~<table>$1<tr>$2</tr>$3</table>~is ) {} while( $threadpost =~ s~\<tr\>(.*?)\n*\[td\]\n{0,1}(.*?)\n{0,1}\[/td\]\n*(.*?)\</tr\>~<tr>$1<td>$2</td>$3</tr>~is ) {} } $threadpost =~ s~\[\&table(.*?)\]~<table$1>~g; $threadpost =~ s~\[/\&table\]~</table>~g; $threadpost =~ s~\n~<br>~g; | Только не спрашивайте меня, как это к IB прикрутить, Ok? PS Указать на то, откуда взяты оригинальные коды очень желательно... |