Version 2.2.0 RC-1
This commit is contained in:
1 parent
f73f8bff6d
commit
22f1b963ee
1034 files changed
+178610
-70897
No files matched your search
@@ -2,28 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-24 22:17:00 +0100 (Mon, 24 Oct 2005) $
|
||||
| > $Revision: 64 $
|
||||
| > $Author: bfarber $
|
||||
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Posting Editor
|
||||
@@ -88,6 +78,13 @@
|
||||
* @version 2.1
|
||||
* @since 2.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class class_editor
|
||||
{
|
||||
/**
|
||||
@@ -188,14 +185,14 @@ class class_editor
|
||||
* @param string Raw text
|
||||
* @return string Converted text
|
||||
*/
|
||||
function unhtml_emoid( $emoid )
|
||||
function unhtml_emoid( $matches=array() )
|
||||
{
|
||||
$emoid = stripslashes( $emoid );
|
||||
$emoid = stripslashes( $matches[2] );
|
||||
|
||||
$emoid = str_replace( '<', '<', $emoid );
|
||||
$emoid = str_replace( '>', '>', $emoid );
|
||||
|
||||
return $emoid;
|
||||
return 'emoid="' . $emoid . '"';
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -208,15 +205,15 @@ class class_editor
|
||||
* @param string Raw text
|
||||
* @return string Converted text
|
||||
*/
|
||||
function html_emoid( $emoid )
|
||||
function html_emoid( $matches=array() )
|
||||
{
|
||||
$emoid = stripslashes( $emoid );
|
||||
$emoid = stripslashes( $matches[2] );
|
||||
|
||||
$emoid = str_replace( '<', '<', $emoid );
|
||||
$emoid = str_replace( '>', '>', $emoid );
|
||||
$emoid = str_replace( '"', '-', $emoid );
|
||||
|
||||
return $emoid;
|
||||
return ' ' . $emoid . ' ';
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -230,10 +227,10 @@ class class_editor
|
||||
* @param string URL
|
||||
* @return string Converted text
|
||||
*/
|
||||
function unhtml_url( $type='a href', $url='' )
|
||||
function unhtml_url( $matches=array() )
|
||||
{
|
||||
$url = stripslashes( $url );
|
||||
$type = stripslashes( $type );
|
||||
$url = stripslashes( $matches[3] );
|
||||
$type = stripslashes( $matches[1] ? $matches[1] : 'a href' );
|
||||
|
||||
$url = str_replace( '<', '<', $url );
|
||||
$url = str_replace( '>', '>', $url );
|
||||
@@ -255,9 +252,11 @@ class class_editor
|
||||
*/
|
||||
function _rgb_to_hex($t, $t2)
|
||||
{
|
||||
$t = $matches[1];
|
||||
$t2 = $matches[2];
|
||||
|
||||
$tmp = array_map( "trim", explode( ",", $t ) );
|
||||
//print sprintf("#%02X%02X%02X".$t2, intval($tmp[0]), intval($tmp[1]), intval($tmp[2]) );
|
||||
return sprintf("#%02X%02X%02X".$t2, intval($tmp[0]), intval($tmp[1]), intval($tmp[2]) );
|
||||
return 'color: ' . sprintf("#%02X%02X%02X".$t2, intval($tmp[0]), intval($tmp[1]), intval($tmp[2]) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
@@ -2,28 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-01-30 18:53:19 +0000 (Mon, 30 Jan 2006) $
|
||||
| > $Revision: 127 $
|
||||
| > $Author: bfarber $
|
||||
| > $Date: 2006-10-04 11:22:28 +0100 (Wed, 04 Oct 2006) $
|
||||
| > $Revision: 605 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Posting RTE Editor
|
||||
@@ -60,6 +50,13 @@
|
||||
* @version 2.1
|
||||
* @since 2.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class class_editor_module extends class_editor
|
||||
{
|
||||
/**
|
||||
@@ -248,13 +245,22 @@ class class_editor_module extends class_editor
|
||||
// Make URLs safe (prevent tag stripping)
|
||||
//-----------------------------------------
|
||||
|
||||
$t = preg_replace( '#<(a href|img src)=([\'"])([^>]+?)(\\3)#ise', "\$this->unhtml_url( '\\1', '\\3' )", $t );
|
||||
$t = preg_replace_callback( '#<(a href|img src)=([\'"])([^>]+?)(\\3)#is', array( $this, 'unhtml_url' ), $t );
|
||||
|
||||
//-----------------------------------------
|
||||
// Make EMOids safe (prevent tag stripping)
|
||||
//-----------------------------------------
|
||||
|
||||
$t = preg_replace( '#(emoid=\")(.+?)(\")#ise', "'emoid=\"'.\$this->unhtml_emoid('\\2').'\"';", $t );
|
||||
$t = preg_replace_callback( '#(emoid=\")(.+?)(\")#is', array( $this, 'unhtml_emoid' ), $t );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// WYSI-Weirdness #0: BR tags to \n
|
||||
//-----------------------------------------
|
||||
|
||||
$t = preg_replace( "#<br.*>#isU", "\n", $t );
|
||||
|
||||
$t = trim( $t );
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove tags we're not bothering with
|
||||
@@ -263,15 +269,9 @@ class class_editor_module extends class_editor
|
||||
|
||||
if ( ! $this->allow_html )
|
||||
{
|
||||
$t = strip_tags( $t, '<h1><h2><h3><h4><h5><h6><font><span><div><br><p><img><a><li><ol><ul><b><strong><em><i><u><strike><blockquote>' );
|
||||
$t = strip_tags( $t, '<h1><h2><h3><h4><h5><h6><font><span><div><br><p><img><a><li><ol><ul><b><strong><em><i><u><strike><blockquote><sub><sup>' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// WYSI-Weirdness #0: BR tags to \n
|
||||
//-----------------------------------------
|
||||
|
||||
$t = preg_replace( "#<br.*>#isU", "\n", $t );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// WYSI-Weirdness #1: Named anchors
|
||||
//-----------------------------------------
|
||||
@@ -310,7 +310,7 @@ class class_editor_module extends class_editor
|
||||
$t = str_replace( "<#EMO_DIR#>", "<#EMO_DIR>", $t );
|
||||
|
||||
# Parse...
|
||||
$t = preg_replace( "#[ ]?<([^>]+?)emoid=\"(.+?)\"([^>]+?)?".">[ ]?#ise", "' '.\$this->html_emoid('\\2').' '", $t );
|
||||
$t = preg_replace_callback( "#[ ]?<([^>]+?)emoid=\"(.+?)\"([^>]+?)?".">[ ]?#is", array( $this, 'html_emoid' ), $t );
|
||||
|
||||
# And convert it back again...
|
||||
$t = str_replace( "<#EMO_DIR>", "<#EMO_DIR#>", $t );
|
||||
@@ -330,7 +330,7 @@ class class_editor_module extends class_editor
|
||||
//-----------------------------------------
|
||||
|
||||
$t = preg_replace( "#\[url=(\"|'|")<a\s+?href=[\"'](.*)/??['\"]\\2/??</a>#is", "[url=\\1\\2", $t );
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Now, recursively parse the other tags
|
||||
// to make sure we get the nested ones
|
||||
@@ -344,6 +344,9 @@ class class_editor_module extends class_editor
|
||||
$t = $this->_recurse_and_parse( 'strike' , $t, "_parse_simple_tag", 's' );
|
||||
$t = $this->_recurse_and_parse( 'blockquote' , $t, "_parse_simple_tag", 'indent' );
|
||||
|
||||
$t = $this->_recurse_and_parse( 'sup' , $t, "_parse_simple_tag", 'sup' );
|
||||
$t = $this->_recurse_and_parse( 'sub' , $t, "_parse_simple_tag", 'sub' );
|
||||
|
||||
//-----------------------------------------
|
||||
// More complex tags
|
||||
//-----------------------------------------
|
||||
@@ -397,6 +400,19 @@ class class_editor_module extends class_editor
|
||||
$t = preg_replace( "#\[(url|img|b|u|i|s|email|list|indent|right|left|center)\]\[/\\1\]#is", "", $t );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// WYSI-Weirdness #11: Opera crap
|
||||
//-----------------------------------------
|
||||
|
||||
$t = preg_replace( "#\[(font|size|color)\]=[\"']([^\"']+?)[\"']\]\[/\\1\]#is", "", $t );
|
||||
|
||||
//-----------------------------------------
|
||||
// WYSI-Weirdness #11: No domain in FF?
|
||||
//-----------------------------------------
|
||||
|
||||
$t = preg_replace( "#(http|https):\/\/index.php(.*?)#is", $this->ipsclass->vars['board_url'].'/index.php\\2', $t );
|
||||
$t = preg_replace( "#\[url=['\"]index.php(.*?)[\"']#is", "[url=\"".$this->ipsclass->vars['board_url'].'/index.php\\1"', $t );
|
||||
|
||||
//-----------------------------------------
|
||||
// Now call the santize routine to make
|
||||
// html and nasties safe. VITAL!!
|
||||
@@ -700,7 +716,7 @@ class class_editor_module extends class_editor
|
||||
// Convert RGB to hex
|
||||
//-----------------------------------------
|
||||
|
||||
$style = preg_replace( '#(?<!\w)color:\s+?rgb\((\d+,\s+?\d+,\s+?\d+)\)(;?)#ie', "'color: '.\$this->_rgb_to_hex( '\\1','\\2' );", $style );
|
||||
$style = preg_replace_callback( '#(?<!\w)color:\s+?rgb\((\d+,\s+?\d+,\s+?\d+)\)(;?)#i', array( $this, '_rgb_to_hex' ), $style );
|
||||
|
||||
//-----------------------------------------
|
||||
// Pick through possible styles
|
||||
@@ -1213,9 +1229,18 @@ class class_editor_module extends class_editor
|
||||
*/
|
||||
function _get_value_of_option( $option, $text )
|
||||
{
|
||||
preg_match( "#$option(\s+?)?\=(\s+?)?[\"']?(.+?)([\"']|(\s+?)|$|>)#is", $text, $matches );
|
||||
if( $option == 'face' )
|
||||
{
|
||||
// Bad font face, bad
|
||||
preg_match( "#$option(\s+?)?\=(\s+?)?[\"']?(.+?)([\"']|$|color|size|>)#is", $text, $matches );
|
||||
}
|
||||
else
|
||||
{
|
||||
preg_match( "#$option(\s+?)?\=(\s+?)?[\"']?(.+?)([\"']|(\s+?)|$|>)#is", $text, $matches );
|
||||
}
|
||||
|
||||
//preg_match( "#$option(\s+?)?\=(\s+?)?[\"']?(.+?)([\"']|$|>|\s)#is", $text, $matches );
|
||||
return trim( $matches[3] );
|
||||
return isset($matches[3]) ? trim( $matches[3] ) : '';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,28 +2,18 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-24 22:17:00 +0100 (Mon, 24 Oct 2005) $
|
||||
| > $Revision: 64 $
|
||||
| > $Author: bfarber $
|
||||
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Posting STD Editor
|
||||
@@ -62,6 +52,13 @@
|
||||
* @since 2.1.0
|
||||
* @ignore
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class class_editor_module extends class_editor
|
||||
{
|
||||
# Global
|
||||
|
||||
@@ -1,15 +1 @@
|
||||
<html>
|
||||
<head><title>Ошибка < Русская версия Invision Power Board</title></head>
|
||||
<body>
|
||||
<h1>Ошибка < Русская версия Invision Power Board</h1>
|
||||
<hr>
|
||||
Вы попали на несуществующую страницу!<br>Пожалуйста нажмите на кнопочку «<b>Назад</b>»
|
||||
в вашем браузере для возвращения на предыдущую страницу.
|
||||
<hr>
|
||||
<b>Invision Power Board:</b>
|
||||
<ul>
|
||||
<li><a href="http://www.bestwarez.ru" title="BestWarez.Ru - Только лучший Варез!">Русская версия</a></li>
|
||||
<li><a href="http://www.invisionboard.com" title="Official Site">English version</a></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>␍
|
||||
Reference in new issue
Block a user