Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Member form manipulation
|
||||
* Last Updated: $Date: 2010-01-15 14:28:09 -0500 (Fri, 15 Jan 2010) $
|
||||
* Last Updated: $Date: 2011-03-10 21:04:50 -0500 (Thu, 10 Mar 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: josh $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 5715 $
|
||||
* @version $Revision: 8024 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -33,7 +33,6 @@ class admin_member_form__members implements admin_member_form
|
||||
* This can be left blank and the application title will
|
||||
* be used
|
||||
*
|
||||
* @access public
|
||||
* @var string Tab name
|
||||
*/
|
||||
public $tab_name = "";
|
||||
@@ -51,7 +50,6 @@ class admin_member_form__members implements admin_member_form
|
||||
* Use the format:
|
||||
* $array[] = array( 'img' => '', 'url' => '', 'title' => '' );
|
||||
*
|
||||
* @access public
|
||||
* @author Matt Mecham
|
||||
* @param array Member data
|
||||
* @return array Array of links
|
||||
@@ -106,7 +104,6 @@ class admin_member_form__members implements admin_member_form
|
||||
/**
|
||||
* Returns content for the page.
|
||||
*
|
||||
* @access public
|
||||
* @author Matt Mecham
|
||||
* @param array Member data
|
||||
* @return array Array of tabs, content
|
||||
@@ -119,7 +116,6 @@ class admin_member_form__members implements admin_member_form
|
||||
/**
|
||||
* Process the entries for saving and return
|
||||
*
|
||||
* @access public
|
||||
* @author Brandon Farber
|
||||
* @return array Multi-dimensional array (core, extendedProfile) for saving
|
||||
*/
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board messenger attachments plugin
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* Last Updated: $Date: 2011-09-20 21:18:18 -0400 (Tue, 20 Sep 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 5713 $
|
||||
* @version $Revision: 9520 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -29,7 +29,6 @@ class plugin_msg extends class_attach
|
||||
/**
|
||||
* Module type
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $module = 'msg';
|
||||
@@ -37,7 +36,6 @@ class plugin_msg extends class_attach
|
||||
/**
|
||||
* Checks the attachment and checks for download / show perms
|
||||
*
|
||||
* @access public
|
||||
* @param integer Attachment id
|
||||
* @return array Attachment data
|
||||
*/
|
||||
@@ -77,7 +75,7 @@ class plugin_msg extends class_attach
|
||||
// Check..
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! isset( $attach['msg_id'] ) OR empty( $attach['msg_id'] ) )
|
||||
if ( empty( $attach['msg_id'] ) )
|
||||
{
|
||||
if( $attach['attach_member_id'] != $this->memberData['member_id'] )
|
||||
{
|
||||
@@ -115,7 +113,6 @@ class plugin_msg extends class_attach
|
||||
/**
|
||||
* Check the attachment and make sure its OK to display
|
||||
*
|
||||
* @access public
|
||||
* @param array Array of ids
|
||||
* @param array Array of relationship ids
|
||||
* @return array Attachment data
|
||||
@@ -216,7 +213,6 @@ class plugin_msg extends class_attach
|
||||
/**
|
||||
* Recounts number of attachments for the articles row
|
||||
*
|
||||
* @access public
|
||||
* @param string Post key
|
||||
* @param integer Related ID
|
||||
* @param array Arguments for query
|
||||
@@ -236,7 +232,7 @@ class plugin_msg extends class_attach
|
||||
|
||||
if ( ! $post_key )
|
||||
{
|
||||
return 0;
|
||||
return array( 'count' => 0 );
|
||||
}
|
||||
|
||||
|
||||
@@ -255,7 +251,6 @@ class plugin_msg extends class_attach
|
||||
/**
|
||||
* Recounts number of attachments for the articles row
|
||||
*
|
||||
* @access public
|
||||
* @param array Attachment data
|
||||
* @return boolean
|
||||
*/
|
||||
@@ -320,7 +315,6 @@ class plugin_msg extends class_attach
|
||||
* Returns TRUE or FALSE
|
||||
* IT really does
|
||||
*
|
||||
* @access public
|
||||
* @param array Ids to check against
|
||||
* @return boolean
|
||||
*/
|
||||
@@ -334,7 +328,6 @@ class plugin_msg extends class_attach
|
||||
* Returns TRUE or FALSE
|
||||
* IT really does
|
||||
*
|
||||
* @access public
|
||||
* @param array Attachment data
|
||||
* @return boolean
|
||||
*/
|
||||
@@ -388,7 +381,6 @@ class plugin_msg extends class_attach
|
||||
* Return 'space_allowed' as 0 to allow unlimited uploads
|
||||
* Return 'max_single_upload' as 0 to not set a limit
|
||||
*
|
||||
* @access public
|
||||
* @param string MD5 post key
|
||||
* @param id Member ID
|
||||
* @return array [ 'space_used', 'space_left', 'space_allowed', 'max_single_upload' ]
|
||||
@@ -432,7 +424,7 @@ class plugin_msg extends class_attach
|
||||
'from' => 'attachments',
|
||||
'where' => "attach_post_key='".$post_key."'" ) );
|
||||
|
||||
$space_used = intval( $_space_used['figure'] );
|
||||
$space_used = $_space_used['figure'] ? $_space_used['figure'] : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -444,7 +436,7 @@ class plugin_msg extends class_attach
|
||||
'from' => 'attachments',
|
||||
'where' => 'attach_member_id='.$member_id . " AND attach_rel_module IN( 'post', 'msg' )" ) );
|
||||
|
||||
$space_used = intval( $_space_used['figure'] );
|
||||
$space_used = $_space_used['figure'] ? $_space_used['figure'] : 0;
|
||||
}
|
||||
//-----------------------------------------
|
||||
// Generate space allowed figure
|
||||
@@ -458,9 +450,9 @@ class plugin_msg extends class_attach
|
||||
'from' => 'attachments',
|
||||
'where' => 'attach_member_id='.$member_id . " AND attach_rel_module IN( 'post', 'msg' )" ) );
|
||||
|
||||
$g_space_used = intval( $_g_space_used['figure'] );
|
||||
$g_space_used = $_g_space_used['figure'] ? $_g_space_used['figure'] : 0;
|
||||
|
||||
if( intval( ( $this->memberData['g_attach_max'] * 1024 ) - $g_space_used ) < 0 )
|
||||
if( ( $this->memberData['g_attach_max'] * 1024 ) - $g_space_used < 0 )
|
||||
{
|
||||
$space_used = $g_space_used;
|
||||
$total_space_allowed = $this->memberData['g_attach_max'] * 1024;
|
||||
@@ -537,7 +529,6 @@ class plugin_msg extends class_attach
|
||||
* You can omit any of these settings and IPB will use the default
|
||||
* settings (which are the ones entered into the ACP for post thumbnails)
|
||||
*
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function getSettings()
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Core extensions
|
||||
* Last Updated: $Date: 2010-09-15 19:24:12 -0400 (Wed, 15 Sep 2010) $
|
||||
* Last Updated: $Date: 2011-03-10 21:04:50 -0500 (Thu, 10 Mar 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 6882 $
|
||||
* @version $Rev: 8024 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -33,7 +33,6 @@ class publicSessions__members
|
||||
* current_appcomponent, current_module and current_section are automatically
|
||||
* stored. This function allows you to add specific variables in.
|
||||
*
|
||||
* @access public
|
||||
* @author Matt Mecham
|
||||
* @return array
|
||||
*/
|
||||
@@ -48,7 +47,7 @@ class publicSessions__members
|
||||
'location_2_type' => '',
|
||||
'location_2_id' => 0 );
|
||||
|
||||
if( ( isset(ipsRegistry::$request['id']) AND ipsRegistry::$request['id'] ) AND ipsRegistry::$request['section'] == 'view' AND ipsRegistry::$request['module'] == 'profile' )
|
||||
if( !empty(ipsRegistry::$request['id']) AND ipsRegistry::$request['section'] == 'view' AND ipsRegistry::$request['module'] == 'profile' )
|
||||
{
|
||||
$array['location_1_type'] = 'profile';
|
||||
$array['location_1_id'] = ipsRegistry::$request['id'];
|
||||
@@ -60,7 +59,6 @@ class publicSessions__members
|
||||
/**
|
||||
* Parse/format the online list data for the records
|
||||
*
|
||||
* @access public
|
||||
* @author Brandon Farber
|
||||
* @param array Online list rows to check against
|
||||
* @return array Online list rows parsed
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Core variables extension file
|
||||
* Last Updated: $Date: 2010-09-22 11:32:51 -0400 (Wed, 22 Sep 2010) $
|
||||
* Last Updated: $Date: 2010-12-19 21:06:50 -0500 (Sun, 19 Dec 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: terabyte $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 6904 $
|
||||
* @version $Revision: 7452 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -76,7 +76,7 @@ if( isset( $_GET['section'] ) && $_GET['section'] == 'status' )
|
||||
}
|
||||
|
||||
# PROFILE
|
||||
if ( ( isset( $_GET['showuser'] ) && $_GET['showuser'] ) OR $_GET['module'] == 'profile' AND $_GET['section'] == 'view' )
|
||||
if ( !empty( $_GET['showuser'] ) OR ( $_GET['module'] == 'profile' AND $_GET['section'] == 'view' ) )
|
||||
{
|
||||
$_LOAD['ranks'] = 1;
|
||||
$_LOAD['profilefields'] = 1;
|
||||
@@ -87,6 +87,11 @@ if ( ( isset( $_GET['showuser'] ) && $_GET['showuser'] ) OR $_GET['module'] == '
|
||||
$_LOAD['moderators'] = 1;
|
||||
}
|
||||
|
||||
if( IN_ACP )
|
||||
{
|
||||
$_LOAD['moderators'] = 1;
|
||||
}
|
||||
|
||||
/* Never, ever remove or re-order these options!!
|
||||
* Feel free to add, though. :) */
|
||||
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Dashboard Notifications
|
||||
* Last Updated: $Date
|
||||
*
|
||||
* @author $Author: mark $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6688 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8397 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -44,12 +44,13 @@ class dashboardNotifications__members
|
||||
{
|
||||
if( $this->settings['reg_auth_type'] == 'admin' )
|
||||
{
|
||||
$where = " new_reg=1";
|
||||
$where = "v.new_reg=1";
|
||||
}
|
||||
else
|
||||
{
|
||||
$where = "new_reg=1 AND user_verified=1";
|
||||
$where = "v.new_reg=1 AND v.user_verified=1";
|
||||
}
|
||||
|
||||
$count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count',
|
||||
'from' => array( 'validating' => 'v' ),
|
||||
'where' => "v.lost_pass=0 AND m.member_group_id={$this->settings['auth_group']} AND {$where}",
|
||||
@@ -61,7 +62,7 @@ class dashboardNotifications__members
|
||||
|
||||
if ( $count )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_validations'], sprintf( $this->lang->words['cp_validations_info'], $count ) . ' <a href="' . ipsRegistry::getClass('output')->buildUrl( 'app=members&module=members§ion=members§ion=tools&do=validating', 'admin' ) . '">' . $this->lang->words['cp_validations_review'] . '</a>' );
|
||||
$entries[] = array( $this->lang->words['cp_validations'], sprintf( $this->lang->words['cp_validations_info'], $count ) . ' <a href="' . ipsRegistry::getClass('output')->buildUrl( 'app=members&module=members&section=members&do=members_overview&type=validating', 'admin' ) . '">' . $this->lang->words['cp_validations_review'] . '</a>' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Define data hook locations (Members)
|
||||
* Last Updated: $Date: 2010-10-12 13:04:59 -0400 (Tue, 12 Oct 2010) $
|
||||
* Last Updated: $Date: 2011-05-18 04:49:10 -0400 (Wed, 18 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6964 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8812 $
|
||||
*/
|
||||
|
||||
$dataHookLocations = array(
|
||||
@@ -27,8 +27,4 @@ $dataHookLocations = array(
|
||||
array( 'profileCommentNew', 'Profile: New comment' ),
|
||||
array( 'profileFriendsNew', 'Profile: New friend' ),
|
||||
|
||||
/* OUTPUT ARRAYS */
|
||||
array( 'memberListData', 'Member List View Output' ),
|
||||
array( 'onlineUsersListData', 'Online Users List Output' ),
|
||||
|
||||
);
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* BBCode Management : Determines if bbcode can be used in this section
|
||||
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* Last Updated: $LastChangedDate: 2010-12-17 07:40:13 -0500 (Fri, 17 Dec 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 5713 $
|
||||
* @version $Rev: 7442 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4136 $
|
||||
*
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* RSS output plugin :: posts
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 5713 $
|
||||
* @version $Revision: 8644 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -29,24 +29,22 @@ class furlRedirect_members
|
||||
/**
|
||||
* Key type: Type of action (topic/forum)
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $_type = '';
|
||||
protected $_type = '';
|
||||
|
||||
/**
|
||||
* Key ID
|
||||
*
|
||||
* @access private
|
||||
* @var int
|
||||
*/
|
||||
private $_id = 0;
|
||||
protected $_id = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*/
|
||||
function __construct( ipsRegistry $registry )
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->DB = $registry->DB();
|
||||
@@ -57,7 +55,6 @@ class furlRedirect_members
|
||||
* Set the key ID
|
||||
* <code>furlRedirect_forums::setKey( 'topic', 12 );</code>
|
||||
*
|
||||
* @access public
|
||||
* @param string Type
|
||||
* @param mixed Value
|
||||
*/
|
||||
@@ -70,9 +67,8 @@ class furlRedirect_members
|
||||
/**
|
||||
* Set up the key by URI
|
||||
*
|
||||
* @access public
|
||||
* @param string URI (example: index.php?showtopic=5&view=getlastpost)
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function setKeyByUri( $uri )
|
||||
{
|
||||
@@ -103,7 +99,6 @@ class furlRedirect_members
|
||||
/**
|
||||
* Return the SEO title
|
||||
*
|
||||
* @access public
|
||||
* @return string The SEO friendly name
|
||||
*/
|
||||
public function fetchSeoTitle()
|
||||
@@ -122,7 +117,6 @@ class furlRedirect_members
|
||||
/**
|
||||
* Return the SEO title for a user
|
||||
*
|
||||
* @access public
|
||||
* @return string The SEO friendly name
|
||||
*/
|
||||
public function _fetchSeoTitle_user()
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Sets up SEO templates
|
||||
* Last Updated: $Date: 2010-06-15 03:53:37 -0400 (Tue, 15 Jun 2010) $
|
||||
* Last Updated: $Date: 2011-04-11 06:49:17 -0400 (Mon, 11 Apr 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 6531 $
|
||||
* @version $Rev: 8294 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -52,6 +52,17 @@ $_SEOTEMPLATES = array(
|
||||
'in' => array( 'regex' => "#/user/(\d+?)-#i",
|
||||
'matches' => array( array( 'showuser', '$1' ) ) ) ),
|
||||
|
||||
|
||||
'members_status_single' => array( 'app' => 'members',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=members(?:&|&)module=profile(?:&|&)section=status(?:&|&)type=single(?:&|&)status_id=(\d+?)(&|$)#i', 'statuses/id/$1/$2' ),
|
||||
'in' => array( 'regex' => "#/statuses/id/(\d+?)/#i",
|
||||
'matches' => array( array( 'app' , 'members' ),
|
||||
array( 'section', 'status' ),
|
||||
array( 'module' , 'profile' ),
|
||||
array( 'type' , 'single' ),
|
||||
array( 'status_id', '$1' ) ) ) ),
|
||||
|
||||
'members_status_friends'=> array( 'app' => 'members',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=members(?:&|&)module=profile(?:&|&)section=status(?:&|&)type=friends(&|$)#i', 'statuses/friends/$2' ),
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Forum permissions mappings
|
||||
* Last Updated: $Date: 2010-04-26 19:40:44 +0100 (Mon, 26 Apr 2010) $
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6179 $
|
||||
**/
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
@@ -28,18 +28,17 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6179 $
|
||||
**/
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
class membersMemberSync
|
||||
{
|
||||
/**
|
||||
* Registry reference
|
||||
*
|
||||
* @access public
|
||||
* @var object
|
||||
*/
|
||||
public $registry;
|
||||
@@ -47,9 +46,8 @@ class membersMemberSync
|
||||
/**
|
||||
* CONSTRUCTOR
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
**/
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->registry = ipsRegistry::instance();
|
||||
@@ -58,10 +56,9 @@ class membersMemberSync
|
||||
/**
|
||||
* This method is run when a member is flagged as a spammer
|
||||
*
|
||||
* @access public
|
||||
* @param array $member Array of member data
|
||||
* @return void
|
||||
**/
|
||||
* @return @e void
|
||||
*/
|
||||
public function onSetAsSpammer( $member )
|
||||
{
|
||||
/* Load status class */
|
||||
@@ -80,10 +77,9 @@ class membersMemberSync
|
||||
/**
|
||||
* This method is run when a member is un-flagged as a spammer
|
||||
*
|
||||
* @access public
|
||||
* @param array $member Array of member data
|
||||
* @return void
|
||||
**/
|
||||
* @return @e void
|
||||
*/
|
||||
public function onUnSetAsSpammer( $member )
|
||||
{
|
||||
|
||||
@@ -92,10 +88,9 @@ class membersMemberSync
|
||||
/**
|
||||
* This method is called after a member account has been removed
|
||||
*
|
||||
* @access public
|
||||
* @param string $ids SQL IN() clause
|
||||
* @return void
|
||||
**/
|
||||
* @return @e void
|
||||
*/
|
||||
public function onDelete( $mids )
|
||||
{
|
||||
/* Delete Status Updates - note, we can't do this via memberStatus class, since we no longer have the member data */
|
||||
|
||||
+1
-1
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
/**
|
||||
* @file plugin_banned.php Moderator control panel plugin: banned members
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: bfarber $
|
||||
* @since 2/17/2011
|
||||
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 9425 $
|
||||
*/
|
||||
|
||||
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 plugin_members_banned
|
||||
* @brief Moderator control panel plugin: banned members
|
||||
*
|
||||
*/
|
||||
class plugin_members_banned
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Main function executed automatically by the controller
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Make shortcuts
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
|
||||
/* Load language strings.. */
|
||||
$this->lang->loadLanguageFile( array( 'public_list' ), 'members' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the primary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getPrimaryTab()
|
||||
{
|
||||
return 'manage_members';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the secondary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getSecondaryTab()
|
||||
{
|
||||
return 'banned';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if we can view tab
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e bool
|
||||
*/
|
||||
public function canView( $permissions )
|
||||
{
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_ban'] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute plugin
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e string
|
||||
*/
|
||||
public function executePlugin( $permissions )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check permissions
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$this->canView( $permissions ) )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/* Add some CSS */
|
||||
$this->registry->output->addToDocumentHead( 'importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_mlist.css" );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get 10 banned members
|
||||
//-----------------------------------------
|
||||
|
||||
$members = array();
|
||||
$_bannedGroup = '';
|
||||
|
||||
if( $this->settings['banned_group'] )
|
||||
{
|
||||
$_bannedGroup = " OR m.member_group_id=" . $this->settings['banned_group'];
|
||||
}
|
||||
|
||||
$st = intval($this->request['st']);
|
||||
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "member_banned=1" . str_replace( 'm.', '', $_bannedGroup ) ) );
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'order' => 'm.joined DESC',
|
||||
'limit' => array( $st, 10 ),
|
||||
'where' => "m.member_banned=1" . $_bannedGroup,
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'm.member_id=pp.pp_member_id',
|
||||
'type' => 'left',
|
||||
),
|
||||
),
|
||||
) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch($outer) )
|
||||
{
|
||||
$r['_language'] = $this->lang->words['modcp_modq_indef'];
|
||||
|
||||
$members[] = IPSMember::buildDisplayData( $r );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Page links
|
||||
//-----------------------------------------
|
||||
|
||||
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['members'],
|
||||
'itemsPerPage' => 10,
|
||||
'currentStartValue' => $st,
|
||||
'baseUrl' => "app=core&module=modcp&fromapp=members&tab=banned",
|
||||
) );
|
||||
|
||||
return $this->registry->output->getTemplate('modcp')->membersList( 'banned', $members, $pages );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,356 @@
|
||||
<?php
|
||||
/**
|
||||
* @file plugin_iplookup.php Moderator control panel plugin: IP lookup tool
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: bfarber $
|
||||
* @since 2/18/2011
|
||||
* $LastChangedDate: 2011-03-16 21:13:06 -0400 (Wed, 16 Mar 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 8110 $
|
||||
*/
|
||||
|
||||
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 plugin_members_iplookup
|
||||
* @brief Moderator control panel plugin: IP lookup tool
|
||||
*
|
||||
*/
|
||||
class plugin_members_iplookup
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Main function executed automatically by the controller
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Make shortcuts
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the primary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getPrimaryTab()
|
||||
{
|
||||
return 'ip_tools';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the secondary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getSecondaryTab()
|
||||
{
|
||||
return 'iplookup';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if we can view tab
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e bool
|
||||
*/
|
||||
public function canView( $permissions )
|
||||
{
|
||||
if( $this->memberData['g_is_supmod'] )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute plugin
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e string
|
||||
*/
|
||||
public function executePlugin( $permissions )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check permissions
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$this->canView( $permissions ) )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check permissions
|
||||
//-----------------------------------------
|
||||
|
||||
if( $this->request['_do'] == 'submit' )
|
||||
{
|
||||
return $this->_doLookup();
|
||||
}
|
||||
|
||||
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Lookup IP address info
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
protected function _doLookup()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$exactMatch = 1;
|
||||
$finalIPString = trim( $this->request['ip'] );
|
||||
$startVal = intval($this->request['st']);
|
||||
$ipTool = $this->request['iptool'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove trailing periods
|
||||
//-----------------------------------------
|
||||
|
||||
if ( strstr( $finalIPString, '*' ) )
|
||||
{
|
||||
$exactMatch = 0;
|
||||
$finalIPString = preg_replace( "/^(.+?)\*(.+?)?$/", "\\1", $finalIPString ).'%';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// H'okay, what have we been asked to do?
|
||||
// (that's a metaphorical "we" in a rhetorical question)
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $ipTool == 'resolve' )
|
||||
{
|
||||
$resolved = @gethostbyaddr( $finalIPString );
|
||||
|
||||
if ( $resolved == "" )
|
||||
{
|
||||
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage( $this->lang->words['cp_no_matches'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage( sprintf( $this->lang->words['ip_resolve_result'], $finalIPString, $resolved ) ) );
|
||||
}
|
||||
}
|
||||
else if ( $ipTool == 'members' )
|
||||
{
|
||||
$sql = $exactMatch ? "ip_address='$finalIPString'" : "ip_address LIKE '$finalIPString'";
|
||||
|
||||
if ( !$this->memberData['g_access_cp'] )
|
||||
{
|
||||
$sql .= "AND g.g_access_cp != 1";
|
||||
}
|
||||
|
||||
$total_possible = $this->DB->buildAndFetch( array(
|
||||
'select' => 'count(m.member_id) as max',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => $sql,
|
||||
'add_join' => array(
|
||||
array(
|
||||
'from' => array( 'groups' => 'g' ),
|
||||
'type' => 'left',
|
||||
'where' => 'g.g_id=m.member_group_id',
|
||||
)
|
||||
)
|
||||
) );
|
||||
|
||||
if ( $total_possible['max'] < 1 )
|
||||
{
|
||||
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage( $this->lang->words['cp_no_matches'] ) );
|
||||
}
|
||||
|
||||
$pages = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $total_possible['max'],
|
||||
'itemsPerPage' => 20,
|
||||
'currentStartValue' => $startVal,
|
||||
'baseUrl' => "app=core&module=modcp&tab=iplookup&fromapp=members&_do=submit&iptool=members&ip=" . $this->request['ip'],
|
||||
) );
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'm.name, m.members_display_name, m.members_seo_name, m.member_id, m.ip_address, m.posts, m.joined, m.member_group_id',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.' . $sql,
|
||||
'order' => "m.joined DESC",
|
||||
'limit' => array( $startVal, 20 ),
|
||||
'add_join' => array(
|
||||
array( 'select' => 'g.g_access_cp',
|
||||
'from' => array( 'groups' => 'g' ),
|
||||
'type' => 'left',
|
||||
'where' => 'g.g_id=m.member_group_id',
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$row['joined'] = $this->registry->getClass( 'class_localization')->getDate( $row['joined'], 'JOINED' );
|
||||
$row['groupname'] = IPSMember::makeNameFormatted( $this->caches['group_cache'][ $row['member_group_id'] ]['g_title'], $row['member_group_id'] );
|
||||
|
||||
$members[ $row['member_id'] ] = $row;
|
||||
}
|
||||
|
||||
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->membersModIPFormMembers( $pages, $members ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = $exactMatch ? "p.ip_address LIKE '$finalIPString'" : "p.ip_address='$finalIPString'";
|
||||
|
||||
//-----------------------------------------
|
||||
// Get forums we can view
|
||||
//-----------------------------------------
|
||||
|
||||
$aforum = $this->registry->getClass('class_forums')->fetchSearchableForumIds();
|
||||
|
||||
if ( count($aforum) < 1)
|
||||
{
|
||||
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage( $this->lang->words['cp_no_matches'] ) );
|
||||
}
|
||||
|
||||
$the_forums = implode( ",", $aforum );
|
||||
|
||||
$count = $this->DB->buildAndFetch( array(
|
||||
'select' => 'COUNT(*) as total',
|
||||
'from' => array( 'posts' => 'p' ),
|
||||
'where' => "t.forum_id IN({$the_forums}) AND {$sql}",
|
||||
'add_join' => array(
|
||||
array(
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => 't.tid=p.topic_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
)
|
||||
) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Do we have any results?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !$count['total'] )
|
||||
{
|
||||
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage( $this->lang->words['cp_no_matches'] ) );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Pages
|
||||
//-----------------------------------------
|
||||
|
||||
$pageLinks = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $count['total'],
|
||||
'itemsPerPage' => 10,
|
||||
'currentStartValue' => $startVal,
|
||||
'baseUrl' => "app=core&module=modcp&tab=iplookup&fromapp=members&_do=submit&iptool=posts&ip=" . $this->request['ip'],
|
||||
) );
|
||||
|
||||
$results = array();
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'p.*',
|
||||
'from' => array( 'posts' => 'p' ),
|
||||
'where' => "t.forum_id IN({$the_forums}) AND {$sql}",
|
||||
'limit' => array( $startVal, 10 ),
|
||||
'order' => 'p.pid DESC',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 't.forum_id',
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => 't.tid=p.topic_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
array(
|
||||
'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=p.author_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
array(
|
||||
'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'pp.pp_member_id=m.member_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
array(
|
||||
'select' => 'pf.*',
|
||||
'from' => array( 'pfields_content' => 'pf' ),
|
||||
'where' => 'pf.member_id=m.member_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
)
|
||||
) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
while ( $row = $this->DB->fetch($outer) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Parse the member
|
||||
//-----------------------------------------
|
||||
|
||||
$row = IPSMember::buildDisplayData( $row, array( 'customFields' => 1, 'signature' => 1, 'warn' => 1 ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Parse the post
|
||||
//-----------------------------------------
|
||||
|
||||
IPSText::getTextClass( 'bbcode' )->parse_smilies = $row['use_emo'];
|
||||
IPSText::getTextClass( 'bbcode' )->parse_html = ( $this->registry->class_forums->allForums[ $row['forum_id'] ]['use_html'] and $this->caches['group_cache'][ $row['member_group_id'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0;
|
||||
IPSText::getTextClass( 'bbcode' )->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0;
|
||||
IPSText::getTextClass( 'bbcode' )->parse_bbcode = $this->registry->class_forums->allForums[ $row['forum_id'] ]['use_ibc'];
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics';
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id'];
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others'];
|
||||
|
||||
$row['post'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $row['post'] );
|
||||
|
||||
$results[] = $row;
|
||||
}
|
||||
|
||||
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->membersModIPFormPosts( $count['total'], $pageLinks, $results ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
<?php
|
||||
/**
|
||||
* @file plugin_modposts.php Moderator control panel plugin: show members on mod queue
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: bfarber $
|
||||
* @since 2/17/2011
|
||||
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 9425 $
|
||||
*/
|
||||
|
||||
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 plugin_members_modposts
|
||||
* @brief Moderator control panel plugin: show members on mod queue
|
||||
*
|
||||
*/
|
||||
class plugin_members_modposts
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Main function executed automatically by the controller
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Make shortcuts
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
|
||||
/* Load language strings.. */
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_list' ), 'members' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the primary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getPrimaryTab()
|
||||
{
|
||||
return 'manage_members';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the secondary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getSecondaryTab()
|
||||
{
|
||||
return 'modposts';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if we can view tab
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e bool
|
||||
*/
|
||||
public function canView( $permissions )
|
||||
{
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_modq'] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute plugin
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e string
|
||||
*/
|
||||
public function executePlugin( $permissions )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check permissions
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$this->canView( $permissions ) )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/* Add some additional CSS */
|
||||
$this->registry->output->addToDocumentHead( 'importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_mlist.css" );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get 10 members on mod queue
|
||||
//-----------------------------------------
|
||||
|
||||
$st = intval($this->request['st']);
|
||||
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "mod_posts!=0 AND mod_posts!='' AND mod_posts " . $this->DB->buildIsNull( false ) ) );
|
||||
$members = array();
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'order' => 'm.joined DESC',
|
||||
'limit' => array( $st, 10 ),
|
||||
'where' => "m.mod_posts!=0 AND m.mod_posts!='' AND m.mod_posts " . $this->DB->buildIsNull( false ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'm.member_id=pp.pp_member_id',
|
||||
'type' => 'left',
|
||||
),
|
||||
),
|
||||
) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch($outer) )
|
||||
{
|
||||
$mod_arr = IPSMember::processBanEntry( $r['mod_posts'] );
|
||||
|
||||
if( $mod_arr['date_end'] AND $mod_arr['date_end'] < time() )
|
||||
{
|
||||
IPSMember::save( $r['member_id'], array( 'core' => array( 'mod_posts' => 0 ) ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
if( $mod_arr['date_start'] == 1 )
|
||||
{
|
||||
$r['_language'] = $this->lang->words['modcp_modq_indef'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$r['_language'] = $this->registry->getClass('class_localization')->getDate( $mod_arr['date_end'], 'SHORT' );
|
||||
}
|
||||
|
||||
$members[] = IPSMember::buildDisplayData( $r );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Page links
|
||||
//-----------------------------------------
|
||||
|
||||
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['members'],
|
||||
'itemsPerPage' => 10,
|
||||
'currentStartValue' => $st,
|
||||
'baseUrl' => "app=core&module=modcp&fromapp=members&tab=modposts",
|
||||
) );
|
||||
|
||||
return $this->registry->output->getTemplate('modcp')->membersList( 'modposts', $members, $pages );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
<?php
|
||||
/**
|
||||
* @file plugin_restrictposts.php Moderator control panel plugin: show members with post restriction
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: bfarber $
|
||||
* @since 2/17/2011
|
||||
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 9425 $
|
||||
*/
|
||||
|
||||
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 plugin_members_restrictposts
|
||||
* @brief Moderator control panel plugin: show members with post restriction
|
||||
*
|
||||
*/
|
||||
class plugin_members_restrictposts
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Main function executed automatically by the controller
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Make shortcuts
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
|
||||
/* Load language strings.. */
|
||||
$this->lang->loadLanguageFile( array( 'public_list' ), 'members' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the primary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getPrimaryTab()
|
||||
{
|
||||
return 'manage_members';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the secondary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getSecondaryTab()
|
||||
{
|
||||
return 'restrictposts';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if we can view tab
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e bool
|
||||
*/
|
||||
public function canView( $permissions )
|
||||
{
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_post'] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute plugin
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e string
|
||||
*/
|
||||
public function executePlugin( $permissions )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check permissions
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$this->canView( $permissions ) )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/* Add some CSS.. */
|
||||
$this->registry->output->addToDocumentHead( 'importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_mlist.css" );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get 10 members on mod queue
|
||||
//-----------------------------------------
|
||||
|
||||
$st = intval($this->request['st']);
|
||||
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "restrict_post!=0 AND restrict_post!='' AND restrict_post " . $this->DB->buildIsNull( false ) ) );
|
||||
$members = array();
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'order' => 'm.joined DESC',
|
||||
'limit' => array( $st, 10 ),
|
||||
'where' => "m.restrict_post!=0 AND m.restrict_post!='' AND m.restrict_post " . $this->DB->buildIsNull( false ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'm.member_id=pp.pp_member_id',
|
||||
'type' => 'left',
|
||||
),
|
||||
),
|
||||
) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch($outer) )
|
||||
{
|
||||
$mod_arr = IPSMember::processBanEntry( $r['restrict_post'] );
|
||||
|
||||
if( $mod_arr['date_end'] AND $mod_arr['date_end'] < time() )
|
||||
{
|
||||
IPSMember::save( $r['member_id'], array( 'core' => array( 'restrict_post' => 0 ) ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
if( $mod_arr['date_start'] == 1 )
|
||||
{
|
||||
$r['_language'] = $this->lang->words['modcp_modq_indef'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$r['_language'] = $this->registry->getClass('class_localization')->getDate( $mod_arr['date_end'], 'SHORT' );
|
||||
}
|
||||
|
||||
$members[] = IPSMember::buildDisplayData( $r );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Page links
|
||||
//-----------------------------------------
|
||||
|
||||
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['members'],
|
||||
'itemsPerPage' => 10,
|
||||
'currentStartValue' => $st,
|
||||
'baseUrl' => "app=core&module=modcp&fromapp=members&tab=restrictposts",
|
||||
) );
|
||||
|
||||
return $this->registry->output->getTemplate('modcp')->membersList( 'restrictposts', $members, $pages );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,192 @@
|
||||
<?php
|
||||
/**
|
||||
* @file plugin_suspended.php Moderator control panel plugin: temporarily suspended members
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: bfarber $
|
||||
* @since 2/17/2011
|
||||
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 9425 $
|
||||
*/
|
||||
|
||||
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 plugin_members_suspended
|
||||
* @brief Moderator control panel plugin: temporarily suspended members
|
||||
*
|
||||
*/
|
||||
class plugin_members_suspended
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Main function executed automatically by the controller
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Make shortcuts
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
|
||||
/* Load language strings.. */
|
||||
$this->lang->loadLanguageFile( array( 'public_list' ), 'members' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the primary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getPrimaryTab()
|
||||
{
|
||||
return 'manage_members';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the secondary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getSecondaryTab()
|
||||
{
|
||||
return 'suspended';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if we can view tab
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e bool
|
||||
*/
|
||||
public function canView( $permissions )
|
||||
{
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_ban'] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute plugin
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e string
|
||||
*/
|
||||
public function executePlugin( $permissions )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check permissions
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$this->canView( $permissions ) )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/* Add some CSS.. */
|
||||
$this->registry->output->addToDocumentHead( 'importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_mlist.css" );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get 10 members on suspension
|
||||
//-----------------------------------------
|
||||
|
||||
$st = intval($this->request['st']);
|
||||
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "temp_ban!=0 AND temp_ban!='' AND temp_ban " . $this->DB->buildIsNull( false ) ) );
|
||||
$members = array();
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'order' => 'm.joined DESC',
|
||||
'limit' => array( $st, 10 ),
|
||||
'where' => "m.temp_ban!=0 AND m.temp_ban!='' AND m.temp_ban " . $this->DB->buildIsNull( false ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'm.member_id=pp.pp_member_id',
|
||||
'type' => 'left',
|
||||
),
|
||||
),
|
||||
) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch($outer) )
|
||||
{
|
||||
$mod_arr = IPSMember::processBanEntry( $r['temp_ban'] );
|
||||
|
||||
if( $mod_arr['date_end'] AND $mod_arr['date_end'] < time() )
|
||||
{
|
||||
IPSMember::save( $r['member_id'], array( 'core' => array( 'temp_ban' => 0 ) ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
if( $mod_arr['date_start'] == 1 )
|
||||
{
|
||||
$r['_language'] = $this->lang->words['modcp_modq_indef'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$r['_language'] = $this->registry->getClass('class_localization')->getDate( $mod_arr['date_end'], 'SHORT' );
|
||||
}
|
||||
|
||||
$members[] = IPSMember::buildDisplayData( $r );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Page links
|
||||
//-----------------------------------------
|
||||
|
||||
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['members'],
|
||||
'itemsPerPage' => 10,
|
||||
'currentStartValue' => $st,
|
||||
'baseUrl' => "app=core&module=modcp&fromapp=members&tab=suspended",
|
||||
) );
|
||||
|
||||
return $this->registry->output->getTemplate('modcp')->membersList( 'suspended', $members, $pages );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,210 @@
|
||||
<?php
|
||||
/**
|
||||
* @file plugin_warn.php Moderator control panel plugin: show latest warnings
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: ips_terabyte $
|
||||
* @since 2/14/2011
|
||||
* $LastChangedDate: 2011-03-09 17:51:33 -0500 (Wed, 09 Mar 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 8003 $
|
||||
*/
|
||||
|
||||
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 plugin_members_warn
|
||||
* @brief Moderator control panel plugin: show latest warnings
|
||||
*
|
||||
*/
|
||||
class plugin_members_warn
|
||||
{
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Main function executed automatically by the controller
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Make shortcuts
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->lang = $this->registry->class_localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the primary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getPrimaryTab()
|
||||
{
|
||||
return 'manage_members';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the secondary tab key for the navigation bar
|
||||
*
|
||||
* @return @e string
|
||||
*/
|
||||
public function getSecondaryTab()
|
||||
{
|
||||
return 'warn';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if we can view tab
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e bool
|
||||
*/
|
||||
public function canView( $permissions )
|
||||
{
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute plugin
|
||||
*
|
||||
* @param array $permissions Moderator permissions
|
||||
* @return @e string
|
||||
*/
|
||||
public function executePlugin( $permissions )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check permissions
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$this->canView( $permissions ) )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get last 10 warnings
|
||||
//-----------------------------------------
|
||||
|
||||
$st = intval($this->request['st']);
|
||||
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as warns', 'from' => 'warn_logs' ) );
|
||||
$warnings = array();
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'w.*',
|
||||
'from' => array( 'warn_logs' => 'w' ),
|
||||
'order' => 'w.wlog_date DESC',
|
||||
'limit' => array( $st, 10 ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=w.wlog_mid',
|
||||
'type' => 'left',
|
||||
),
|
||||
array(
|
||||
'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'm.member_id=pp.pp_member_id',
|
||||
'type' => 'left',
|
||||
),
|
||||
array(
|
||||
'select' => 'mm.member_id as punisher_id, mm.members_display_name as punisher_name, mm.members_seo_name as punisher_seo_name',
|
||||
'from' => array( 'members' => 'mm' ),
|
||||
'where' => 'mm.member_id=w.wlog_addedby',
|
||||
'type' => 'left',
|
||||
),
|
||||
array(
|
||||
'select' => 'ppp.pp_main_photo as punisher_check, ppp.pp_thumb_photo as punisher_photo, ppp.pp_thumb_width as punisher_width, ppp.pp_thumb_height as punisher_height',
|
||||
'from' => array( 'profile_portal' => 'ppp' ),
|
||||
'where' => 'mm.member_id=ppp.pp_member_id',
|
||||
'type' => 'left',
|
||||
),
|
||||
),
|
||||
) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch($outer) )
|
||||
{
|
||||
if ( strstr( $r['wlog_notes'], '<content>' ) )
|
||||
{
|
||||
$raw = preg_match( "#<content>(.+?)</content>#is", $r['wlog_notes'], $match );
|
||||
}
|
||||
else
|
||||
{
|
||||
$_array = unserialize( $r['wlog_notes'] );
|
||||
|
||||
if ( is_array( $_array ) AND $_array['content'] )
|
||||
{
|
||||
$match[1] = $_array['content'];
|
||||
}
|
||||
}
|
||||
|
||||
IPSText::getTextClass( 'bbcode' )->parse_smilies = 1;
|
||||
IPSText::getTextClass( 'bbcode' )->parse_html = 0;
|
||||
IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1;
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_section = 'warn';
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $r['member_group_id'];
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $r['mgroup_others'];
|
||||
|
||||
$r['content'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $match[1] );
|
||||
|
||||
$r['punisher_photo'] = IPSMember::buildProfilePhoto( array( 'pp_main_photo' => $r['punisher_check'], 'pp_thumb_photo' => $r['punisher_photo'], 'pp_thumb_width' => $r['punisher_width'], 'pp_thumb_height' => $r['punisher_height'] ), 'mini' );
|
||||
$warnings[] = IPSMember::buildDisplayData( $r );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Page links
|
||||
//-----------------------------------------
|
||||
|
||||
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['warns'],
|
||||
'itemsPerPage' => 10,
|
||||
'currentStartValue' => $st,
|
||||
'baseUrl' => "app=core&module=modcp&fromapp=members&tab=warn",
|
||||
) );
|
||||
|
||||
return $this->registry->output->getTemplate('modcp')->latestWarnLogs( $warnings, $pages );
|
||||
}
|
||||
}
|
||||
+14
-17
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Define the core notification types
|
||||
* Last Updated: $Date: 2010-04-16 21:25:51 -0400 (Fri, 16 Apr 2010) $
|
||||
* Last Updated: $Date: 2011-04-27 07:31:56 -0400 (Wed, 27 Apr 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 6142 $
|
||||
* @version $Rev: 8490 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -37,20 +37,17 @@ class members_notifications
|
||||
* Notification types - Needs to be a method so when require_once is used, $_NOTIFY isn't empty
|
||||
*/
|
||||
$_NOTIFY = array(
|
||||
array( 'key' => 'profile_comment', 'default' => array( 'pm' ), 'disabled' => array(), 'icon' => 'notify_profilecomment' ),
|
||||
array( 'key' => 'profile_comment_pending', 'default' => array( 'pm' ), 'disabled' => array(), 'icon' => 'notify_profilecomment' ),
|
||||
array( 'key' => 'friend_request', 'default' => array( 'pm' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'friend_request_pending', 'default' => array( 'pm' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'friend_request_approve', 'default' => array( 'pm' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'new_private_message', 'default' => array( 'email', 'inline' ), 'disabled' => array( 'pm' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'reply_private_message', 'default' => array( 'email', 'inline' ), 'disabled' => array( 'pm' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'invite_private_message', 'default' => array( 'email', 'inline' ), 'disabled' => array( 'pm' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'profile_comment', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_profilecomment' ),
|
||||
array( 'key' => 'friend_request', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'friend_request_approve', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'new_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'reply_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'invite_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'reply_your_status', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
|
||||
array( 'key' => 'reply_any_status', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
|
||||
array( 'key' => 'friend_status_update', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
|
||||
);
|
||||
);/*noLibHook*/
|
||||
|
||||
return $_NOTIFY;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Fetches meta data for notifications
|
||||
* Last Updated: $Date: 2011-09-21 10:55:45 -0400 (Wed, 21 Sep 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9528 $
|
||||
*/
|
||||
|
||||
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 members_class_notifications
|
||||
{
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = ipsRegistry::instance();
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
|
||||
$this->messengerFunctions = new $classToLoad( $this->registry );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches data by meta data
|
||||
* Must return: authorId, content, title, date
|
||||
* @param array $metaData
|
||||
*/
|
||||
public function getLinkedDataByMetaData( array $metaData )
|
||||
{
|
||||
/* Fetch topic */
|
||||
$topic = $this->messengerFunctions->fetchTopicDataWithMessage( $metaData['meta_id'] );
|
||||
|
||||
/* Get participants */
|
||||
$parts = $this->messengerFunctions->fetchTopicParticipants( $metaData['meta_id'] );
|
||||
|
||||
/* New or reply? */
|
||||
if ( ! empty( $parts[ $this->memberData['member_id'] ]['map_read_time'] ) && ! empty( $parts[ $this->memberData['member_id'] ]['map_has_unread'] ) )
|
||||
{
|
||||
/* Is reply */
|
||||
$msg = $this->messengerFunctions->fetchMessageData( $metaData['meta_id'], $topic['mt_last_msg_id'] );
|
||||
|
||||
$topic['msg_author_id'] = $msg['msg_author_id'];
|
||||
$topic['msg_post'] = $msg['msg_post'];
|
||||
$topic['msg_date'] = $msg['msg_date'];
|
||||
}
|
||||
|
||||
/* Is this a new topic or reply? */
|
||||
return array( 'authorId' => $topic['msg_author_id'],
|
||||
'content' => $this->_formatMessageForDisplay( $topic['msg_post'], $this->memberData ),
|
||||
'title' => $topic['mt_title'],
|
||||
'date' => $topic['msg_date'],
|
||||
'type' => $this->lang->words['gbl_notify_pm'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to format the actual message (applies BBcode, etc)
|
||||
*
|
||||
* @param string Raw text
|
||||
* @param array PM data
|
||||
* @return string Processed text
|
||||
*/
|
||||
private function _formatMessageForDisplay( $msgContent, $data=array() )
|
||||
{
|
||||
IPSText::resetTextClass('bbcode');
|
||||
|
||||
$this->settings['max_emos'] = 0;
|
||||
|
||||
IPSText::getTextClass('bbcode')->parse_smilies = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_html = 0;
|
||||
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
|
||||
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $data['member_group_id'];
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $data['mgroup_others'];
|
||||
|
||||
$msgContent = IPSText::getTextClass('bbcode')->preDisplayParse( $msgContent );
|
||||
|
||||
return $msgContent;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Portal plugin: online users
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* This file must be named {file_name_minus_php}-cfg.php
|
||||
*
|
||||
* Please see each variable for more information
|
||||
* $PORTAL_CONFIG is OK for each file, do not change
|
||||
* this array name.
|
||||
*/
|
||||
|
||||
$PORTAL_CONFIG = array();
|
||||
|
||||
/**
|
||||
* Main plug in title
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_title'] = 'Онлайн пользователи';
|
||||
|
||||
/**
|
||||
* Plug in mini description
|
||||
*
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_desc'] = "Блок онлайн пользователей";
|
||||
|
||||
/**
|
||||
* Keyword for settings. This is the keyword
|
||||
* entered into ibf_conf_settings_titles -> conf_title_keyword
|
||||
* Can be left blank.
|
||||
* PLEASE stick to the naming convention when entering a setting
|
||||
* keyword: portal_{file_name_minus_php} This will prevent
|
||||
* other keyword clashes. Likewise, when creating settings, choose
|
||||
* NOT to cache them (they will be loaded at run time) and always
|
||||
* prefix with {file_name_minus_php}_setting_key - for example
|
||||
* If you had a setting called "export_forums" then please name it
|
||||
* "recent_topics_export_forums". This will be available in
|
||||
* $this->settings['recent_topics_export_forums'] in the
|
||||
* main module.
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_settings_keyword'] = "";
|
||||
|
||||
/**
|
||||
* Exportable tags key must be in the naming format of:
|
||||
* {file_name_minus_php}-tag. The value *MUST* be the function
|
||||
* which it corresponds to. For example:
|
||||
* 'recent_topics_last_x' => 'recent_topics_last_x'
|
||||
* The portal will look for function 'recent_topics_last_x' in
|
||||
* module "sources/portal_plugins/recent_topics.php" when it parses
|
||||
* the tag <!--::recent_topics_last_x::-->
|
||||
*
|
||||
* @param array[ TAG ] = array( FUNCTION NAME, DESCRIPTION );
|
||||
*/
|
||||
$PORTAL_CONFIG['pc_exportable_tags']['online_users_show'] = array( 'online_users_show', 'Shows the online users' );
|
||||
@@ -1,58 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Portal plugin: online users
|
||||
* Last Updated: $Date: 2010-10-21 07:08:38 -0400 (Thu, 21 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 7007 $
|
||||
*/
|
||||
|
||||
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 ppi_online_users extends public_portal_portal_portal
|
||||
{
|
||||
/**
|
||||
* Initialize module
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the online users
|
||||
*
|
||||
* @return string HTML content to replace tag with
|
||||
*/
|
||||
public function online_users_show()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get the users from the DB
|
||||
//-----------------------------------------
|
||||
|
||||
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums', 'forums' ) . '/boards.php', 'public_forums_forums_boards' );
|
||||
$boards = new $classToLoad();
|
||||
$boards->makeRegistryShortcuts( $this->registry );
|
||||
|
||||
$active = $boards->getActiveUserDetails();
|
||||
$active['visitors'] = $active['GUESTS'] + $active['ANON'];
|
||||
$active['members'] = $active['MEMBERS'];
|
||||
|
||||
return $this->registry->getClass('output')->getTemplate('portal')->onlineUsers( $active );
|
||||
}
|
||||
}
|
||||
@@ -2,20 +2,21 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Config for about me tab
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
* @note This file is only included in order to *disable* the tab for 3.1 upgrades
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -42,7 +43,7 @@ $CONFIG['plugin_key'] = 'aboutme';
|
||||
/**
|
||||
* Show tab?
|
||||
*/
|
||||
$CONFIG['plugin_enabled'] = 1;
|
||||
$CONFIG['plugin_enabled'] = 0;
|
||||
|
||||
/**
|
||||
* Order
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile Plugin Library
|
||||
* Last Updated: $Date: 2010-05-24 11:38:42 -0400 (Mon, 24 May 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: michael $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 6381 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 profile_aboutme extends profile_plugin_parent
|
||||
{
|
||||
/**
|
||||
* Feturn HTML block
|
||||
*
|
||||
* @access public
|
||||
* @param array Member information
|
||||
* @return string HTML block
|
||||
*/
|
||||
public function return_html_block( $member=array() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Got a member?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_array( $member ) OR ! count( $member ) )
|
||||
{
|
||||
return $this->registry->getClass('output')->getTemplate('profile')->tabNoContent( 'err_no_aboutme_to_show' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Format signature
|
||||
//-----------------------------------------
|
||||
|
||||
if( $member['signature'] )
|
||||
{
|
||||
IPSText::getTextClass('bbcode')->parse_bbcode = $this->settings[ 'msg_allow_code' ];
|
||||
IPSText::getTextClass('bbcode')->parse_smilies = 0;
|
||||
IPSText::getTextClass('bbcode')->parse_html = $this->settings[ 'msg_allow_html' ];
|
||||
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
|
||||
IPSText::getTextClass('bbcode')->parsing_section = 'signatures';
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $member['member_group_id'];
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $member['mgroup_others'];
|
||||
|
||||
$member['signature'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $member['signature'] );
|
||||
|
||||
$member['signature'] = $this->registry->getClass('output')->getTemplate('global')->signature_separator( $member['signature'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Format 'About me'
|
||||
//-----------------------------------------
|
||||
|
||||
IPSText::getTextClass( 'bbcode' )->parse_html = intval($this->settings['aboutme_html']);
|
||||
IPSText::getTextClass( 'bbcode' )->parse_nl2br = 1;
|
||||
IPSText::getTextClass( 'bbcode' )->parse_smilies = $this->settings['aboutme_emoticons'];
|
||||
IPSText::getTextClass( 'bbcode' )->parse_bbcode = $this->settings['aboutme_bbcode'];
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_section = 'aboutme';
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $member['member_group_id'];
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $member['mgroup_others'];
|
||||
|
||||
$member['pp_about_me'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $member['pp_about_me'] );
|
||||
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->tabAboutMe( $member );
|
||||
|
||||
//-----------------------------------------
|
||||
// Macros...
|
||||
//-----------------------------------------
|
||||
|
||||
$content = $this->registry->output->replaceMacros( $content );
|
||||
|
||||
//-----------------------------------------
|
||||
// Return content..
|
||||
//-----------------------------------------
|
||||
|
||||
return $content ? $content : $this->registry->getClass('output')->getTemplate('profile')->tabNoContent( 'err_no_aboutme_to_show' );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Config for about me tab
|
||||
* Last Updated: $Date: 2011-03-14 13:48:27 -0400 (Mon, 14 Mar 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 8063 $
|
||||
*
|
||||
*/
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* Plug in name (Default tab name)
|
||||
*/
|
||||
$CONFIG['plugin_name'] = 'Friends';
|
||||
|
||||
/**
|
||||
* Language string for the tab
|
||||
*/
|
||||
$CONFIG['plugin_lang_bit'] = 'pp_tab_friends';
|
||||
|
||||
/**
|
||||
* Plug in key (must be the same as the main {file}.php name
|
||||
*/
|
||||
$CONFIG['plugin_key'] = 'friends';
|
||||
|
||||
/**
|
||||
* Show tab?
|
||||
*/
|
||||
$CONFIG['plugin_enabled'] = 1;
|
||||
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
$CONFIG['plugin_order'] = 2;
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Profile Plugin Library
|
||||
* Last Updated: $Date: 2011-05-31 15:22:26 -0400 (Tue, 31 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 8931 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 profile_friends extends profile_plugin_parent
|
||||
{
|
||||
/**
|
||||
* Feturn HTML block
|
||||
*
|
||||
* @param array Member information
|
||||
* @return string HTML block
|
||||
*/
|
||||
public function return_html_block( $member=array() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Got a member?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_array( $member ) OR ! count( $member ) )
|
||||
{
|
||||
return $this->registry->getClass('output')->getTemplate('profile')->tabNoContent( 'err_no_aboutme_to_show' );
|
||||
}
|
||||
|
||||
$friends = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab the friends
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'f.*',
|
||||
'from' => array( 'profile_friends' => 'f' ),
|
||||
'where' => 'f.friends_member_id=' . $member['member_id'] . ' AND f.friends_approved=1',
|
||||
//'order' => 'm.members_display_name ASC',
|
||||
'add_join' => array(
|
||||
1 => array( 'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'pp.pp_member_id=f.friends_friend_id',
|
||||
'type' => 'left' ),
|
||||
2 => array( 'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=f.friends_friend_id',
|
||||
'type' => 'left' )
|
||||
)
|
||||
) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// Get and store...
|
||||
//-----------------------------------------
|
||||
|
||||
while( $row = $this->DB->fetch($outer) )
|
||||
{
|
||||
if( $row['member_id'] )
|
||||
{
|
||||
$friends[ $row['members_display_name'] ] = IPSMember::buildDisplayData( $row, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
ksort($friends);
|
||||
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->tabFriends( $friends, $member );
|
||||
|
||||
//-----------------------------------------
|
||||
// Macros...
|
||||
//-----------------------------------------
|
||||
|
||||
$content = $this->registry->output->replaceMacros( $content );
|
||||
|
||||
//-----------------------------------------
|
||||
// Return content..
|
||||
//-----------------------------------------
|
||||
|
||||
return $content ? $content : $this->registry->getClass('output')->getTemplate('profile')->tabNoContent( 'err_no_aboutme_to_show' );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Config for about me tab
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* Last Updated: $Date: 2010-12-17 07:40:13 -0500 (Fri, 17 Dec 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 5713 $
|
||||
* @version $Rev: 7442 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Profile Plugin Library
|
||||
* Last Updated: $Date: 2010-07-15 21:31:17 -0400 (Thu, 15 Jul 2010) $
|
||||
* Last Updated: $Date: 2011-08-25 07:46:38 -0400 (Thu, 25 Aug 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 6661 $
|
||||
* @version $Revision: 9413 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,6 @@ class profile_status extends profile_plugin_parent
|
||||
/**
|
||||
* Feturn HTML block
|
||||
*
|
||||
* @access public
|
||||
* @param array Member information
|
||||
* @return string HTML block
|
||||
*/
|
||||
@@ -49,12 +48,9 @@ class profile_status extends profile_plugin_parent
|
||||
}
|
||||
|
||||
/* Fetch */
|
||||
$statuses = $this->registry->getClass('memberStatus')->fetch( $this->memberData, array( 'member_id' => $member['member_id'], 'limit' => 2 ) );
|
||||
|
||||
/* Fetch actions */
|
||||
$actions = $this->registry->getClass('memberStatus')->fetchActions( $this->memberData, array( 'member_id' => $member['member_id'], 'limit' => 10, 'not_theirs' => 1, 'custom' => 0 ) );
|
||||
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->tabStatusUpdates( $statuses, $actions, $member );
|
||||
$statuses = $this->registry->getClass('memberStatus')->fetch( $this->memberData, array( 'relatedTo' => $member['member_id'], 'isApproved' => true, 'limit' => 10 ) );
|
||||
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->tabStatusUpdates( $statuses, array(), $member );
|
||||
|
||||
/* Replace Macros and return */
|
||||
$content = $this->registry->output->replaceMacros( $content );
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Report Center :: Private Messages plugin
|
||||
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @author Based on original "Report Center" by Luke Scott
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -25,25 +25,32 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
class messages_plugin
|
||||
{
|
||||
/**#@+
|
||||
* Registry objects
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
/**#@-*/
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Holds extra data for the plugin
|
||||
*
|
||||
* @access private
|
||||
* @var array Data specific to the plugin
|
||||
*/
|
||||
public $_extra;
|
||||
@@ -51,9 +58,8 @@ class messages_plugin
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
@@ -75,7 +81,6 @@ class messages_plugin
|
||||
/**
|
||||
* Display the form for extra data in the ACP
|
||||
*
|
||||
* @access public
|
||||
* @param array Plugin data
|
||||
* @param object HTML object
|
||||
* @return string HTML to add to the form
|
||||
@@ -114,7 +119,6 @@ class messages_plugin
|
||||
/**
|
||||
* Process the plugin's form fields for saving
|
||||
*
|
||||
* @access public
|
||||
* @param array Plugin data for save
|
||||
* @return string Error message
|
||||
*/
|
||||
@@ -128,7 +132,6 @@ class messages_plugin
|
||||
/**
|
||||
* Update timestamp for report
|
||||
*
|
||||
* @access public
|
||||
* @param array New reports
|
||||
* @param array New members cache
|
||||
* @return boolean
|
||||
@@ -141,7 +144,6 @@ class messages_plugin
|
||||
/**
|
||||
* Get report permissions
|
||||
*
|
||||
* @access public
|
||||
* @param string Type of perms to check
|
||||
* @param array Permissions data
|
||||
* @param array group ids
|
||||
@@ -163,7 +165,6 @@ class messages_plugin
|
||||
/**
|
||||
* Show the report form for this module
|
||||
*
|
||||
* @access public
|
||||
* @param array Application data
|
||||
* @return string HTML form information
|
||||
*/
|
||||
@@ -220,7 +221,6 @@ class messages_plugin
|
||||
/**
|
||||
* Get section and link
|
||||
*
|
||||
* @access public
|
||||
* @param array Report data
|
||||
* @return array Section/link
|
||||
*/
|
||||
@@ -235,7 +235,6 @@ class messages_plugin
|
||||
/**
|
||||
* Process a report and save the data appropriate
|
||||
*
|
||||
* @access public
|
||||
* @param array Report data
|
||||
* @return array Data from saving the report
|
||||
*/
|
||||
@@ -357,12 +356,27 @@ class messages_plugin
|
||||
return $return_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts an array of data from rc_reports_index and returns an array formatted nearly identical to processReport()
|
||||
*
|
||||
* @param array Report data
|
||||
* @return array Formatted report data
|
||||
*/
|
||||
public function formatReportData( $report_data )
|
||||
{
|
||||
return array(
|
||||
'REDIRECT_URL' => $report_data['url'],
|
||||
'REPORT_INDEX' => $report_data['id'],
|
||||
'SAVED_URL' => str_replace( '&', '&', $report_data['url'] ),
|
||||
'REPORT' => '',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Where to send user after report is submitted
|
||||
*
|
||||
* @access public
|
||||
* @param array Report data
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function reportRedirect( $report_data )
|
||||
{
|
||||
@@ -372,7 +386,6 @@ class messages_plugin
|
||||
/**
|
||||
* Retrieve list of users to send notifications to
|
||||
*
|
||||
* @access public
|
||||
* @param string Group ids
|
||||
* @param array Report data
|
||||
* @return array Array of users to PM/Email
|
||||
@@ -382,16 +395,16 @@ class messages_plugin
|
||||
$notify = array();
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'noti.*',
|
||||
'from' => array( 'rc_modpref' => 'noti' ),
|
||||
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_id=noti.mem_id',
|
||||
)
|
||||
'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'noti.*',
|
||||
'from' => array( 'rc_modpref' => 'noti' ),
|
||||
'where' => 'mem.member_id=noti.mem_id',
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Report Center :: Profiles plugin
|
||||
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @author Based on original "Report Center" by Luke Scott
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -25,25 +25,32 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
class profiles_plugin
|
||||
{
|
||||
/**#@+
|
||||
* Registry objects
|
||||
/**
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
/**#@-*/
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Holds extra data for the plugin
|
||||
*
|
||||
* @access private
|
||||
* @var array Data specific to the plugin
|
||||
*/
|
||||
public $_extra;
|
||||
@@ -51,9 +58,8 @@ class profiles_plugin
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return void
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
@@ -75,7 +81,6 @@ class profiles_plugin
|
||||
/**
|
||||
* Display the form for extra data in the ACP
|
||||
*
|
||||
* @access public
|
||||
* @param array Plugin data
|
||||
* @param object HTML object
|
||||
* @return string HTML to add to the form
|
||||
@@ -90,7 +95,6 @@ class profiles_plugin
|
||||
/**
|
||||
* Process the plugin's form fields for saving
|
||||
*
|
||||
* @access public
|
||||
* @param array Plugin data for save
|
||||
* @return string Error message
|
||||
*/
|
||||
@@ -102,7 +106,6 @@ class profiles_plugin
|
||||
/**
|
||||
* Update timestamp for report
|
||||
*
|
||||
* @access public
|
||||
* @param array New reports
|
||||
* @param array New members cache
|
||||
* @return boolean
|
||||
@@ -115,7 +118,6 @@ class profiles_plugin
|
||||
/**
|
||||
* Get report permissions (only supermods can moderate profiles)
|
||||
*
|
||||
* @access public
|
||||
* @param string Type of perms to check
|
||||
* @param array Permissions data
|
||||
* @param array group ids
|
||||
@@ -137,7 +139,6 @@ class profiles_plugin
|
||||
/**
|
||||
* Show the report form for this module
|
||||
*
|
||||
* @access public
|
||||
* @param array Application data
|
||||
* @return string HTML form information
|
||||
*/
|
||||
@@ -176,7 +177,6 @@ class profiles_plugin
|
||||
/**
|
||||
* Get section and link
|
||||
*
|
||||
* @access public
|
||||
* @param array Report data
|
||||
* @return array Section/link
|
||||
*/
|
||||
@@ -193,7 +193,6 @@ class profiles_plugin
|
||||
/**
|
||||
* Process a report and save the data appropriate
|
||||
*
|
||||
* @access public
|
||||
* @param array Report data
|
||||
* @return array Data from saving the report
|
||||
*/
|
||||
@@ -293,13 +292,30 @@ class profiles_plugin
|
||||
|
||||
return $return_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts an array of data from rc_reports_index and returns an array formatted nearly identical to processReport()
|
||||
*
|
||||
* @param array Report data
|
||||
* @return array Formatted report data
|
||||
*/
|
||||
public function formatReportData( $report_data )
|
||||
{
|
||||
return array(
|
||||
'REDIRECT_URL' => $report_data['url'],
|
||||
'REPORT_INDEX' => $report_data['id'],
|
||||
'SAVED_URL' => str_replace( '&', '&', $report_data['url'] ),
|
||||
'REPORT' => '',
|
||||
'SEOTITLE' => $report_data['seoname'],
|
||||
'TEMPLATE' => 'showuser',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Where to send user after report is submitted
|
||||
*
|
||||
* @access public
|
||||
* @param array Report data
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function reportRedirect( $report_data )
|
||||
{
|
||||
@@ -318,7 +334,6 @@ class profiles_plugin
|
||||
/**
|
||||
* Retrieve list of users to send notifications to
|
||||
*
|
||||
* @access public
|
||||
* @param string Group ids
|
||||
* @param array Report data
|
||||
* @return array Array of users to PM/Email
|
||||
@@ -328,16 +343,16 @@ class profiles_plugin
|
||||
$notify = array();
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'noti.*',
|
||||
'from' => array( 'rc_modpref' => 'noti' ),
|
||||
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_id=noti.mem_id',
|
||||
)
|
||||
'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'noti.*',
|
||||
'from' => array( 'rc_modpref' => 'noti' ),
|
||||
'where' => 'mem.member_id=noti.mem_id',
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Config file
|
||||
* Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $
|
||||
* Last Updated: $Date: 2011-04-14 23:16:18 -0400 (Thu, 14 Apr 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5855 $
|
||||
**/
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8347 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
@@ -23,16 +23,22 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
}
|
||||
|
||||
/* Can search with this app */
|
||||
$CONFIG['can_search'] = 1;
|
||||
$CONFIG['can_search'] = 1;
|
||||
|
||||
/* Can view new content with this app */
|
||||
$CONFIG['can_viewNewContent'] = 1;
|
||||
|
||||
/* Can fetch active content with this app */
|
||||
$CONFIG['can_activeContent'] = 1;
|
||||
$CONFIG['can_viewNewContent'] = 1;
|
||||
$CONFIG['can_vnc_filter_by_followed'] = 0;
|
||||
$CONFIG['can_vnc_unread_content'] = 0;
|
||||
|
||||
/* Can fetch user generated content */
|
||||
$CONFIG['can_userContent'] = 1;
|
||||
$CONFIG['can_userContent'] = 1;
|
||||
|
||||
/* Content types, put the default one first */
|
||||
$CONFIG['contentTypes'] = array( 'members', 'comments' );
|
||||
if( $_REQUEST['do'] == 'user_activity' )
|
||||
{
|
||||
$CONFIG['contentTypes'] = array( 'comments' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$CONFIG['contentTypes'] = array( 'members', 'comments' );
|
||||
}
|
||||
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,18 +2,18 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Basic Forum Search
|
||||
* Last Updated: $Date: 2010-02-23 12:38:11 +0000 (Tue, 23 Feb 2010) $
|
||||
* Last Updated: $Date: 2011-07-28 18:01:32 -0400 (Thu, 28 Jul 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5861 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9330 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -35,11 +35,13 @@ class search_engine_members extends search_engine
|
||||
/**
|
||||
* Decide what type of search we're using
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
/* Hard limit */
|
||||
IPSSearchRegistry::set('set.hardLimit', ( ipsRegistry::$settings['search_hardlimit'] ) ? ipsRegistry::$settings['search_hardlimit'] : 200 );
|
||||
|
||||
/* Ok, now because the top bar search box defaults to members default search, which is profile comments, we need
|
||||
to convince it to default to members if the user used the top search bar with members selected */
|
||||
if ( $this->request['fromMainBar'] )
|
||||
@@ -47,13 +49,17 @@ class search_engine_members extends search_engine
|
||||
IPSSearchRegistry::set('members.searchInKey', 'members');
|
||||
}
|
||||
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') AND IPSSearchRegistry::get('members.searchInKey') != 'comments' )
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
|
||||
{
|
||||
return $this->_membersSearch();
|
||||
$this->request['search_app_filters']['members']['searchInKey'] = 'comments';
|
||||
|
||||
return $this->_commentsSearch();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->_commentsSearch();
|
||||
$this->request['search_app_filters']['members']['searchInKey'] = 'members';
|
||||
|
||||
return $this->_membersSearch();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,86 +70,123 @@ class search_engine_members extends search_engine
|
||||
*
|
||||
* So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function _commentsSearch()
|
||||
{
|
||||
/* INIT */
|
||||
$count = 0;
|
||||
$results = array();
|
||||
$sort_by = IPSSearchRegistry::get('in.search_sort_by');
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
$search_term = IPSSearchRegistry::get('in.clean_search_term');
|
||||
$content_title_only = IPSSearchRegistry::get('opt.searchTitleOnly');
|
||||
$post_search_only = IPSSearchRegistry::get('opt.onlySearchPosts');
|
||||
$order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc';
|
||||
$sortKey = '';
|
||||
$sortType = '';
|
||||
$rows = array();
|
||||
$got = 0;
|
||||
|
||||
/* Sorting */
|
||||
switch( $sort_by )
|
||||
{
|
||||
default:
|
||||
case 'date':
|
||||
$sortKey = 'comment_date';
|
||||
$sortType = 'numerical';
|
||||
break;
|
||||
}
|
||||
|
||||
/* Not allowed to see profile information */
|
||||
if ( ! $this->memberData['g_mem_info'] )
|
||||
{
|
||||
return array( 'count' => 0, 'resultSet' => array() );
|
||||
}
|
||||
|
||||
/* Query the count */
|
||||
$count = $this->DB->buildAndFetch( array('select' => 'COUNT(*) as total_results',
|
||||
'from' => array( 'profile_comments' => 'c' ),
|
||||
'where' => $this->_buildCommentsWhereStatement( $search_term, $content_title_only ),
|
||||
'add_join' => array( array( 'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => "p.pp_member_id=c.comment_by_member_id",
|
||||
'type' => 'left' ) ) ) );
|
||||
/* INIT */
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
$search_term = IPSSearchRegistry::get('in.clean_search_term');
|
||||
$rows = array();
|
||||
|
||||
|
||||
|
||||
/* Fetch data */
|
||||
$this->DB->build( array('select' => 'c.*',
|
||||
'from' => array( 'profile_comments' => 'c' ),
|
||||
'where' => $this->_buildCommentsWhereStatement( $search_term, $content_title_only ),
|
||||
'order' => $sortKey . ' ' . $sort_order,
|
||||
'limit' => array( IPSSearchRegistry::get('in.start'), IPSSearchRegistry::get('opt.search_per_page') ),
|
||||
'add_join' => array( array( 'select' => 'x.members_display_name as members_display_name_from, x.members_seo_name as members_seo_name_from',
|
||||
'from' => array( 'members' => 'x' ),
|
||||
'where' => "x.member_id=c.comment_by_member_id",
|
||||
'type' => 'left' ),
|
||||
array( 'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.member_id=c.comment_for_member_id",
|
||||
'type' => 'left' ),
|
||||
array( 'select' => 'p.*',
|
||||
'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => "p.pp_member_id=c.comment_for_member_id",
|
||||
'type' => 'left' ) ) ) );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->DB->execute();
|
||||
$this->DB->build( array(
|
||||
'select' => "s.status_id, s.status_date",
|
||||
'from' => 'member_status_updates s',
|
||||
'where' => $this->_buildCommentsWhereStatement( $search_term ),
|
||||
'limit' => array(0, IPSSearchRegistry::get('set.hardLimit') + 1),
|
||||
'order' => 's.status_date ' . $sort_order ) );
|
||||
|
||||
/* Sort */
|
||||
while ( $_row = $this->DB->fetch() )
|
||||
{
|
||||
$rows[ $got ] = $_row;
|
||||
|
||||
$got++;
|
||||
$DB = $this->DB->execute();
|
||||
|
||||
/* Fetch all to sort */
|
||||
while( $r = $this->DB->fetch( $DB ) )
|
||||
{
|
||||
if ( IPSSearchRegistry::get('opt.noPostPreview') )
|
||||
{
|
||||
$_rows[ $r['status_id'] ] = $r;
|
||||
}
|
||||
else
|
||||
{
|
||||
$_rows[ $r['status_id'] ] = $r;
|
||||
}
|
||||
}
|
||||
|
||||
/* Got any replies? */
|
||||
if ( count( IPSSearchRegistry::get('_internal.replyIds') ) )
|
||||
{
|
||||
$this->DB->build( array(
|
||||
'select' => "r.*, r.reply_date as status_date",
|
||||
'from' => array( 'member_status_replies' => 'r' ),
|
||||
'where' => 'r.reply_id IN( ' . implode( ',', IPSSearchRegistry::get('_internal.replyIds') ) . ')',
|
||||
'add_join' => array_merge( array( array( 'select' => 's.status_id, s.status_member_id, s.status_author_id',
|
||||
'from' => array( 'member_status_updates' => 's' ),
|
||||
'where' => 's.status_id=r.reply_status_id',
|
||||
'type' => 'left' ),
|
||||
array( 'select' => 'm.member_id as owner_id, m.members_display_name as owner_display_name, m.members_seo_name as owner_seo_name',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=s.status_member_id',
|
||||
'type' => 'left' ),
|
||||
array( 'select' => 'mem.member_id as author_id, mem.members_display_name as author_display_name, mem.members_seo_name as author_seo_name',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_id=s.status_author_id',
|
||||
'type' => 'left' ) ) ) ) );
|
||||
/* Grab data */
|
||||
$this->DB->execute();
|
||||
|
||||
/* Grab the results */
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$_rows[ $row['reply_status_id'] ] = $row;
|
||||
$_replies[ $row['reply_status_id'] ] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
/* Store */
|
||||
IPSSearchRegistry::set('_internal.replyData', $_replies );
|
||||
|
||||
/* Fetch count */
|
||||
$count = count( $_rows );
|
||||
$c = 0;
|
||||
$rows = array();
|
||||
$got = 0;
|
||||
|
||||
if ( $count > IPSSearchRegistry::get('set.hardLimit') )
|
||||
{
|
||||
$count = IPSSearchRegistry::get('set.hardLimit');
|
||||
|
||||
IPSSearchRegistry::set('set.resultsCutToLimit', true );
|
||||
}
|
||||
|
||||
/* Set vars */
|
||||
IPSSearch::$ask = 'status_date';
|
||||
IPSSearch::$aso = strtolower( $sort_order );
|
||||
IPSSearch::$ast = 'numerical';
|
||||
|
||||
/* Sort */
|
||||
if ( count( $_rows ) )
|
||||
{
|
||||
usort( $_rows, array("IPSSearch", "usort") );
|
||||
|
||||
/* Build result array */
|
||||
foreach( $_rows as $r )
|
||||
{
|
||||
$c++;
|
||||
|
||||
if ( IPSSearchRegistry::get('in.start') AND IPSSearchRegistry::get('in.start') >= $c )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$rows[ $got ] = $r['status_id'];
|
||||
|
||||
$got++;
|
||||
|
||||
/* Done? */
|
||||
if ( IPSSearchRegistry::get('opt.search_per_page') AND $got >= IPSSearchRegistry::get('opt.search_per_page') )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Return it */
|
||||
return array( 'count' => $count['total_results'], 'resultSet' => $rows );
|
||||
return array( 'count' => $count, 'resultSet' => $rows );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -153,26 +196,18 @@ class search_engine_members extends search_engine
|
||||
*
|
||||
* So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function _membersSearch()
|
||||
{
|
||||
/* INIT */
|
||||
$count = 0;
|
||||
$results = array();
|
||||
$sort_by = IPSSearchRegistry::get('in.search_sort_by');
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
$search_term = IPSSearchRegistry::get('in.clean_search_term');
|
||||
$content_title_only = IPSSearchRegistry::get('opt.searchTitleOnly');
|
||||
$post_search_only = IPSSearchRegistry::get('opt.onlySearchPosts');
|
||||
$order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc';
|
||||
$sortKey = '';
|
||||
$sortType = '';
|
||||
$rows = array();
|
||||
$got = 0;
|
||||
/* INIT */
|
||||
$sort_by = IPSSearchRegistry::get('in.search_sort_by');
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
$search_term = IPSSearchRegistry::get('in.clean_search_term');
|
||||
$sortKey = '';
|
||||
$rows = array();
|
||||
|
||||
if ( IPSSearchRegistry::get('opt.noPostPreview') OR IPSSearchRegistry::get('display.onlyTitles') )
|
||||
if ( IPSSearchRegistry::get('opt.noPostPreview') OR IPSSearchRegistry::get('opt.searchType') == 'titles' )
|
||||
{
|
||||
$group_by = 'm.member_id';
|
||||
}
|
||||
@@ -182,19 +217,17 @@ class search_engine_members extends search_engine
|
||||
{
|
||||
default:
|
||||
case 'date':
|
||||
$sortKey = ( $content_title_only ) ? 'member_id' : 'member_id';
|
||||
$sortType = 'numerical';
|
||||
$sortKey = 'member_id';
|
||||
break;
|
||||
case 'title':
|
||||
$sortKey = 'members_l_display_name';
|
||||
$sortType = 'string';
|
||||
break;
|
||||
}
|
||||
|
||||
/* Query the count */
|
||||
$count = $this->DB->buildAndFetch( array('select' => 'COUNT(*) as total_results',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => $this->_buildWhereStatement( $search_term, $content_title_only ),
|
||||
'where' => $this->_buildWhereStatement( $search_term ),
|
||||
'group' => $group_by,
|
||||
'add_join' => array( array( 'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => "p.pp_member_id=m.member_id",
|
||||
@@ -205,7 +238,7 @@ class search_engine_members extends search_engine
|
||||
/* Fetch data */
|
||||
$this->DB->build( array('select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => $this->_buildWhereStatement( $search_term, $content_title_only ),
|
||||
'where' => $this->_buildWhereStatement( $search_term ),
|
||||
'group' => $group_by,
|
||||
'order' => $sortKey . ' ' . $sort_order,
|
||||
'limit' => array( IPSSearchRegistry::get('in.start'), IPSSearchRegistry::get('opt.search_per_page') ),
|
||||
@@ -213,41 +246,144 @@ class search_engine_members extends search_engine
|
||||
'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => "p.pp_member_id=m.member_id",
|
||||
'type' => 'left' ) ) ) );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->DB->execute();
|
||||
|
||||
/* Sort */
|
||||
/* Get results */
|
||||
while ( $_row = $this->DB->fetch() )
|
||||
{
|
||||
$rows[ $got ] = $_row;
|
||||
|
||||
$got++;
|
||||
$rows[] = IPSMember::buildProfilePhoto( $_row );
|
||||
}
|
||||
|
||||
/* Return it */
|
||||
return array( 'count' => $count['total_results'], 'resultSet' => $rows );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Perform the viewNewContent search
|
||||
* Populates $this->_count and $this->_results
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
* @note Does not support 'Content I have not read' because events are not tracked through topic marker class
|
||||
* @note Does not support 'Content I am following' because you cannot 'follow' members at this point in time
|
||||
*/
|
||||
public function viewNewContent()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Init
|
||||
//-----------------------------------------
|
||||
|
||||
IPSSearchRegistry::set('in.search_sort_by', 'date' );
|
||||
IPSSearchRegistry::set('in.search_sort_order', 'desc' );
|
||||
IPSSearchRegistry::set('opt.searchType', 'titles' );
|
||||
IPSSearchRegistry::set('opt.noPostPreview', true );
|
||||
|
||||
//-----------------------------------------
|
||||
// Set time limit
|
||||
//-----------------------------------------
|
||||
|
||||
if ( IPSSearchRegistry::get('in.period_in_seconds') !== false )
|
||||
{
|
||||
$this->search_begin_timestamp = ( IPS_UNIX_TIME_NOW - IPSSearchRegistry::get('in.period_in_seconds') );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->search_begin_timestamp = intval( $this->memberData['last_visit'] ) ? intval( $this->memberData['last_visit'] ) : IPS_UNIX_TIME_NOW;
|
||||
}
|
||||
|
||||
return $this->search();
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the where portion of a search string
|
||||
*
|
||||
* @access private
|
||||
* @param string $search_term The string to use in the search
|
||||
* @param bool $content_title_only Search only title records
|
||||
* @param string $search_term The string to use in the search
|
||||
* @param bool $searchType Search only title records
|
||||
* @return string
|
||||
**/
|
||||
private function _buildCommentsWhereStatement( $search_term, $content_title_only=false )
|
||||
*/
|
||||
protected function _buildCommentsWhereStatement( $search_term, $searchType=null )
|
||||
{
|
||||
/* INI */
|
||||
$where_clause = array();
|
||||
|
||||
if( $search_term )
|
||||
$where_clause = array();
|
||||
$searchType = ( $searchType === null ) ? IPSSearchRegistry::get('opt.searchType') : $searchType;
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
|
||||
if ( $search_term )
|
||||
{
|
||||
$where_clause[] = "c.comment_content LIKE '%" . mb_strtolower( $search_term ) . "%'";
|
||||
if ( $searchType == 'titles' )
|
||||
{
|
||||
$where_clause[] = $this->DB->buildSearchStatement( 's.status_content', $search_term, true, false, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $searchType == 'content' )
|
||||
{
|
||||
$where_clause[] = $this->DB->buildSearchStatement( 'r.reply_content', $search_term, true, false, false );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Set vars */
|
||||
IPSSearch::$ask = 'status_date';
|
||||
IPSSearch::$aso = strtolower( $sort_order );
|
||||
IPSSearch::$ast = 'numerical';
|
||||
|
||||
/* Find topic ids that match */
|
||||
$tids = array();
|
||||
$pids = array();
|
||||
|
||||
$this->DB->build( array('select' => "s.status_id, s.status_date",
|
||||
'from' => 'member_status_updates s',
|
||||
'where' => $this->_buildCommentsWhereStatement( $search_term, 'titles' ),
|
||||
'order' => 's.status_date ' . $sort_order,
|
||||
'limit' => array(0, IPSSearchRegistry::get('set.hardLimit')) ) );
|
||||
|
||||
$i = $this->DB->execute();
|
||||
|
||||
/* Grab the results */
|
||||
while( $row = $this->DB->fetch( $i ) )
|
||||
{
|
||||
$_rows[ $row['status_id'] ] = $row;
|
||||
}
|
||||
|
||||
/* Sort */
|
||||
if ( count( $_rows ) )
|
||||
{
|
||||
usort( $_rows, array("IPSSearch", "usort") );
|
||||
|
||||
foreach( $_rows as $id => $row )
|
||||
{
|
||||
$tids[] = $row['status_id'];
|
||||
}
|
||||
}
|
||||
|
||||
/* Set vars */
|
||||
IPSSearch::$ask = 'reply_date';
|
||||
IPSSearch::$aso = strtolower( $sort_order );
|
||||
IPSSearch::$ast = 'numerical';
|
||||
|
||||
$this->DB->build( array( 'select' => "r.reply_id, r.reply_date, r.reply_status_id as status_id",
|
||||
'from' => 'member_status_replies r',
|
||||
'where' => $this->_buildCommentsWhereStatement( $search_term, 'content' ),
|
||||
'order' => IPSSearch::$ask . ' ' . IPSSearch::$aso,
|
||||
'limit' => array(0, IPSSearchRegistry::get('set.hardLimit') ) ) );
|
||||
|
||||
$i = $this->DB->execute();
|
||||
|
||||
/* Grab the results */
|
||||
while( $row = $this->DB->fetch( $i ) )
|
||||
{
|
||||
$tids[] = $row['status_id'];
|
||||
$pids[] = $row['reply_id'];
|
||||
}
|
||||
|
||||
if ( count( $pids ) )
|
||||
{
|
||||
IPSSearchRegistry::set('_internal.replyIds', $pids );
|
||||
}
|
||||
|
||||
$where_clause[] = '( s.status_id IN (' . ( count($tids) ? implode( ',', $tids ) : 0 ) .') )';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Add in AND where conditions */
|
||||
@@ -264,51 +400,54 @@ class search_engine_members extends search_engine
|
||||
|
||||
/* Date Restrict */
|
||||
if( $this->search_begin_timestamp && $this->search_end_timestamp )
|
||||
{
|
||||
$where_clause[] = $this->DB->buildBetween( "c.comment_date", $this->search_begin_timestamp, $this->search_end_timestamp );
|
||||
{
|
||||
$where_clause[] = $this->DB->buildBetween( $searchType == 'content' ? "r.reply_date" : "s.status_date", $this->search_begin_timestamp, $this->search_end_timestamp );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $this->search_begin_timestamp )
|
||||
{
|
||||
$where_clause[] = "c.comment_date > {$this->search_begin_timestamp}";
|
||||
$where_clause[] = $searchType == 'content' ? "r.reply_date > {$this->search_begin_timestamp}" : "s.status_date > {$this->search_begin_timestamp}";
|
||||
}
|
||||
|
||||
if( $this->search_end_timestamp )
|
||||
{
|
||||
$where_clause[] = "c.comment_date < {$this->search_end_timestamp}";
|
||||
$where_clause[] = $searchType == 'content' ? "r.reply_date < {$this->search_end_timestamp}" : "s.status_date < {$this->search_end_timestamp}";
|
||||
}
|
||||
}
|
||||
|
||||
$where_clause[] = "c.comment_approved=1";
|
||||
|
||||
/* Build and return the string */
|
||||
return implode( " AND ", $where_clause );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Builds the where portion of a search string
|
||||
*
|
||||
* @access private
|
||||
* @param string $search_term The string to use in the search
|
||||
* @param bool $content_title_only Search only title records
|
||||
* @return string
|
||||
**/
|
||||
private function _buildWhereStatement( $search_term, $content_title_only=false )
|
||||
*/
|
||||
protected function _buildWhereStatement( $search_term )
|
||||
{
|
||||
/* INI */
|
||||
$where_clause = array();
|
||||
|
||||
if( $search_term )
|
||||
{
|
||||
if( $content_title_only )
|
||||
switch( IPSSearchRegistry::get('opt.searchType') )
|
||||
{
|
||||
$where_clause[] = "m.members_l_display_name LIKE '%" . mb_strtolower( $search_term ) . "%'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$where_clause[] = "m.members_l_display_name LIKE '%" . mb_strtolower( $search_term ) . "%' OR p.signature LIKE '%{$search_term}%' OR p.pp_about_me LIKE '%{$search_term}%'";
|
||||
case 'both':
|
||||
default:
|
||||
$where_clause[] = "(m.members_l_display_name LIKE '%" . mb_strtolower( $search_term ) . "%' OR p.signature LIKE '%{$search_term}%' OR p.pp_about_me LIKE '%{$search_term}%')";
|
||||
break;
|
||||
|
||||
case 'titles':
|
||||
$where_clause[] = "m.members_l_display_name LIKE '%" . mb_strtolower( $search_term ) . "%'";
|
||||
break;
|
||||
|
||||
case 'content':
|
||||
$where_clause[] = "(p.signature LIKE '%{$search_term}%' OR p.pp_about_me LIKE '%{$search_term}%')";
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,16 +488,15 @@ class search_engine_members extends search_engine
|
||||
/**
|
||||
* Remap standard columns (Apps can override )
|
||||
*
|
||||
* @access public
|
||||
* @param string $column sql table column for this condition
|
||||
* @return string column
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function remapColumn( $column )
|
||||
{
|
||||
if ( IPSSearchRegistry::get( 'members.searchInKey') == 'comments' )
|
||||
{
|
||||
$column = ( $column == 'member_id' ) ? 'c.comment_by_member_id' : '';
|
||||
$column = ( $column == 'member_id' ) ? 'status_author_id' : '';
|
||||
}
|
||||
|
||||
return $column;
|
||||
@@ -367,62 +505,21 @@ class search_engine_members extends search_engine
|
||||
/**
|
||||
* Returns an array used in the searchplugin's setCondition method
|
||||
*
|
||||
* @access public
|
||||
* @param array $data Array of forums to view
|
||||
* @return array Array with column, operator, and value keys, for use in the setCondition call
|
||||
**/
|
||||
*/
|
||||
public function buildFilterSQL( $data )
|
||||
{
|
||||
/* INIT */
|
||||
$return = array();
|
||||
|
||||
/* Set up some defaults */
|
||||
IPSSearchRegistry::set( 'opt.noPostPreview' , false );
|
||||
IPSSearchRegistry::set( 'opt.onlySearchPosts', false );
|
||||
//IPSSearchRegistry::set( 'members.searchInKey' , 'comments' );
|
||||
|
||||
/* member specific search */
|
||||
/* Make default search type topics */
|
||||
if( isset( $data ) && is_array( $data ) && count( $data ) )
|
||||
{
|
||||
foreach( $data as $field => $_data )
|
||||
{
|
||||
/* CONTENT ONLY */
|
||||
if ( $field == 'searchInKey' AND $_data['searchInKey'] == 'members' )
|
||||
{
|
||||
//IPSSearchRegistry::set( 'member.searchType', 'members' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Can handle boolean searching
|
||||
*
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function isBoolean()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform the viewNewContent search
|
||||
* Forum Version
|
||||
* Populates $this->_count and $this->_results
|
||||
*
|
||||
* @access public
|
||||
* @return nothin'
|
||||
*/
|
||||
public function viewNewContent()
|
||||
{
|
||||
/* Set up some vars */
|
||||
IPSSearchRegistry::set('set.resultCutToDate', intval( $this->memberData['last_visit'] ) );
|
||||
|
||||
return parent::viewNewContent();
|
||||
}
|
||||
}
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Returns HTML for the form (optional class, not required)
|
||||
* Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $
|
||||
* Last Updated: $Date: 2011-04-14 23:16:18 -0400 (Thu, 14 Apr 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5855 $
|
||||
**/
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8347 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
@@ -45,8 +45,6 @@ class search_form_members
|
||||
/**
|
||||
* Return sort drop down
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function fetchSortDropDown()
|
||||
@@ -63,13 +61,19 @@ class search_form_members
|
||||
* Optional function to allow apps to define searchable 'sub-apps'.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function fetchSortIn()
|
||||
{
|
||||
$array = array( 0 => array( 'members', $this->lang->words['s_msin_members'] ),
|
||||
1 => array( 'comments', $this->lang->words['s_msin_comments'] ) );
|
||||
if( $this->request['do'] == 'user_activity' )
|
||||
{
|
||||
$array = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$array = array( 0 => array( 'members', $this->lang->words['s_msin_members'] ),
|
||||
1 => array( 'comments', $this->lang->words['s_msin_comments'] ) );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Formats forum search results
|
||||
* Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $
|
||||
* Last Updated: $Date: 2011-06-15 07:22:24 -0400 (Wed, 15 Jun 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5855 $
|
||||
**/
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9043 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
@@ -35,7 +35,6 @@ class search_format_members extends search_format
|
||||
/**
|
||||
* Parse search results
|
||||
*
|
||||
* @access private
|
||||
* @param array $r Search result
|
||||
* @return array $html Blocks of HTML
|
||||
*/
|
||||
@@ -47,35 +46,148 @@ class search_format_members extends search_format
|
||||
/**
|
||||
* Formats the forum search result for display
|
||||
*
|
||||
* @access public
|
||||
* @param array $search_row Array of data
|
||||
* @return mixed Formatted content, ready for display, or array containing a $sub section flag, and content
|
||||
**/
|
||||
*/
|
||||
public function formatContent( $data )
|
||||
{
|
||||
$data['misc'] = unserialize( $data['misc'] );
|
||||
$template = ( IPSSearchRegistry::get('members.searchInKey') AND IPSSearchRegistry::get('members.searchInKey') != 'comments' ) ? 'memberSearchResult' : 'memberCommentsSearchResult';
|
||||
$data['misc'] = unserialize( $data['misc'] );
|
||||
$template = IPSSearchRegistry::get('members.searchInKey') == 'comments' ? 'memberCommentsSearchResult' : 'memberSearchResult';
|
||||
|
||||
return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->$template( $data, IPSSearchRegistry::get('display.onlyTitles') ), 0 );
|
||||
return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->$template( $data, IPSSearchRegistry::get('opt.searchType') == 'titles' ? true : false ), 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats / grabs extra data for results
|
||||
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function processResults( $ids )
|
||||
{
|
||||
$rows = array();
|
||||
|
||||
foreach( $ids as $i => $d )
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
|
||||
{
|
||||
$rows[ $i ] = $this->genericizeResults( $d );
|
||||
return $this->processResultsComments( $ids );
|
||||
}
|
||||
else
|
||||
{
|
||||
$rows = array();
|
||||
|
||||
foreach( $ids as $i => $d )
|
||||
{
|
||||
$rows[ $i ] = $this->genericizeResults( $d );
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats / grabs extra data for results
|
||||
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
|
||||
*
|
||||
* @param array $ids Ids
|
||||
* @return array
|
||||
*/
|
||||
public function processResultsComments( $ids )
|
||||
{
|
||||
/* INIT */
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
$search_term = IPSSearchRegistry::get('in.clean_search_term');
|
||||
$content_title_only = IPSSearchRegistry::get('opt.searchType') == 'content' ? false : true;
|
||||
$members = array();
|
||||
$results = array();
|
||||
$statusIds = array();
|
||||
$replyIds = IPSSearchRegistry::get('_internal.replyIds');
|
||||
$replyData = IPSSearchRegistry::get('_internal.replyData');
|
||||
$replies = array();
|
||||
$sortKey = '';
|
||||
|
||||
/* Got some? */
|
||||
if ( count( $ids ) )
|
||||
{
|
||||
/* Set vars */
|
||||
IPSSearch::$ask = 'status_date';
|
||||
IPSSearch::$aso = strtolower( $sort_order );
|
||||
IPSSearch::$ast = 'numerical';
|
||||
|
||||
/* Get the status updates */
|
||||
$this->DB->build( array('select' => "s.*",
|
||||
'from' => array( 'member_status_updates' => 's' ),
|
||||
'where' => 's.status_id IN( ' . implode( ',', $ids ) . ')',
|
||||
'add_join' => array_merge( array( array( 'select' => 'm.member_id as owner_id, m.members_display_name as owner_display_name, m.members_seo_name as owner_seo_name',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=s.status_member_id',
|
||||
'type' => 'left' ),
|
||||
array( 'select' => 'mem.member_id as author_id, mem.members_display_name as author_display_name, mem.members_seo_name as author_seo_name',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_id=s.status_author_id',
|
||||
'type' => 'left' ) ) ) ) );
|
||||
|
||||
/* Grab data */
|
||||
$this->DB->execute();
|
||||
|
||||
/* Grab the results */
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$statusIds[ $row['status_id'] ] = $row;
|
||||
}
|
||||
|
||||
/* Sort */
|
||||
if ( count( $statusIds ) )
|
||||
{
|
||||
usort( $statusIds, array("IPSSearch", "usort") );
|
||||
|
||||
foreach( $statusIds as $id => $row )
|
||||
{
|
||||
/* Do we have any reply data? */
|
||||
if ( ! empty( $replyData[ $id ] ) )
|
||||
{
|
||||
$row = array_merge( $row, $replyData[ $id ] );
|
||||
}
|
||||
|
||||
/* Get author data? */
|
||||
if ( ! empty( $row['status_author_id'] ) )
|
||||
{
|
||||
$members[ $row['status_author_id'] ] = $row['status_author_id'];
|
||||
}
|
||||
|
||||
if ( ! empty( $row['status_member_id'] ) )
|
||||
{
|
||||
$members[ $row['status_member_id'] ] = $row['status_member_id'];
|
||||
}
|
||||
|
||||
if ( ! empty( $row['reply_member_id'] ) )
|
||||
{
|
||||
$members[ $row['reply_member_id'] ] = $row['reply_member_id'];
|
||||
}
|
||||
|
||||
$results[ $row['status_id'] ] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
/* Need to load members? */
|
||||
if ( count( $members ) )
|
||||
{
|
||||
$mems = IPSMember::load( $members, 'all' );
|
||||
|
||||
foreach( $results as $id => $r )
|
||||
{
|
||||
$_status_member = IPSMember::buildDisplayData( $mems[ $r['status_member_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
|
||||
$_status_author = IPSMember::buildDisplayData( $mems[ $r['status_author_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
|
||||
|
||||
$results[ $id ]['status_member'] = $_status_member;
|
||||
$results[ $id ]['status_author'] = $_status_author;
|
||||
|
||||
if ( ! empty( $r['reply_member_id'] ) )
|
||||
{
|
||||
$results[ $id ]['reply_author'] = IPSMember::buildDisplayData( $mems[ $r['reply_member_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $rows;
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -83,38 +195,38 @@ class search_format_members extends search_format
|
||||
*
|
||||
* @param array $r
|
||||
* @return array
|
||||
**/
|
||||
*/
|
||||
public function genericizeResults( $r )
|
||||
{
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') AND IPSSearchRegistry::get('members.searchInKey') != 'comments' )
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
|
||||
{
|
||||
$r['app'] = 'members';
|
||||
$r['content'] = $r['signature'] . ' ' . $r['pp_about_me'];
|
||||
$r['content_title'] = $r['members_display_name'];
|
||||
$r['updated'] = time();
|
||||
$r['type_2'] = 'profile_view';
|
||||
$r['type_id_2'] = $r['member_id'];
|
||||
$r['misc'] = serialize( array(
|
||||
'pp_thumb_photo' => $r['pp_thumb_photo'],
|
||||
'pp_thumb_width' => $r['pp_thumb_width'],
|
||||
'pp_thumb_height' => $r['pp_thumb_height']
|
||||
) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$r['app'] = 'members';
|
||||
$r['content'] = $r['comment_content'];
|
||||
$r['content_title'] = $r['member_display_name_owner'];
|
||||
$r['updated'] = $r['comment_date'];
|
||||
$r['type_2'] = 'comment_id';
|
||||
$r['type_id_2'] = $r['comment_id'];
|
||||
$r['misc'] = serialize( array(
|
||||
$r['app'] = 'members';
|
||||
$r['content'] = $r['comment_content'];
|
||||
$r['content_title'] = $r['member_display_name_owner'];
|
||||
$r['updated'] = $r['comment_date'];
|
||||
$r['type_2'] = 'comment_id';
|
||||
$r['type_id_2'] = $r['comment_id'];
|
||||
$r['misc'] = serialize( array(
|
||||
'members_display_name' => $r['members_display_name'],
|
||||
'pp_thumb_photo' => $r['pp_thumb_photo'],
|
||||
'pp_thumb_width' => $r['pp_thumb_width'],
|
||||
'pp_thumb_height' => $r['pp_thumb_height']
|
||||
) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$r['app'] = 'members';
|
||||
$r['content'] = $r['signature'] . ' ' . $r['pp_about_me'];
|
||||
$r['content_title'] = $r['members_display_name'];
|
||||
$r['updated'] = time();
|
||||
$r['type_2'] = 'profile_view';
|
||||
$r['type_id_2'] = $r['member_id'];
|
||||
$r['misc'] = serialize( array(
|
||||
'pp_thumb_photo' => $r['pp_thumb_photo'],
|
||||
'pp_thumb_width' => $r['pp_thumb_width'],
|
||||
'pp_thumb_height' => $r['pp_thumb_height']
|
||||
) );
|
||||
}
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,95 +3,20 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Sphinx template file
|
||||
* Last Updated: $Date: 2010-06-22 03:39:59 -0400 (Tue, 22 Jun 2010) $
|
||||
* Last Updated: $Date: 2011-06-02 17:57:20 -0400 (Thu, 02 Jun 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6566 $
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8953 $
|
||||
* @since 3.0.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();
|
||||
}
|
||||
|
||||
$appSphinxTemplate = <<<EOF
|
||||
|
||||
############################## --- MEMBERS --- ##############################
|
||||
|
||||
source members_search_main : ipb_source_config
|
||||
{
|
||||
# Set our forum PID counter
|
||||
sql_query_pre = REPLACE INTO <!--SPHINX_DB_PREFIX-->cache_store VALUES( 'sphinx_members_counter', (SELECT max(member_id) FROM <!--SPHINX_DB_PREFIX-->members), '', 0, UNIX_TIMESTAMP() )
|
||||
|
||||
# Query posts for the main source
|
||||
sql_query = SELECT m.member_id, m.member_id as search_id, m.member_group_id, m.email, m.joined, m.members_display_name, m.name, \
|
||||
REPLACE( pi.perm_view, '*', 0 ) as perm_view, \
|
||||
CASE WHEN pi.authorized_users IS NULL THEN 0 ELSE pi.authorized_users END AS authorized_users, \
|
||||
CASE WHEN pi.friend_only=0 THEN 0 ELSE m.member_id END AS friend_only, \
|
||||
CASE WHEN pi.owner_only=0 THEN 0 ELSE m.member_id END AS owner_only \
|
||||
FROM <!--SPHINX_DB_PREFIX-->members m \
|
||||
LEFT JOIN <!--SPHINX_DB_PREFIX-->permission_index pi ON ( pi.perm_type_id=1 AND pi.perm_type='profile_view' ) \
|
||||
WHERE m.member_id <= ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_members_counter' )
|
||||
|
||||
# Fields
|
||||
sql_attr_uint = search_id
|
||||
sql_attr_uint = friend_only
|
||||
sql_attr_uint = owner_only
|
||||
sql_attr_timestamp = joined
|
||||
sql_attr_multi = uint perm_view from field
|
||||
sql_attr_multi = uint authorized_users from field
|
||||
|
||||
sql_ranged_throttle = 0
|
||||
}
|
||||
|
||||
source members_search_delta : members_search_main
|
||||
{
|
||||
# Override the base sql_query_pre
|
||||
sql_query_pre =
|
||||
|
||||
# Query posts for the main source
|
||||
sql_query = SELECT m.member_id, m.member_id as search_id, m.member_group_id, m.email, m.joined, m.members_display_name, m.name, \
|
||||
REPLACE( pi.perm_view, '*', 0 ) as perm_view, \
|
||||
CASE WHEN pi.authorized_users IS NULL THEN 0 ELSE pi.authorized_users END AS authorized_users, \
|
||||
CASE WHEN pi.friend_only=0 THEN 0 ELSE m.member_id END AS friend_only, \
|
||||
CASE WHEN pi.owner_only=0 THEN 0 ELSE m.member_id END AS owner_only \
|
||||
FROM <!--SPHINX_DB_PREFIX-->members m \
|
||||
LEFT JOIN <!--SPHINX_DB_PREFIX-->permission_index pi ON ( pi.perm_type_id=1 AND pi.perm_type='profile_view' ) \
|
||||
WHERE m.member_id > ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_members_counter' )
|
||||
}
|
||||
|
||||
index members_search_main
|
||||
{
|
||||
source = members_search_main
|
||||
path = <!--SPHINX_BASE_PATH-->/members_search_main
|
||||
|
||||
docinfo = extern
|
||||
mlock = 0
|
||||
morphology = none
|
||||
min_word_len = 2
|
||||
charset_type = sbcs
|
||||
html_strip = 0
|
||||
#infix_fields = members_display_name, email, name
|
||||
#min_infix_len = 3
|
||||
#enable_star = 1
|
||||
}
|
||||
|
||||
index members_search_delta : members_search_main
|
||||
{
|
||||
source = members_search_delta
|
||||
path = <!--SPHINX_BASE_PATH-->/members_search_delta
|
||||
}
|
||||
|
||||
|
||||
EOF;
|
||||
/* This is just an empty sphinx template to ensure we overwrite outdated ones on upgrade */
|
||||
$appSphinxTemplate = "";
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user