Version 2.0.0

This commit is contained in:
Neo committed 2025-12-19 00:19:56 -08:00
1 parent 5699abfc0e
commit 0eecc172d9
696 files changed
+120723 -77160

No files matched your search

+102 -69
View File
@@ -2,16 +2,15 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board v1.3.1 Final
| ========================================
| Invision Power Board v2.0.0
| =============================================
| by Matthew Mecham
| (c) 2001 - 2003 Invision Power Services
| (c) 2001 - 2004 Invision Power Services, Inc.
| http://www.invisionpower.com
| ========================================
| =============================================
| Web: http://www.invisionboard.com
| Time: Thu, 23 Sep 2004 23:05:01 GMT
| Release: 3cb325c445e1909182084806ae7f8226
| Email: matt@invisionpower.com
| Time: Tue, 21 Sep 2004 16:34:28 GMT
| Release: 150aa7a702c3c8b6f6eb90ad49305d2f
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
@@ -20,11 +19,16 @@
| > Date started: 18th April 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Mon 24th May 2004
+--------------------------------------------------------------------------
*/
$idx = new legends;
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 legends {
@@ -32,16 +36,16 @@ class legends {
var $base_url = "";
var $html = "";
function legends() {
function auto_run() {
//------------------------------------------------------
//-----------------------------------------
// $is_sub is a boolean operator.
// If set to 1, we don't show the "topic subscribed" page
// we simply end the subroutine and let the caller finish
// up for us.
//------------------------------------------------------
//-----------------------------------------
global $ibforums, $DB, $std, $print, $skin_universal;
global $ibforums, $DB, $std, $print;
$ibforums->lang = $std->load_words($ibforums->lang, 'lang_legends', $ibforums->lang_id );
@@ -51,9 +55,9 @@ class legends {
//--------------------------------------------
//-----------------------------------------
// What to do?
//--------------------------------------------
//-----------------------------------------
switch($ibforums->input['CODE'])
{
@@ -84,11 +88,11 @@ class legends {
}
//--------------------------------------------------------------
//-----------------------------------------
function find_user_one()
{
global $ibforums, $DB, $std;
global $ibforums, $DB, $std;
// entry=textarea&name=carbon_copy&sep=comma
@@ -102,11 +106,11 @@ class legends {
}
//--------------------------------------------------------------
//-----------------------------------------
function find_user_two()
{
global $ibforums, $DB, $std;
global $ibforums, $DB, $std;
$entry = (isset($ibforums->input['entry'])) ? $ibforums->input['entry'] : 'textarea';
$name = (isset($ibforums->input['name'])) ? $ibforums->input['name'] : 'carbon_copy';
@@ -128,8 +132,12 @@ class legends {
// Attempt a match
//-----------------------------------------
$DB->query("SELECT id, name FROM ibf_members WHERE LOWER(name) LIKE '".$ibforums->input['username']."%' LIMIT 0,101");
$DB->simple_construct( array( 'select' => 'id, name',
'from' => 'members',
'where' => "LOWER(name) LIKE '".$ibforums->input['username']."%'",
'limit' => array( 0,101) ) );
$DB->simple_exec();
if ( ! $DB->get_num_rows() )
{
$this->find_user_error('fu_no_match');
@@ -161,11 +169,11 @@ class legends {
}
//--------------------------------------------------------------
//-----------------------------------------
function find_user_error($error)
{
global $ibforums, $DB, $std;
global $ibforums, $DB, $std;
$this->page_title = $ibforums->lang['fu_title'];
@@ -176,11 +184,11 @@ class legends {
}
//--------------------------------------------------------------
//-----------------------------------------
function show_emoticons()
{
global $ibforums, $DB, $std;
global $ibforums, $DB, $std;
$this->page_title = $ibforums->lang['emo_title'];
@@ -188,8 +196,9 @@ class legends {
$this->output .= $this->html->page_header( $ibforums->lang['emo_title'], $ibforums->lang['emo_type'], $ibforums->lang['emo_img'] );
$DB->query("SELECT typed, image from ibf_emoticons");
$DB->simple_construct( array( 'select' => 'typed, image', 'from' => 'emoticons', 'where' => "emo_set='".$ibforums->skin['_emodir']."'" ) );
$DB->simple_exec();
if ( $DB->get_num_rows() )
{
while ( $r = $DB->fetch_row() )
@@ -214,53 +223,49 @@ class legends {
}
//--------------------------------------------------------------
//-----------------------------------------
// Show BBCode Helpy file
//--------------------------------------------------------------
//-----------------------------------------
function show_bbcode()
{
global $ibforums, $DB, $std;
global $ibforums, $DB, $std;
require './sources/lib/post_parser.php';
$this->parser = new post_parser();
//-------------------------------------------
//-----------------------------------------
// Array out or stuff here
//-------------------------------------------
//-----------------------------------------
$bbcode = array(
0 => array( '[b]', '[/b]', $ibforums->lang['bbc_ex1'] ),
1 => array('[s]', '[/s]', $ibforums->lang['bbc_ex1'] ),
2 => array('[i]', '[/i]', $ibforums->lang['bbc_ex1'] ),
3 => array('[u]', '[/u]', $ibforums->lang['bbc_ex1'] ),
4 => array('[email]', '[/email]', 'user@domain.com' ),
5 => array('[email=user@domain.com]', '[/email]', $ibforums->lang['bbc_ex2'] ),
6 => array('[url]', '[/url]', 'http://www.domain.com' ),
7 => array('[url=http://www.domain.com]', '[/url]', $ibforums->lang['bbc_ex2'] ),
8 => array('[size=7]', '[/size]' , $ibforums->lang['bbc_ex1'] ),
9 => array('[font=times]', '[/font]', $ibforums->lang['bbc_ex1'] ),
10 => array('[color=red]', '[/color]', $ibforums->lang['bbc_ex1'] ),
11 => array('[img]', '[/img]', $ibforums->vars['board_url'].'/'.$ibforums->vars['img_url'].'/icon11.gif' ),
12 => array('[list]', '[/list]', '[*]List Item [*]List Item' ),
13 => array('[list=1]', '[/list]', '[*]List Item [*]List Item' ),
14 => array('[list=a]', '[/list]', '[*]List Item [*]List Item' ),
15 => array('[list=i]', '[/list]', '[*]List Item [*]List Item' ),
16 => array('[quote]', '[/quote]', $ibforums->lang['bbc_ex1'] ),
17 => array('[code]', '[/code]', '$this_var = "Hello World!";' ),
18 => array('[sql]', '[/sql]', 'SELECT t.tid FROM a_table t WHERE t.val="This Value"' ),
19 => array('[html]', '[/html]', '&lt;a href=&quot;test/page.html&quot;&gt;A Test Page&lt;/a&gt;' ),
);
0 => array('[b]', '[/b]', $ibforums->lang['bbc_ex1'] ),
1 => array('[s]', '[/s]', $ibforums->lang['bbc_ex1'] ),
2 => array('[i]', '[/i]', $ibforums->lang['bbc_ex1'] ),
3 => array('[u]', '[/u]', $ibforums->lang['bbc_ex1'] ),
4 => array('[email]', '[/email]', 'user@domain.com' ),
5 => array('[email=user@domain.com]', '[/email]', $ibforums->lang['bbc_ex2'] ),
6 => array('[url]', '[/url]', 'http://www.domain.com' ),
7 => array('[url=http://www.domain.com]', '[/url]', $ibforums->lang['bbc_ex2'] ),
8 => array('[size=7]', '[/size]' , $ibforums->lang['bbc_ex1'] ),
9 => array('[font=times]', '[/font]', $ibforums->lang['bbc_ex1'] ),
10 => array('[color=red]', '[/color]', $ibforums->lang['bbc_ex1'] ),
11 => array('[img]', '[/img]', $ibforums->vars['board_url'].'/'.$ibforums->vars['img_url'].'/folder_post_icons/icon11.gif' ),
12 => array('[list]', '[/list]', '[*]List Item [*]List Item' ),
13 => array('[list=1]', '[/list]', '[*]List Item [*]List Item' ),
14 => array('[list=a]', '[/list]', '[*]List Item [*]List Item' ),
15 => array('[list=i]', '[/list]', '[*]List Item [*]List Item' ),
16 => array('[quote]', '[/quote]', $ibforums->lang['bbc_ex1'] ),
17 => array('[code]', '[/code]', '$this_var = "Hello World!";' ),
18 => array('[sql]', '[/sql]', 'SELECT t.tid FROM a_table t WHERE t.val="This Value"' ),
19 => array('[html]', '[/html]', '&lt;a href=&quot;test/page.html&quot;&gt;A Test Page&lt;/a&gt;' ),
);
$this->page_title = $ibforums->lang['bbc_title'];
$this->output .= $this->html->bbcode_header();
$this->output .= $this->html->page_header( $ibforums->lang['bbc_title'], $ibforums->lang['bbc_before'], $ibforums->lang['bbc_after'] );
foreach( $bbcode as $bbc )
{
$open = $bbc[0];
@@ -270,22 +275,50 @@ class legends {
$before = $this->html->wrap_tag($open) . $content . $this->html->wrap_tag($close);
$after = $this->parser->convert( array( 'TEXT' => $open.$content.$close, 'CODE' => 1 ) );
$this->output .= $this->html->bbcode_row_header( $ibforums->lang['bbc_title']);
$this->output .= $this->html->bbcode_row( $before, stripslashes($after) );
$this->output .= $this->html->bbcode_row_footer();
}
$this->output .= $this->html->page_footer();
//-----------------------------------------
// Add in custom bbcode
//-----------------------------------------
$DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
$DB->simple_exec();
while ( $row = $DB->fetch_row() )
{
$before = $row['bbcode_example'];
$t = $before;
$replace = explode( '{content}', $row['bbcode_replace'] );
if ( $row['bbcode_useoption'] )
{
$t = preg_replace( "#\[".$row['bbcode_tag']."=(?:&quot;|&\#39;)?(.+?)(?:&quot;|&\#39;)?\]#si", str_replace( '{option}', "\\1", $replace[0] ), $t );
}
else
{
$t = str_replace( '['.$row['bbcode_tag'].']' , $replace[0], $t );
}
$t = str_replace( '[/'.$row['bbcode_tag'].']', $replace[1], $t );
$before = preg_replace( "#(\[".$row['bbcode_tag']."(?:[^\]]+)?\])#is", $this->html->wrap_tag("\\1"), $before );
$before = preg_replace( "#(\[/".$row['bbcode_tag']."\])#is" , $this->html->wrap_tag("\\1"), $before );
$this->output .= $this->html->bbcode_row_header( $row['bbcode_title'], $row['bbcode_desc'] );
$this->output .= $this->html->bbcode_row( $before, $t );
$this->output .= $this->html->bbcode_row_footer();
}
}
}
?>
?>