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,27 +2,17 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| 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-03-01 16:47:10 +0000 (Wed, 01 Mar 2006) $
|
||||
| > $Revision: 152 $
|
||||
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
@@ -45,7 +35,7 @@
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -196,6 +186,33 @@ class component_public
|
||||
|
||||
$this->ipsclass->vars[ $r['conf_key'] ] = $value;
|
||||
}
|
||||
|
||||
if( $this->ipsclass->vars['chat04_access_groups'] )
|
||||
{
|
||||
$access_groups = explode( ",", $this->ipsclass->vars['chat04_access_groups'] );
|
||||
|
||||
$my_groups = array( $this->ipsclass->member['mgroup'] );
|
||||
|
||||
if( $this->ipsclass->member['mgroup_others'] )
|
||||
{
|
||||
$my_groups = array_merge( $my_groups, explode( ",", $this->ipsclass->clean_perm_string( $this->ipsclass->member['mgroup_others'] ) ) );
|
||||
}
|
||||
|
||||
$access_allowed = 0;
|
||||
|
||||
foreach( $my_groups as $group_id )
|
||||
{
|
||||
if( in_array( $group_id, $access_groups ) )
|
||||
{
|
||||
$access_allowed = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if( !$access_allowed )
|
||||
{
|
||||
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Width and Height
|
||||
@@ -332,7 +349,7 @@ class component_public
|
||||
$tmpname = preg_replace( "#\s#", "_", $tmpname );
|
||||
$tmpname = preg_replace( "#(?:[^\w\d\_])#is", "-", $tmpname );
|
||||
|
||||
if ( intval( $this->ipsclass->vars['parachat_version'] ) )
|
||||
if ( intval( $this->ipsclass->vars['parachat_version'] ) > 6 )
|
||||
{
|
||||
$return ="<param name=\"Ctrl.AutoLogin\" value=\"true\">
|
||||
<param name=\"Net.User\" value=\"".$tmpname."\">
|
||||
|
||||
@@ -2,27 +2,17 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| 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-11 13:14:29 +0100 (Tue, 11 Oct 2005) $
|
||||
| > $Revision: 38 $
|
||||
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
|
||||
| > $Revision: 567 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
@@ -45,7 +35,7 @@
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -202,6 +192,20 @@ class component_public
|
||||
|
||||
$this->ipsclass->vars[ $r['conf_key'] ] = $value;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Can this group access chat?
|
||||
//-----------------------------------------
|
||||
|
||||
if( $this->ipsclass->vars['chat_access_groups'] )
|
||||
{
|
||||
$group_access = explode( ",", $this->ipsclass->vars['chat_access_groups'] );
|
||||
|
||||
if( !in_array( $this->ipsclass->member['mgroup'], $group_access ) )
|
||||
{
|
||||
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission') );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Got address?
|
||||
@@ -236,7 +240,7 @@ class component_public
|
||||
|
||||
if ( $this->ipsclass->member['id'] )
|
||||
{
|
||||
$user = $this->ipsclass->member['name'];
|
||||
$user = $this->ipsclass->member['members_display_name'];
|
||||
|
||||
$converge_member = $this->ipsclass->converge->converge_load_member_by_id($this->ipsclass->member['id']);
|
||||
$pass = $this->ipsclass->converge->member['converge_pass_hash'];
|
||||
|
||||
@@ -2,24 +2,16 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| Invision Power Board v<{%dyn.down.var.human.version%}>
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 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
|
||||
| Time: <{%dyn.down.var.time%}>
|
||||
| Release: <{%dyn.down.var.md5%}>
|
||||
| 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-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
@@ -45,7 +37,7 @@
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,24 +2,16 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| Invision Power Board v<{%dyn.down.var.human.version%}>
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 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
|
||||
| Time: <{%dyn.down.var.time%}>
|
||||
| Release: <{%dyn.down.var.md5%}>
|
||||
| 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-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
|
||||
| > $Revision: 23 $
|
||||
@@ -45,7 +37,7 @@
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -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>␍
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------
|
||||
|
|
||||
| INVISION POWER BOARD: PROFILE PORTAL MODULE (CONFIG)
|
||||
| Author: Matt Mecham
|
||||
| (c) Invision Power Services, Inc. 2006
|
||||
|
|
||||
\*-----------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Plug in name (Default tab name)
|
||||
*/
|
||||
$CONFIG['plugin_name'] = 'Gallery';
|
||||
|
||||
/**
|
||||
* Language string for the tab
|
||||
*/
|
||||
$CONFIG['plugin_lang_bit'] = 'pp_tab_gallery';
|
||||
|
||||
/**
|
||||
* Plug in key (must be the same as the main {file}.php name
|
||||
*/
|
||||
$CONFIG['plugin_key'] = 'gallery';
|
||||
|
||||
/**
|
||||
* Show tab?
|
||||
*/
|
||||
$CONFIG['plugin_enabled'] = @file_exists( ROOT_PATH . 'modules/gallery' ) ? 1 : 0;
|
||||
|
||||
/**
|
||||
* Order: CANNOT USE 1
|
||||
*/
|
||||
$CONFIG['plugin_order'] = 3;
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-08-01 17:02:55 +0100 (Tue, 01 Aug 2006) $
|
||||
| > $Revision: 425 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Personal Profile Portal Class: Blog
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 2nd August 2006
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Main content
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class profile_gallery
|
||||
{
|
||||
/**
|
||||
* Global IPSCLASS
|
||||
* @var object
|
||||
*/
|
||||
var $ipsclass;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Return data
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Returns a block of HTML back to the ajax handler
|
||||
* which then replaces the inline content with the HTML
|
||||
* returned.
|
||||
*
|
||||
*/
|
||||
function return_html_block( $member=array() )
|
||||
{
|
||||
define( 'GALLERY_PATH', ROOT_PATH.'modules/gallery/' );
|
||||
|
||||
$this->ipsclass->load_language( 'lang_gallery' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get gallery library and API
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH.'sources/api/api_core.php' );
|
||||
require_once( ROOT_PATH . 'sources/api/gallery/api_gallery.php' );
|
||||
|
||||
require_once( ROOT_PATH . 'modules/gallery/lib/gallery_library.php' );
|
||||
$this->glib = new gallery_lib();
|
||||
$this->glib->ipsclass = $this->ipsclass;
|
||||
|
||||
//-----------------------------------------
|
||||
// Create API Object
|
||||
//-----------------------------------------
|
||||
|
||||
$gal_api = new api_gallery;
|
||||
$gal_api->ipsclass = $this->ipsclass;
|
||||
$gal_api->glib = & $this->glib;
|
||||
|
||||
//-----------------------------------------
|
||||
// Get images
|
||||
//-----------------------------------------
|
||||
|
||||
$images = $gal_api->return_gallery_data( $member['id'], 6, 0 );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get Image Library
|
||||
//-----------------------------------------
|
||||
|
||||
require_once ROOT_PATH . 'modules/gallery/lib/imagelisting.php';
|
||||
$img_list = new ImageListing();
|
||||
$img_list->ipsclass =& $this->ipsclass;
|
||||
$img_list->glib = $this->glib;
|
||||
$img_list->init();
|
||||
|
||||
//-----------------------------------------
|
||||
// Pass some values from API
|
||||
//-----------------------------------------
|
||||
|
||||
$img_list->res = $gal_api->res;
|
||||
$img_list->total_images = $gal_api->total;
|
||||
|
||||
//-----------------------------------------
|
||||
// Ready to pull formatted stuff?
|
||||
//-----------------------------------------
|
||||
|
||||
$output = "<script type='text/javascript'>var ids_to_imgs = new Array();</script>";
|
||||
|
||||
$output .= $img_list->img_html->container_row_top();
|
||||
|
||||
$output .= $img_list->get_html_listing( array( 'imgs_per_col' => 3,
|
||||
'imgs_per_row' => 2,
|
||||
'can_rate' => ( $this->ipsclass->vars['gallery_use_rate'] AND $this->ipsclass->member['g_rate'] ) ? 1 : 0,
|
||||
) );
|
||||
|
||||
$output .= $img_list->img_html->container_row_bottom();
|
||||
|
||||
$output .= "<script type='text/javascript'>menu_do_global_init();</script>";
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Macros...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_array( $this->ipsclass->skin['_macros'] ) OR ! count( $this->ipsclass->skin['_macros'] ) )
|
||||
{
|
||||
$this->ipsclass->skin['_macros'] = unserialize( stripslashes($this->ipsclass->skin['_macro']) );
|
||||
}
|
||||
|
||||
if ( is_array( $this->ipsclass->skin['_macros'] ) )
|
||||
{
|
||||
foreach( $this->ipsclass->skin['_macros'] as $row )
|
||||
{
|
||||
if ( $row['macro_value'] != "" )
|
||||
{
|
||||
$output = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $output );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$output = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $output );
|
||||
$output = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $output );
|
||||
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------
|
||||
|
|
||||
| INVISION POWER BOARD: PROFILE PORTAL MODULE (CONFIG)
|
||||
| Author: Matt Mecham
|
||||
| (c) Invision Power Services, Inc. 2006
|
||||
|
|
||||
\*-----------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Plug in name (Default tab name)
|
||||
*/
|
||||
$CONFIG['plugin_name'] = 'Replies';
|
||||
|
||||
/**
|
||||
* Language string for the tab
|
||||
*/
|
||||
$CONFIG['plugin_lang_bit'] = 'pp_tab_posts';
|
||||
|
||||
/**
|
||||
* Plug in key (must be the same as the main {file}.php name
|
||||
*/
|
||||
$CONFIG['plugin_key'] = 'posts';
|
||||
|
||||
/**
|
||||
* Show tab?
|
||||
*/
|
||||
$CONFIG['plugin_enabled'] = 1;
|
||||
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
$CONFIG['plugin_order'] = 2;
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,206 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-08-01 17:02:55 +0100 (Tue, 01 Aug 2006) $
|
||||
| > $Revision: 425 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Personal Profile Portal Class: Posts
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 2nd August 2006
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Main content
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class profile_posts
|
||||
{
|
||||
/**
|
||||
* Global IPSCLASS
|
||||
* @var object
|
||||
*/
|
||||
var $ipsclass;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Return data
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Returns a block of HTML back to the ajax handler
|
||||
* which then replaces the inline content with the HTML
|
||||
* returned.
|
||||
*
|
||||
*/
|
||||
function return_html_block( $member=array() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$content = '';
|
||||
$last_x = 5;
|
||||
$forum_ids = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Skin set loaded?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_object( $this->ipsclass->compiled_templates['skin_profile'] ) )
|
||||
{
|
||||
$this->ipsclass->load_template( 'skin_profile' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Got a member?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_array( $member ) OR ! count( $member ) )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Allowed forums...
|
||||
//-----------------------------------------
|
||||
|
||||
$forum_ids = $this->ipsclass->forums->forums_get_all_allowed_forum_ids( 'read_perms' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check.. Again...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_array( $forum_ids ) OR ! count( $forum_ids ) )
|
||||
{
|
||||
return $this->ipsclass->lang['err_no_posts_to_show'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load parser
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" );
|
||||
$parser = new parse_bbcode();
|
||||
$parser->ipsclass = $this->ipsclass;
|
||||
$parser->allow_update_caches = 0;
|
||||
|
||||
$parser->bypass_badwords = intval( $this->ipsclass->member['g_bypass_badwords'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get last X posts
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'p.*',
|
||||
'from' => array( 'posts' => 'p' ),
|
||||
'where' => 't.tid=p.topic_id AND p.queued=0 AND p.author_id='.$member['id'] . " AND p.new_topic=0",
|
||||
'order' => 'p.post_date DESC',
|
||||
'limit' => array( 0, $last_x ),
|
||||
'add_join' => array( 0 => array(
|
||||
'select' => 't.*',
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => 't.forum_id IN(' . implode( ',', $forum_ids ). ')',
|
||||
'type' => 'inner' ) ) ) );
|
||||
|
||||
$o = $this->ipsclass->DB->exec_query();
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row( $o ) )
|
||||
{
|
||||
$row['_post_date'] = $this->ipsclass->get_date( $row['post_date'], 'SHORT' );
|
||||
$row['_date_array'] = $this->ipsclass->date_getgmdate( $row['post_date'] + $this->ipsclass->get_time_offset() );
|
||||
|
||||
$parser->parse_html = ( $this->ipsclass->cache['forum_cache'][ $row['forum_id'] ]['use_html'] and $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0;
|
||||
$parser->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0;
|
||||
|
||||
$row['post'] = $parser->pre_display_parse( $row['post'] );
|
||||
|
||||
$row['post'] .= "\n<!--IBF.ATTACHMENT_". $row['pid']. "-->";
|
||||
|
||||
//-----------------------------------------
|
||||
// ATTACHMENTS
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $row['topic_hasattach'] )
|
||||
{
|
||||
if ( ! is_object( $this->class_attach ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Grab render attach class
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' );
|
||||
$this->class_attach = new class_attach();
|
||||
$this->class_attach->ipsclass =& $this->ipsclass;
|
||||
|
||||
$this->ipsclass->load_template( 'skin_topic' );
|
||||
}
|
||||
|
||||
$this->class_attach->type = 'post';
|
||||
$this->class_attach->init();
|
||||
|
||||
$row['post'] = $this->class_attach->render_attachments( $row['post'], array( $row['pid'] => $row['pid'] ) );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Hex encoding...
|
||||
//-----------------------------------------
|
||||
|
||||
$row['post'] = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $row['post'] );
|
||||
$row['post'] = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $row['post'] );
|
||||
|
||||
$content .= $this->ipsclass->compiled_templates['skin_profile']->personal_portal_single_column( $row, $this->ipsclass->lang['profile_read_topic'], $this->ipsclass->base_url.'act=findpost&pid='.$row['pid'], $this->ipsclass->lang['profile_in_topic'] . $row['title'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Macros...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_array( $this->ipsclass->skin['_macros'] ) OR ! count( $this->ipsclass->skin['_macros'] ) )
|
||||
{
|
||||
$this->ipsclass->skin['_macros'] = unserialize( stripslashes($this->ipsclass->skin['_macro']) );
|
||||
}
|
||||
|
||||
if ( is_array( $this->ipsclass->skin['_macros'] ) )
|
||||
{
|
||||
foreach( $this->ipsclass->skin['_macros'] as $row )
|
||||
{
|
||||
if ( $row['macro_value'] != "" )
|
||||
{
|
||||
$content = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $content );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $content );
|
||||
$content = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $content );
|
||||
|
||||
//-----------------------------------------
|
||||
// Return content..
|
||||
//-----------------------------------------
|
||||
|
||||
return $content ? $content : $this->ipsclass->compiled_templates['skin_profile']->personal_portal_no_content( 'err_no_posts_to_show' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/*-----------------------------------------------------------------------
|
||||
|
|
||||
| INVISION POWER BOARD: PROFILE PORTAL MODULE (CONFIG)
|
||||
| Author: Matt Mecham
|
||||
| (c) Invision Power Services, Inc. 2006
|
||||
|
|
||||
\*-----------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Plug in name (Default tab name)
|
||||
*/
|
||||
$CONFIG['plugin_name'] = 'Topics';
|
||||
|
||||
/**
|
||||
* Language string for the tab
|
||||
*/
|
||||
$CONFIG['plugin_lang_bit'] = 'pp_tab_topics';
|
||||
|
||||
/**
|
||||
* Plug in key (must be the same as the main {file}.php name
|
||||
*/
|
||||
$CONFIG['plugin_key'] = 'topics';
|
||||
|
||||
/**
|
||||
* Show tab?
|
||||
*/
|
||||
$CONFIG['plugin_enabled'] = 1;
|
||||
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
$CONFIG['plugin_order'] = 1;
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,213 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2006 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-08-01 17:02:55 +0100 (Tue, 01 Aug 2006) $
|
||||
| > $Revision: 425 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Personal Profile Portal Class: Topics
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 2nd August 2006
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* Main content
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class profile_topics
|
||||
{
|
||||
/**
|
||||
* Global IPSCLASS
|
||||
* @var object
|
||||
*/
|
||||
var $ipsclass;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Return data
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Returns a block of HTML back to the ajax handler
|
||||
* which then replaces the inline content with the HTML
|
||||
* returned.
|
||||
*
|
||||
*/
|
||||
function return_html_block( $member=array() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$content = '';
|
||||
$last_x = 5;
|
||||
$forum_ids = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Skin set loaded?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_object( $this->ipsclass->compiled_templates['skin_profile'] ) )
|
||||
{
|
||||
$this->ipsclass->load_template( 'skin_profile' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Got a member?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_array( $member ) OR ! count( $member ) )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Allowed forums...
|
||||
//-----------------------------------------
|
||||
|
||||
$forum_ids = $this->ipsclass->forums->forums_get_all_allowed_forum_ids( 'read_perms' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check.. Again...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_array( $forum_ids ) OR ! count( $forum_ids ) )
|
||||
{
|
||||
return $this->ipsclass->lang['err_no_posts_to_show'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load parser
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" );
|
||||
$parser = new parse_bbcode();
|
||||
$parser->ipsclass = $this->ipsclass;
|
||||
$parser->allow_update_caches = 0;
|
||||
|
||||
$parser->bypass_badwords = intval( $this->ipsclass->member['g_bypass_badwords'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get last X posts
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 't.*',
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => 't.starter_id='.$member['id'].' AND t.forum_id IN(' . implode( ',', $forum_ids ). ') AND t.approved=1',
|
||||
'order' => 't.start_date DESC',
|
||||
'limit' => array( 0, $last_x ),
|
||||
'add_join' => array( 0 => array(
|
||||
'select' => 'p.*',
|
||||
'from' => array( 'posts' => 'p' ),
|
||||
'where' => 't.topic_firstpost=p.pid',
|
||||
'type' => 'inner' ) ) ) ) ;
|
||||
|
||||
$o = $this->ipsclass->DB->exec_query();
|
||||
|
||||
while( $row = $this->ipsclass->DB->fetch_row( $o ) )
|
||||
{
|
||||
$row['_post_date'] = $this->ipsclass->get_date( $row['post_date'], 'SHORT' );
|
||||
$row['_date_array'] = $this->ipsclass->date_getgmdate( $row['post_date'] + $this->ipsclass->get_time_offset() );
|
||||
|
||||
$parser->parse_html = ( $this->ipsclass->cache['forum_cache'][ $row['forum_id'] ]['use_html'] and $this->ipsclass->cache['group_cache'][ $member['mgroup'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0;
|
||||
$parser->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0;
|
||||
|
||||
$row['post'] = $parser->pre_display_parse( $row['post'] );
|
||||
|
||||
$row['post'] .= "\n<!--IBF.ATTACHMENT_". $row['pid']. "-->";
|
||||
|
||||
//-----------------------------------------
|
||||
// ATTACHMENTS
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $row['topic_hasattach'] )
|
||||
{
|
||||
if ( ! is_object( $this->class_attach ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Grab render attach class
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' );
|
||||
$this->class_attach = new class_attach();
|
||||
$this->class_attach->ipsclass =& $this->ipsclass;
|
||||
|
||||
$this->ipsclass->load_template( 'skin_topic' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Not got permission to view downloads?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $row['forum_id'] ]['download_perms']) === FALSE )
|
||||
{
|
||||
$this->ipsclass->vars['show_img_upload'] = 0;
|
||||
}
|
||||
|
||||
$this->class_attach->type = 'post';
|
||||
$this->class_attach->init();
|
||||
|
||||
$row['post'] = $this->class_attach->render_attachments( $row['post'], array( $row['pid'] => $row['pid'] ) );
|
||||
}
|
||||
|
||||
$content .= $this->ipsclass->compiled_templates['skin_profile']->personal_portal_single_column( $row, $this->ipsclass->lang['profile_read_topic'], $this->ipsclass->base_url.'act=findpost&pid='.$row['pid'], $row['title'] );
|
||||
}
|
||||
|
||||
if ( stristr( $content, "[attachmentid=" ) )
|
||||
{
|
||||
$content = preg_replace( "#\[attachmentid=(\d+)\]#is", "", $content );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Macros...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_array( $this->ipsclass->skin['_macros'] ) OR ! count( $this->ipsclass->skin['_macros'] ) )
|
||||
{
|
||||
$this->ipsclass->skin['_macros'] = unserialize( stripslashes($this->ipsclass->skin['_macro']) );
|
||||
}
|
||||
|
||||
if ( is_array( $this->ipsclass->skin['_macros'] ) )
|
||||
{
|
||||
foreach( $this->ipsclass->skin['_macros'] as $row )
|
||||
{
|
||||
if ( $row['macro_value'] != "" )
|
||||
{
|
||||
$content = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $content );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$content = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $content );
|
||||
$content = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $content );
|
||||
|
||||
//-----------------------------------------
|
||||
// Return content..
|
||||
//-----------------------------------------
|
||||
|
||||
return $content ? $content : $this->ipsclass->compiled_templates['skin_profile']->personal_portal_no_content( 'err_no_posts_to_show' );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user