Version 2.3.6

This commit is contained in:
Neo committed 2025-12-19 00:26:08 -08:00
1 parent a3bb603c96
commit 19b38c7c74
764 files changed
+143731 -118164

No files matched your search

+100 -93
View File
@@ -2,25 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-11-15 16:28:37 -0600 (Wed, 15 Nov 2006) $
| > $Revision: 730 $
| > $Date: 2008-01-21 17:34:24 -0500 (Mon, 21 Jan 2008) $
| > $Revision: 1169 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
@@ -33,8 +25,8 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
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 han_editor
@@ -192,11 +184,99 @@ class han_editor
$this->class_editor->allow_unicode = $this->ipsclass->allow_unicode;
$this->class_editor->get_magic_quotes = $this->ipsclass->get_magic_quotes;
//-----------------------------------------
// Load lang file
//-----------------------------------------
$this->ipsclass->load_language( 'lang_editors' );
//-----------------------------------------
// Get the smilies from the DB
//-----------------------------------------
if ( ! is_array( $this->ipsclass->cache['emoticons'] ) )
{
$this->ipsclass->cache['emoticons'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['emoticons'][] = $r;
}
@usort( $this->ipsclass->cache['emoticons'] , array( 'class_bbcode_core', 'smilie_alpha_sort' ) );
}
//-----------------------------------------
// BBCode
//-----------------------------------------
if ( ! is_array( $this->ipsclass->cache['bbcode'] ) )
{
$this->ipsclass->cache['bbcode'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['bbcode'][] = $r;
}
@usort( $this->ipsclass->cache['bbcode'] , array( 'class_bbcode_core', 'smilie_alpha_sort' ) );
}
//-----------------------------------------
// Init class
//-----------------------------------------
$this->class_editor->main_init();
//-----------------------------------------
// Load skin and language
//-----------------------------------------
if ( $this->from_acp == 1 )
{
if ( !isset($this->ipsclass->compiled_templates['skin_editors']) )
{
$this->ipsclass->compiled_templates['skin_editors'] = $this->ipsclass->acp_load_template('cp_skin_editors');
}
//-----------------------------------------
// Set up for replacement
//-----------------------------------------
//$this->ipsclass->vars['img_url'] = "<#IMG_DIR#>";
$this->ipsclass->DB->simple_construct( array( 'select' => 'set_image_dir, set_emoticon_folder', 'from' => 'skin_sets', 'where' => 'set_default=1' ) );
$this->ipsclass->DB->simple_exec();
$image_set = $this->ipsclass->DB->fetch_row();
$this->image_dir = $image_set['set_image_dir'];
$this->emo_dir = $image_set['set_emoticon_folder'];
$this->ipsclass->vars['img_url'] = $this->ipsclass->vars['board_url'] . "/style_images/{$this->image_dir}";
//-----------------------------------------
// Remove side panel
//-----------------------------------------
$this->remove_side_panel = 1;
$this->remove_emoticons = 1;
}
else
{
if ( ! isset($this->ipsclass->compiled_templates['skin_editors']) )
{
$this->ipsclass->load_template( 'skin_editors' );
}
$this->emo_dir = $this->ipsclass->skin['_emodir'];
}
}
/*-------------------------------------------------------------------------*/
@@ -224,32 +304,6 @@ class han_editor
if ( $this->from_acp == 1 )
{
if ( !isset($this->ipsclass->compiled_templates['skin_editors']) )
{
$this->ipsclass->compiled_templates['skin_editors'] = $this->ipsclass->acp_load_template('cp_skin_editors');
}
//-----------------------------------------
// Set up for replacement
//-----------------------------------------
$this->ipsclass->vars['img_url'] = "<#IMG_DIR#>";
$this->ipsclass->DB->simple_construct( array( 'select' => 'set_image_dir, set_emoticon_folder', 'from' => 'skin_sets', 'where' => 'set_default=1' ) );
$this->ipsclass->DB->simple_exec();
$image_set = $this->ipsclass->DB->fetch_row();
$this->image_dir = $image_set['set_image_dir'];
$this->emo_dir = $image_set['set_emoticon_folder'];
//-----------------------------------------
// Remove side panel
//-----------------------------------------
$this->remove_side_panel = 1;
$this->remove_emoticons = 1;
//-----------------------------------------
// Sort out editor id
//-----------------------------------------
@@ -257,39 +311,8 @@ class han_editor
$this->editor_id = 'ed-'.$this->acp_editor_id;
$this->acp_editor_id++;
}
else
{
if ( ! isset($this->ipsclass->compiled_templates['skin_editors']) )
{
$this->ipsclass->load_template( 'skin_editors' );
}
$this->emo_dir = $this->ipsclass->skin['_emodir'];
}
$this->ipsclass->load_language( 'lang_editors' );
//-----------------------------------------
// Get the smilies from the DB
//-----------------------------------------
if ( ! is_array( $this->ipsclass->cache['emoticons'] ) )
{
$this->ipsclass->cache['emoticons'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['emoticons'][] = $r;
}
@usort( $this->ipsclass->cache['emoticons'] , array( 'class_bbcode_core', 'smilie_alpha_sort' ) );
}
foreach( $this->ipsclass->cache['emoticons'] as $clickable )
{
if ( $clickable['emo_set'] != $this->emo_dir )
@@ -344,25 +367,6 @@ class han_editor
$smilies = implode( ",\n", $smilie_array );
}
//-----------------------------------------
// BBCode
//-----------------------------------------
if ( ! is_array( $this->ipsclass->cache['bbcode'] ) )
{
$this->ipsclass->cache['bbcode'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['bbcode'][] = $r;
}
@usort( $this->ipsclass->cache['bbcode'] , array( 'class_bbcode_core', 'smilie_alpha_sort' ) );
}
//-----------------------------------------
// Showing any?
//-----------------------------------------
@@ -408,14 +412,17 @@ class han_editor
//-----------------------------------------
// Pre parse...
//-----------------------------------------
$text = $this->class_editor->process_before_form( $text );
//-----------------------------------------
// Weird script tag stuff...
//-----------------------------------------
$text = preg_replace( "#(<|&lt;|&amp;lt;|&\#60;)script#si", "&amp;lt;script", $text );
if( $this->method == 'rte' )
{
$text = preg_replace( "#(<|&lt;|&amp;lt;|&\#60;)script#si", "&amp;lt;script", $text );
}
$return_html = $this->ipsclass->compiled_templates['skin_editors']->ips_editor( $form_field, $text, $this->ipsclass->vars['img_url'].'/folder_editor_images/', 'jscripts/folder_rte_files/', $this->rte_on, $this->editor_id, $smilies, $bbcode );