|
From: Florin C B. <ory...@us...> - 2011-12-16 01:35:10
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3
In directory vz-cvs-4.sog:/tmp/cvs-serv21734/core/includes/sessions/phpbb3
Modified Files:
bbcode.php
Log Message:
some files changed, revent them if they are from mistake
Index: bbcode.php
===================================================================
RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/bbcode.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** bbcode.php 12 Jul 2009 05:13:00 -0000 1.11
--- bbcode.php 16 Dec 2011 01:35:07 -0000 1.12
***************
*** 395,399 ****
// to replace all {VARS} to corresponding backreferences
// Note that backreferences are numbered from bbcode_match
! if (preg_match_all('/\{(URL|LOCAL_URL|EMAIL|TEXT|SIMPLETEXT|IDENTIFIER|COLOR|NUMBER)[0-9]*\}/', $rowset[$bbcode_id]['bbcode_match'], $m))
{
foreach ($m[0] as $i => $tok)
--- 395,399 ----
// to replace all {VARS} to corresponding backreferences
// Note that backreferences are numbered from bbcode_match
! if (preg_match_all('/\{(URL|LOCAL_URL|WEB|IPAPERLINK|EMAIL|TEXT|SIMPLETEXT|IDENTIFIER|COLOR|NUMBER)[0-9]*\}/', $rowset[$bbcode_id]['bbcode_match'], $m))
{
foreach ($m[0] as $i => $tok)
***************
*** 451,454 ****
--- 451,456 ----
'i_open' => '<span style="font-style: italic">',
'i_close' => '</span>',
+ 'ipaper_open' => '<span>',
+ 'ipaper_close' => '</span>',
'u_open' => '<span style="text-decoration: underline">',
'u_close' => '</span>',
***************
*** 515,519 ****
--- 517,523 ----
'youtube' => array('{YOUTUBEID}' => '$1', '{YOUTUBELINK}' => '$2', '{WIDTH}' => '$3', '{HEIGHT}' => '$4'),
'ipaper' => array('{IPAPERID}' => '$1', '{IPAPERKEY}' => '$2', '{WIDTH}' => '$3', '{HEIGHT}' => '$4', '{IPAPERLINK}' => '$5'),
+ 'ipaper_open' => array('{IPAPERCODE}' => '$1'),
'url' => array('{URL}' => '$1', '{DESCRIPTION}' => '$2'),
+ 'web' => array('{URL}' => '$1', '{DESCRIPTION}' => '$2'),
'size' => array('{ID}' => '$1', '{TEXT}' => '$2'),
'email' => array('{EMAIL}' => '$1', '{DESCRIPTION}' => '$2')
***************
*** 694,698 ****
$bbcode_tpl['size_open'] = str_replace('{SIZE}', '\\1', $bbcode_tpl['size_open']);
! $bbcode_tpl['quote_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_open']);
$bbcode_tpl['quote_username_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_username_open']);
--- 698,702 ----
$bbcode_tpl['size_open'] = str_replace('{SIZE}', '\\1', $bbcode_tpl['size_open']);
! $bbcode_tpl['quote_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_open']);
$bbcode_tpl['quote_username_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_username_open']);
***************
*** 718,725 ****
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
//Start more bbcode
$bbcode_tpl['stream'] = str_replace('{URL}', '\\1', $bbcode_tpl['stream']);
- $bbcode_tpl['web'] = str_replace('{URL}', '\\1', $bbcode_tpl['web']);
$bbcode_tpl['flash'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['flash']);
$bbcode_tpl['flash'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['flash']);
--- 722,747 ----
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
+
+ // bbcode_box Mod
+ $bbcode_tpl['align_open'] = str_replace('{ALIGN}', '\\1', $bbcode_tpl['align_open']);
+ // $bbcode_tpl['stream'] = str_replace('{URL}', '\\1', $bbcode_tpl['stream']);
+ $bbcode_tpl['ram'] = str_replace('{URL}', '\\1', $bbcode_tpl['ram']);
+ $bbcode_tpl['marq_open'] = str_replace('{MARQ}', '\\1', $bbcode_tpl['marq_open']);
+ $bbcode_tpl['table_open'] = str_replace('{TABLE}', '\\1', $bbcode_tpl['table_open']);
+ $bbcode_tpl['cell_open'] = str_replace('{CELL}', '\\1', $bbcode_tpl['cell_open']);
+ $bbcode_tpl['web'] = str_replace('{URL}', '\\1', $bbcode_tpl['web']);
+ //$bbcode_tpl['center_open'] = str_replace('{CENTER}', '\\1', $bbcode_tpl['center_open']);
+ //$bbcode_tpl['flash'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['flash']);
+ //$bbcode_tpl['flash'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['flash']);
+ //$bbcode_tpl['flash'] = str_replace('{URL}', '\\3', $bbcode_tpl['flash']);
+ //$bbcode_tpl['video'] = str_replace('{URL}', '\\3', $bbcode_tpl['video']);
+ //$bbcode_tpl['video'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['video']);
+ //$bbcode_tpl['video'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['video']);
+ $bbcode_tpl['font_open'] = str_replace('{FONT}', '\\1', $bbcode_tpl['font_open']);
+ $bbcode_tpl['poet_open'] = str_replace('{POET}', '\\1', $bbcode_tpl['poet_open']);
+ // bbcode_box Mod
//Start more bbcode
$bbcode_tpl['stream'] = str_replace('{URL}', '\\1', $bbcode_tpl['stream']);
$bbcode_tpl['flash'] = str_replace('{WIDTH}', '\\1', $bbcode_tpl['flash']);
$bbcode_tpl['flash'] = str_replace('{HEIGHT}', '\\2', $bbcode_tpl['flash']);
***************
*** 791,795 ****
//$text = str_replace(array("\n", "\r"), array('<br />', "\n"), $text);
!
$text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);
--- 813,817 ----
//$text = str_replace(array("\n", "\r"), array('<br />', "\n"), $text);
! $text = str_replace(array("\n", "\r"), array('<br />', ""), $text);
$text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text);
***************
*** 893,900 ****
//Strat more bbcode
!
// [stream]Sound URL[/stream] code..
$patterns[] = "#\[stream:$uid\](.*?)\[/stream:$uid\]#si";
$replacements[] = $bbcode_tpl['stream'];
// [flash width=X height=X]Flash URL[/flash] code..
--- 915,961 ----
//Strat more bbcode
! $text = preg_replace($patterns, $replacements, $text);
! // align
! $text = preg_replace("/\[align=(left|right|center|justify):$uid\]/si", $bbcode_tpl['align_open'], $text);
! $text = str_replace("[/align:$uid]", $bbcode_tpl['align_close'], $text);
! // marquee
! $text = preg_replace("/\[marq=(left|right|up|down):$uid\]/si", $bbcode_tpl['marq_open'], $text);
! $text = str_replace("[/marq:$uid]", $bbcode_tpl['marq_close'], $text);
! // table
! $text = preg_replace("/\[table=(.*?):$uid\]/si", $bbcode_tpl['table_open'], $text);
! $text = str_replace("[/table:$uid]", $bbcode_tpl['table_close'], $text);
! // cell
! $text = preg_replace("/\[cell=(.*?):$uid\]/si", $bbcode_tpl['cell_open'], $text);
! $text = str_replace("[/cell:$uid]", $bbcode_tpl['cell_close'], $text);
! // center
! $text = preg_replace("/\[center:$uid\]/si", $bbcode_tpl['center_open'], $text);
! $text = str_replace("[/center:$uid]", $bbcode_tpl['center_close'], $text);
! // font
! $text = preg_replace("/\[font=(.*?):$uid\]/si", $bbcode_tpl['font_open'], $text);
! $text = str_replace("[/font:$uid]", $bbcode_tpl['font_close'], $text);
! // poet
! $text = preg_replace("/\[poet(.*?):$uid\]/si", $bbcode_tpl['poet_open'], $text);
! $text = str_replace("[/poet:$uid]", $bbcode_tpl['poet_close'], $text);
! //[hr]
! $text = str_replace("[hr:$uid]", $bbcode_tpl['hr'], $text);
! // bbcode_box Mod
! // [fade] and [/fade] for faded text.
! $text = str_replace("[fade:$uid]", $bbcode_tpl['fade_open'], $text);
! $text = str_replace("[/fade:$uid]", $bbcode_tpl['fade_close'], $text);
! // real
! $patterns[] = "#\[ram:$uid\](.*?)\[/ram:$uid\]#si";
! $replacements[] = $bbcode_tpl['ram'];
// [stream]Sound URL[/stream] code..
$patterns[] = "#\[stream:$uid\](.*?)\[/stream:$uid\]#si";
$replacements[] = $bbcode_tpl['stream'];
+ //web
+ $patterns[] = "#\[web:$uid\](.*?)\[/web:$uid\]#si";
+ $replacements[] = $bbcode_tpl['web'];
+ // [flash width= height= loop= ] and [/flash] code..
+ $patterns[] = "#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9]):$uid\](.*?)\[/flash:$uid\]#si";
+ $replacements[] = $bbcode_tpl['flash'];
+ // [flash width= height= loop= ] and [/flash] code..
+ $patterns[10] = "#\[video width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9]):$uid\](.*?)\[/video:$uid\]#si";
+ $replacements[10] = $bbcode_tpl['video'];
// [flash width=X height=X]Flash URL[/flash] code..
***************
*** 1025,1028 ****
--- 1086,1120 ----
$text = preg_replace("#\[img\]((http|ftp|https|ftps)://)([^ \?&=\#\"\n\r\t<]*?(\.(jpg|jpeg|gif|png)))\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text);
+ // bbcode_box Mod
+ // [fade] and [/fade] for faded text.
+ $text = preg_replace("#\[fade\](.*?)\[/fade\]#si", "[fade:$uid]\\1[/fade:$uid]", $text);
+ // [align] and [/align]
+ $text = preg_replace("#\[align=(left|right|center|justify)\](.*?)\[/align\]#si", "[align=\\1:$uid]\\2[/align:$uid]", $text);
+ // [marq] and [/marq]
+ $text = preg_replace("#\[marq=(left|right|up|down)\](.*?)\[/marq\]#si", "[marq=\\1:$uid]\\2[/marq:$uid]", $text);
+ // [table] and [/table]
+ $text = preg_replace("#\[table=(.*?)\](.*?)\[/table\]#si", "[table=\\1:$uid]\\2[/table:$uid]", $text);
+ // [cell] and [/cell]
+ $text = preg_replace("#\[cell=(.*?)\](.*?)\[/cell\]#si", "[cell=\\1:$uid]\\2[/cell:$uid]", $text);
+ // [font] and [/font]
+ $text = preg_replace("#\[font=(.*?)\](.*?)\[/font\]#si", "[font=\\1:$uid]\\2[/font:$uid]", $text);
+ // [poet] and [/poet]
+ $text = preg_replace("#\[poet(.*?)\](.*?)\[/poet\]#si", "[poet\\1:$uid]\\2[/poet:$uid]", $text);
+ // [center] and [/center]
+ $text = preg_replace("#\[center\](.*?)\[/center\]#si", "[center:$uid]\\1[/center:$uid]", $text);
+ // [real]and[/real]
+ $text = preg_replace("#\[ram\](.*?)\[/ram\]#si", "[ram:$uid]\\1[/ram:$uid]", $text);
+ // [stream]and[/stream]
+ //$text = preg_replace("#\[stream\](.*?)\[/stream\]#si", "[stream:$uid]\\1[/stream:$uid]", $text);
+ // [web]and[/web]
+ $text = preg_replace("#\[web\](http(s)?://)([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\[/web\]#si", "[web:$uid]\\1\\3[/web:$uid]", $text);
+ //[flash width= heigth= loop=] and [/flash]
+ //$text = preg_replace("#\[flash width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/flash\]#si","[flash width=\\1 height=\\2:$uid\]\\3[/flash:$uid]", $text);
+ //[video width= heigth=] and [/video]
+ //$text = preg_replace("#\[video width=([0-6]?[0-9]?[0-9]) height=([0-4]?[0-9]?[0-9])\](([a-z]+?)://([^, \n\r]+))\[\/video\]#si","[video width=\\1 height=\\2:$uid\]\\3[/video:$uid]", $text);
+ // [hr]
+ $text = preg_replace("#\[hr\]#si", "[hr:$uid]", $text);
+ // bbcode_box Mod
+
//Start more bbcode
$text = str_replace('url:' . $uid, 'url', $text);
|