Version 3.1.4

This commit is contained in:
Neo committed 2025-12-19 00:32:22 -08:00
1 parent 1d4720f3e2
commit ae5c01cc78
2563 files changed
+283048 -240689

No files matched your search

@@ -1 +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.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; 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.invisionboard.com/">IP.Board</a>
</body>
</html>
@@ -1,129 +1,131 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* Member form manipulation
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 1st march 2002
* @version $Revision: 4948 $
*
*/
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 admin_member_form__members implements admin_member_form
{
/**
* Tab name
* This can be left blank and the application title will
* be used
*
* @access public
* @var string Tab name
*/
public $tab_name = "";
/**
* Returns sidebar links for this tab
* You may return an empty array or FALSE to not have
* any links show in the sidebar for this block.
*
* The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL
* is added automatically.
*
* The image must be a full URL or blank to use a default image.
*
* Use the format:
* $array[] = array( 'img' => '', 'url' => '', 'title' => '' );
*
* @access public
* @author Matt Mecham
* @param array Member data
* @return array Array of links
*/
public function getSidebarLinks( $member=array() )
{
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_members' ), 'members' );
$array = array();
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'membertools_delete_pms', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=deleteMessages',
'title' => ipsRegistry::getClass('class_localization')->words['form_deletepms'] );
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'membertools_ip', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=show_all_ips',
'title' => ipsRegistry::getClass('class_localization')->words['form_showallips'] );
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'member_suspend', 'members', 'members' ) )
{
if( $member['temp_ban'] )
{
$array[] = array( 'img' => '',
'url' => 'section=members&amp;module=members&amp;do=unsuspend',
'title' => ipsRegistry::getClass('class_localization')->words['form_unsuspendmem'] );
}
else
{
$array[] = array( 'img' => '',
'url' => 'section=members&amp;module=members&amp;do=banmember',
'title' => ipsRegistry::getClass('class_localization')->words['form_suspendmem'] );
}
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'members_merge', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=merge',
'title' => ipsRegistry::getClass('class_localization')->words['form_mergemember'] );
}
return $array;
}
/**
* Returns content for the page.
*
* @access public
* @author Matt Mecham
* @param array Member data
* @return array Array of tabs, content
*/
public function getDisplayContent( $member=array() )
{
return array();
}
/**
* Process the entries for saving and return
*
* @access public
* @author Brandon Farber
* @return array Multi-dimensional array (core, extendedProfile) for saving
*/
public function getForSave()
{
return array( 'core' => array(), 'extendedProfile' => array() );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Member form manipulation
* Last Updated: $Date: 2010-01-15 14:28:09 -0500 (Fri, 15 Jan 2010) $
* </pre>
*
* @author $Author: josh $
* @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: 5715 $
*
*/
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 admin_member_form__members implements admin_member_form
{
/**
* Tab name
* This can be left blank and the application title will
* be used
*
* @access public
* @var string Tab name
*/
public $tab_name = "";
/**
* Returns sidebar links for this tab
* You may return an empty array or FALSE to not have
* any links show in the sidebar for this block.
*
* The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL
* is added automatically.
*
* The image must be a full URL or blank to use a default image.
*
* Use the format:
* $array[] = array( 'img' => '', 'url' => '', 'title' => '' );
*
* @access public
* @author Matt Mecham
* @param array Member data
* @return array Array of links
*/
public function getSidebarLinks( $member=array() )
{
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_members' ), 'members' );
$array = array();
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'membertools_delete_pms', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=deleteMessages',
'title' => ipsRegistry::getClass('class_localization')->words['form_deletepms'] );
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'membertools_ip', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=show_all_ips',
'title' => ipsRegistry::getClass('class_localization')->words['form_showallips'] );
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'member_suspend', 'members', 'members' ) )
{
if( $member['temp_ban'] )
{
$array[] = array( 'img' => '',
'url' => 'section=members&amp;module=members&amp;do=unsuspend',
'title' => ipsRegistry::getClass('class_localization')->words['form_unsuspendmem'] );
}
else
{
$array[] = array( 'img' => '',
'url' => 'section=members&amp;module=members&amp;do=banmember',
'title' => ipsRegistry::getClass('class_localization')->words['form_suspendmem'] );
}
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'members_merge', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=merge',
'title' => ipsRegistry::getClass('class_localization')->words['form_mergemember'] );
}
return $array;
}
/**
* Returns content for the page.
*
* @access public
* @author Matt Mecham
* @param array Member data
* @return array Array of tabs, content
*/
public function getDisplayContent( $member=array(), $tabsUsed=5 )
{
return array( 'tabs' => '', 'content' => '', 'tabsUsed' => 0 );
}
/**
* Process the entries for saving and return
*
* @access public
* @author Brandon Farber
* @return array Multi-dimensional array (core, extendedProfile) for saving
*/
public function getForSave()
{
return array( 'core' => array(), 'extendedProfile' => array() );
}
}
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; 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.invisionboard.com/">IP.Board</a>
</body>
</html>
@@ -0,0 +1,550 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* IP.Board messenger attachments plugin
* 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 Core
* @link http://www.invisionpower.com
* @since 6/24/2008
* @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();
}
class plugin_msg extends class_attach
{
/**
* Module type
*
* @access public
* @var string
*/
public $module = 'msg';
/**
* Checks the attachment and checks for download / show perms
*
* @access public
* @param integer Attachment id
* @return array Attachment data
*/
public function getAttachmentData( $attach_id )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$_ok = 0;
//-----------------------------------------
// Grab 'em
//-----------------------------------------
$this->DB->build( array( 'select' => 'a.*',
'from' => array( 'attachments' => 'a' ),
'where' => "a.attach_rel_module='".$this->module."' AND a.attach_id=".$attach_id,
'add_join' => array( 0 => array( 'select' => 'p.*',
'from' => array( 'message_posts' => 'p' ),
'where' => "p.msg_id=a.attach_rel_id",
'type' => 'left' ),
1 => array( 'select' => 't.*',
'from' => array( 'message_topics' => 't' ),
'where' => "t.mt_id=p.msg_topic_id",
'type' => 'left' ),
2 => array( 'select' => 'u.*',
'from' => array( 'message_topic_user_map' => 'u' ),
'where' => "u.map_topic_id=t.mt_id AND u.map_user_id=" . $this->memberData['member_id'],
'type' => 'left' ) ) ) );
$attach_sql = $this->DB->execute();
$attach = $this->DB->fetch( $attach_sql );
//-----------------------------------------
// Check..
//-----------------------------------------
if ( ! isset( $attach['msg_id'] ) OR empty( $attach['msg_id'] ) )
{
if( $attach['attach_member_id'] != $this->memberData['member_id'] )
{
return FALSE;
}
}
//-----------------------------------------
// For previews
//-----------------------------------------
if ( $attach['attach_rel_id'] == 0 AND $attach['attach_member_id'] == $this->memberData['member_id'] )
{
$_ok = 1;
}
else if ( $attach['map_user_id'] )
{
$_ok = 1;
}
//-----------------------------------------
// Ok?
//-----------------------------------------
if ( $_ok )
{
return $attach;
}
else
{
return FALSE;
}
}
/**
* 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
*/
public function renderAttachment( $attach_ids, $rel_ids=array(), $attach_post_key=0 )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$rows = array();
$query_bits = array();
$query = '';
$match = 0;
//-----------------------------------------
// Check
//-----------------------------------------
if ( is_array( $attach_ids ) AND count( $attach_ids ) )
{
$query_bits[] = "attach_id IN (" . implode( ",", $attach_ids ) .")";
}
if ( is_array( $rel_ids ) and count( $rel_ids ) )
{
// We need to reset the array - this query bit will return everything we need, but
// if we "OR" join the above query bit with this one, it causes bigger mysql loads
$query_bits = array();
$query_bits[] = "attach_rel_id IN (" . implode( ",", $rel_ids ) . ")";
//$query = " OR attach_rel_id IN (-1," . implode( ",", $rel_ids ) . ")";
$match = 1;
}
if ( $attach_post_key )
{
$query_bits[] = "attach_post_key='".$this->DB->addSlashes( $attach_post_key )."'";
//$query .= " OR attach_post_key='".$this->DB->addSlashes( $attach_post_key )."'";
$match = 2;
}
if( !count($query_bits) )
{
$query = "attach_id IN (-1)";
}
else
{
$query = implode( " OR ", $query_bits );
}
//-----------------------------------------
// Grab 'em
//-----------------------------------------
$this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module='{$this->module}' AND ( {$query} )" ) );
$attach_sql = $this->DB->execute();
//-----------------------------------------
// Loop through and filter off naughty ids
//-----------------------------------------
while( $db_row = $this->DB->fetch( $attach_sql ) )
{
$_ok = 1;
if ( $match == 1 )
{
if ( ! in_array( $db_row['attach_rel_id'], $rel_ids ) )
{
$_ok = 0;
}
}
else if ( $match == 2 )
{
if ( $db_row['attach_post_key'] != $attach_post_key )
{
$_ok = 0;
}
}
//-----------------------------------------
// Ok?
//-----------------------------------------
if ( $_ok )
{
$rows[ $db_row['attach_id'] ] = $db_row;
}
}
//-----------------------------------------
// Return
//-----------------------------------------
return $rows;
}
/**
* Recounts number of attachments for the articles row
*
* @access public
* @param string Post key
* @param integer Related ID
* @param array Arguments for query
* @return array Returns count of items found
*/
public function postUploadProcess( $post_key, $rel_id, $args=array() )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$cnt = array( 'cnt' => 0 );
//-----------------------------------------
// Check..
//-----------------------------------------
if ( ! $post_key )
{
return 0;
}
$cnt = $this->DB->buildAndFetch( array( "select" => 'COUNT(*) as cnt',
'from' => 'attachments',
'where' => "attach_post_key='{$post_key}'") );
/*if ( $cnt['cnt'] )
{
$this->DB->update( 'message_topics', "mt_hasattach=mt_hasattach+" . $cnt['cnt'], "mt_id=" . intval( $args['mt_id'] ), FALSE, TRUE );
}*/
return array( 'count' => $cnt['cnt'] );
}
/**
* Recounts number of attachments for the articles row
*
* @access public
* @param array Attachment data
* @return boolean
*/
public function attachmentRemovalCleanup( $attachment )
{
//-----------------------------------------
// Check
//-----------------------------------------
if ( ! $attachment['attach_id'] )
{
return FALSE;
}
$message = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'message_posts',
'where' => 'msg_id=' . intval( $attachment['attach_rel_id'] ) ) );
if ( isset( $message['msg_topic_id'] ) )
{
//-----------------------------------------
// GET ALL MSG IDS IN THIS TOPIC
//-----------------------------------------
$pids = array();
$count = 0;
$this->DB->build( array( 'select' => 'msg_id',
'from' => 'message_posts',
'where' => "msg_topic_id=". $message['msg_topic_id'] ) );
$this->DB->execute();
while ( $p = $this->DB->fetch() )
{
$pids[] = $p['msg_id'];
}
//-----------------------------------------
// GET ATTACHMENT COUNT
//-----------------------------------------
if ( count( $pids ) )
{
$this->DB->build( array( "select" => 'count(*) as cnt',
'from' => 'attachments',
'where' => "attach_rel_module='msg' AND attach_rel_id IN(".implode(",",$pids).")") );
$this->DB->execute();
$cnt = $this->DB->fetch();
$count = intval( $cnt['cnt'] );
}
$this->DB->update( 'message_topics', array( 'mt_hasattach' => $count ), "mt_id=" . $message['msg_topic_id'] );
}
return TRUE;
}
/**
* Determines if you have permission for bulk attachment removal
* Returns TRUE or FALSE
* IT really does
*
* @access public
* @param array Ids to check against
* @return boolean
*/
public function canBulkRemove( $attach_rel_ids=array() )
{
return $this->memberData['g_is_supmod'] ? true : false;
}
/**
* Determines if you can remove this attachment
* Returns TRUE or FALSE
* IT really does
*
* @access public
* @param array Attachment data
* @return boolean
*/
public function canRemove( $attachment )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$ok_to_remove = FALSE;
//-----------------------------------------
// Check
//-----------------------------------------
if ( ! $attachment['attach_id'] )
{
return FALSE;
}
//-----------------------------------------
// Allowed to remove?
//-----------------------------------------
if ( $this->memberData['member_id'] == $attachment['attach_member_id'] )
{
$ok_to_remove = TRUE;
}
else if ( $this->memberData['g_is_supmod'] )
{
$ok_to_remove = TRUE;
}
else
{
$message = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'message_posts',
'where' => 'msg_id=' . intval( $attachment['attach_rel_id'] ) ) );
if ( $this->memberData['member_id'] == $message['msg_author_id'] )
{
$ok_to_remove = TRUE;
}
}
return $ok_to_remove;
}
/**
* Returns an array of the allowed upload sizes in bytes.
* Return 'space_allowed' as -1 to not allow uploads.
* 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' ]
*/
public function getSpaceAllowance( $post_key='', $member_id='' )
{
$max_php_size = intval( IPSLib::getMaxPostSize() );
$member_id = intval( $member_id ? $member_id : $this->memberData['member_id'] );
$space_left = 0;
$space_used = 0;
$space_allowed = 0;
$max_single_upload = 0;
//-----------------------------------------
// Allowed to attach?
//-----------------------------------------
if ( ! $member_id )
{
$space_allowed = -1;
}
else
{
//-----------------------------------------
// Generate total space allowed
//-----------------------------------------
$total_space_allowed = ( $this->memberData['g_attach_per_post'] ? $this->memberData['g_attach_per_post'] : $this->memberData['g_attach_max'] ) * 1024;
//-----------------------------------------
// Generate space used figure
//-----------------------------------------
if ( $this->memberData['g_attach_per_post'] )
{
//-----------------------------------------
// Per post limit...
//-----------------------------------------
$_space_used = $this->DB->buildAndFetch( array( 'select' => 'SUM(attach_filesize) as figure',
'from' => 'attachments',
'where' => "attach_post_key='".$post_key."'" ) );
$space_used = intval( $_space_used['figure'] );
}
else
{
//-----------------------------------------
// Global limit...
//-----------------------------------------
$_space_used = $this->DB->buildAndFetch( array( 'select' => 'SUM(attach_filesize) as figure',
'from' => 'attachments',
'where' => 'attach_member_id='.$member_id . " AND attach_rel_module IN( 'post', 'msg' )" ) );
$space_used = intval( $_space_used['figure'] );
}
//-----------------------------------------
// Generate space allowed figure
//-----------------------------------------
if ( $this->memberData['g_attach_max'] > 0 )
{
if ( $this->memberData['g_attach_per_post'] )
{
$_g_space_used = $this->DB->buildAndFetch( array( 'select' => 'SUM(attach_filesize) as figure',
'from' => 'attachments',
'where' => 'attach_member_id='.$member_id . " AND attach_rel_module IN( 'post', 'msg' )" ) );
$g_space_used = intval( $_g_space_used['figure'] );
if( intval( ( $this->memberData['g_attach_max'] * 1024 ) - $g_space_used ) < 0 )
{
$space_used = $g_space_used;
$total_space_allowed = $this->memberData['g_attach_max'] * 1024;
$space_allowed = ( $this->memberData['g_attach_max'] * 1024 ) - $space_used;
$space_allowed = $space_allowed < 0 ? -1 : $space_allowed;
}
else
{
$space_allowed = ( $this->memberData['g_attach_per_post'] * 1024 ) - $space_used;
$space_allowed = $space_allowed < 0 ? -1 : $space_allowed;
}
}
else
{
$space_allowed = ( $this->memberData['g_attach_max'] * 1024 ) - $space_used;
$space_allowed = $space_allowed < 0 ? -1 : $space_allowed;
}
}
else
{
if ( $this->memberData['g_attach_per_post'] )
{
$space_allowed = ( $this->memberData['g_attach_per_post'] * 1024 ) - $space_used;
$space_allowed = $space_allowed < 0 ? -1 : $space_allowed;
}
else
{
# Unlimited
$space_allowed = 0;
}
}
//-----------------------------------------
// Generate space left figure
//-----------------------------------------
$space_left = $space_allowed ? $space_allowed : 0;
$space_left = ($space_left < 0) ? -1 : $space_left;
//-----------------------------------------
// Generate max upload size
//-----------------------------------------
if ( ! $max_single_upload )
{
if ( $space_left > 0 AND $space_left < $max_php_size )
{
$max_single_upload = $space_left;
}
else if ( $max_php_size )
{
$max_single_upload = $max_php_size;
}
}
}
IPSDebug::fireBug( 'info', array( 'Space left: ' . $space_left ) );
IPSDebug::fireBug( 'info', array( 'Max PHP size: ' . $max_php_size ) );
IPSDebug::fireBug( 'info', array( 'Max single file size: ' . $max_single_upload ) );
$return = array( 'space_used' => $space_used, 'space_left' => $space_left, 'space_allowed' => $space_allowed, 'max_single_upload' => $max_single_upload, 'total_space_allowed' => $total_space_allowed );
return $return;
}
/**
* Returns an array of settings:
* 'siu_thumb' = Allow thumbnail creation?
* 'siu_height' = Height of the generated thumbnail in pixels
* 'siu_width' = Width of the generated thumbnail in pixels
* 'upload_dir' = Base upload directory (must be a full path)
*
* 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()
{
$this->mysettings = array();
return true;
}
}
@@ -1,141 +1,143 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* Core extensions
* Last Updated: $Date: 2009-11-10 18:07:22 -0500 (Tue, 10 Nov 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 5345 $
*
*/
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 publicSessions__members
{
/**
* Return session variables for this application
*
* 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
*/
public function getSessionVariables()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$array = array( 'location_1_type' => '',
'location_1_id' => 0,
'location_2_type' => '',
'location_2_id' => 0 );
if( 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'];
}
return $array;
}
/**
* 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
*/
public function parseOnlineEntries( $rows )
{
if( !is_array($rows) OR !count($rows) )
{
return $rows;
}
$final = array();
$profiles = array();
$names = array();
//-----------------------------------------
// Extract the topic/forum data
//-----------------------------------------
foreach( $rows as $row )
{
if( $row['current_appcomponent'] != 'members' OR !$row['current_module'] )
{
continue;
}
if( $row['current_module'] == 'profile' )
{
$profiles[] = $row['location_1_id'];
}
}
if( count($profiles) )
{
ipsRegistry::DB()->build( array( 'select' => 'member_id, members_display_name, members_seo_name', 'from' => 'members', 'where' => 'member_id IN(' . implode( ',', $profiles ) . ')' ) );
$pr = ipsRegistry::DB()->execute();
while( $r = ipsRegistry::DB()->fetch($pr) )
{
$names[ $r['member_id'] ] = array( 'members_display_name' => $r['members_display_name'], 'members_seo_name' => $r['members_seo_name'] );
}
}
foreach( $rows as $row )
{
if( $row['current_appcomponent'] == 'members' )
{
if( $row['current_module'] == 'online' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_online'];
}
if( $row['current_module'] == 'list' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_members'];
}
if( $row['current_module'] == 'messaging' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_msg'];
}
if( $row['current_module'] == 'profile' )
{
if ( isset( $names[ $row['location_1_id'] ] ) )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_profile'];
$row['where_line_more'] = $names[ $row['location_1_id'] ]['members_display_name'];
$row['where_link'] = 'showuser=' . $row['location_1_id'];
$row['_whereLinkSeo'] = ipsRegistry::getClass('output')->buildSEOUrl( $row['where_link'], 'public', $names[ $row['location_1_id'] ]['members_seo_name'], 'showuser' );
}
}
}
$final[ $row['id'] ] = $row;
}
return $final;
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Core extensions
* Last Updated: $Date: 2010-09-15 19:24:12 -0400 (Wed, 15 Sep 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 20th February 2002
* @version $Rev: 6882 $
*
*/
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 publicSessions__members
{
/**
* Return session variables for this application
*
* 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
*/
public function getSessionVariables()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$array = array( 'location_1_type' => '',
'location_1_id' => 0,
'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' )
{
$array['location_1_type'] = 'profile';
$array['location_1_id'] = ipsRegistry::$request['id'];
}
return $array;
}
/**
* 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
*/
public function parseOnlineEntries( $rows )
{
if( !is_array($rows) OR !count($rows) )
{
return $rows;
}
$final = array();
$profiles = array();
$names = array();
//-----------------------------------------
// Extract the topic/forum data
//-----------------------------------------
foreach( $rows as $row )
{
if( $row['current_appcomponent'] != 'members' OR !$row['current_module'] )
{
continue;
}
if( $row['current_module'] == 'profile' )
{
$profiles[] = $row['location_1_id'];
}
}
if( count($profiles) )
{
ipsRegistry::DB()->build( array( 'select' => 'member_id, members_display_name, members_seo_name', 'from' => 'members', 'where' => 'member_id IN(' . implode( ',', $profiles ) . ')' ) );
$pr = ipsRegistry::DB()->execute();
while( $r = ipsRegistry::DB()->fetch($pr) )
{
$names[ $r['member_id'] ] = array( 'members_display_name' => $r['members_display_name'], 'members_seo_name' => $r['members_seo_name'] );
}
}
foreach( $rows as $row )
{
if( $row['current_appcomponent'] == 'members' )
{
if( $row['current_module'] == 'online' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_online'];
}
if( $row['current_module'] == 'list' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_members'];
}
if( $row['current_module'] == 'messaging' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_msg'];
}
if( $row['current_module'] == 'profile' )
{
if ( isset( $names[ $row['location_1_id'] ] ) )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_profile'];
$row['where_line_more'] = $names[ $row['location_1_id'] ]['members_display_name'];
$row['where_link'] = 'showuser=' . $row['location_1_id'];
$row['_whereLinkSeo'] = ipsRegistry::getClass('output')->buildSEOUrl( $row['where_link'], 'public', $names[ $row['location_1_id'] ]['members_seo_name'], 'showuser' );
}
}
}
$final[ $row['id'] ] = $row;
}
return $final;
}
}
@@ -1,18 +1,20 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Core variables extension file
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
* Last Updated: $Date: 2010-09-22 11:32:51 -0400 (Wed, 22 Sep 2010) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @link http://www.invisionpower.com
* @since 1st march 2002
* @version $Revision: 4948 $
* @version $Revision: 6904 $
*
*/
@@ -22,7 +24,16 @@ if ( ! defined( 'IN_IPB' ) )
exit();
}
$_LOAD = array();
$_LOAD = array();
$_RESET = array();
/* No default module? Reset to member list */
if ( !isset($_REQUEST['module']) )
{
$_RESET['module'] = 'list';
// Load properly the caches too
$_GET['module'] = 'list';
}
# PERSONAL MESSAGES
if( ( isset( $_GET['module'] ) && $_GET['module'] == 'messaging' ) )
@@ -37,7 +48,7 @@ if( ( isset( $_GET['module'] ) && $_GET['module'] == 'messaging' ) )
}
# MEMBER LIST
if( ( isset( $_GET['section'] ) && $_GET['section'] == 'view' ) && ( isset( $_GET['module'] ) && $_GET['module'] == 'list' ) )
if( isset( $_GET['module'] ) && $_GET['module'] == 'list' )
{
$_LOAD['ranks'] = 1;
$_LOAD['profilefields'] = 1;
@@ -54,6 +65,16 @@ if( isset( $_GET['module'] ) && $_GET['module'] == 'online' )
// we should load this on the assumption it'll be needed anyways
}
# Status updates
if( isset( $_GET['section'] ) && $_GET['section'] == 'status' )
{
$_LOAD['ranks'] = 1;
$_LOAD['profilefields'] = 1;
$_LOAD['reputation_levels'] = 1;
$_LOAD['moderators'] = 1; // This is need for forums application - as there are usually people browsing topics,
// we should load this on the assumption it'll be needed anyways
}
# PROFILE
if ( ( isset( $_GET['showuser'] ) && $_GET['showuser'] ) OR $_GET['module'] == 'profile' AND $_GET['section'] == 'view' )
{
@@ -0,0 +1,70 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Dashboard Notifications
* Last Updated: $Date
*
* @author $Author: mark $
* @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
* @version $Rev: 6688 $
*
*/
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();
}
/**
* Main loader class
*/
class dashboardNotifications__members
{
public function __construct()
{
$this->settings = ipsRegistry::fetchSettings();
$this->lang = ipsRegistry::getClass( 'class_localization' );
$this->DB = ipsRegistry::DB();
}
public function get()
{
/* INIT */
$entries = array();
if ( $this->settings['reg_auth_type'] == 'admin_user' or $this->settings['reg_auth_type'] == 'admin' )
{
if( $this->settings['reg_auth_type'] == 'admin' )
{
$where = " new_reg=1";
}
else
{
$where = "new_reg=1 AND 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}",
'add_join' => array(
array( 'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=v.member_id',
'type' => 'left' ) ) ) );
$count = $count['count'];
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&section=members&section=tools&do=validating', 'admin' ) . '">' . $this->lang->words['cp_validations_review'] . '</a>' );
}
}
return $entries;
}
}
@@ -0,0 +1,34 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Define data hook locations (Members)
* Last Updated: $Date: 2010-10-12 13:04:59 -0400 (Tue, 12 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 Core
* @link http://www.invisionpower.com
* @version $Rev: 6964 $
*/
$dataHookLocations = array(
/* MESSENGER DATA LOCATIONS */
array( 'messengerSendReplyData', 'Messenger: Reply data'),
array( 'messengerSendTopicData', 'Messenger: New conversation, topic data' ),
array( 'messengerSendTopicFirstPostData', 'Messenger: New conversation, first post' ),
/* PROFILE DATA LOCATIONS */
array( 'profileCommentNew', 'Profile: New comment' ),
array( 'profileFriendsNew', 'Profile: New friend' ),
/* OUTPUT ARRAYS */
array( 'memberListData', 'Member List View Output' ),
array( 'onlineUsersListData', 'Online Users List Output' ),
);
@@ -1,37 +1,39 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* BBCode Management : Determines if bbcode can be used in this section
* Last Updated: $LastChangedDate: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 27th January 2004
* @version $Rev: 4948 $
*
*/
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();
}
/*
* An array of key => value pairs
* When going to parse, the key should be passed to the editor
* to determine which bbcodes should be parsed in the section
*
*/
$BBCODE = array(
'signatures' => ipsRegistry::getClass('class_localization')->words['ctype__signatures'],
'aboutme' => ipsRegistry::getClass('class_localization')->words['ctype__aboutme'],
'pms' => ipsRegistry::getClass('class_localization')->words['ctype__pms'],
'warn' => ipsRegistry::getClass('class_localization')->words['ctype__warn'],
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* 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) $
* </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 27th January 2004
* @version $Rev: 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();
}
/*
* An array of key => value pairs
* When going to parse, the key should be passed to the editor
* to determine which bbcodes should be parsed in the section
*
*/
$BBCODE = array(
'signatures' => ipsRegistry::getClass('class_localization')->words['ctype__signatures'],
'aboutme' => ipsRegistry::getClass('class_localization')->words['ctype__aboutme'],
'pms' => ipsRegistry::getClass('class_localization')->words['ctype__pms'],
'warn' => ipsRegistry::getClass('class_localization')->words['ctype__warn'],
);
@@ -1,46 +1,74 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.1
* Sets up SEO templates
* Last Updated: $Date: 2009-03-04 15:08:31 +0000 (Wed, 04 Mar 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 4136 $
*
*/
/**
* SEO templates
*
* 'allowRedirect' is a flag to tell IP.Board whether to check the incoming link and if not formatted correctly, redirect the correct one
*
* OUT FORMAT REGEX:
* First array element is a regex to run to see if we've a match for the URL
* The second array element is the template to use the results of the parenthesis capture
*
* Special variable #{__title__} is replaced with the $title data passed to output->formatUrl( $url, $title)
*
* IMPORTANT: Remember that when these regex are used, the output has not been fully parsed so you will get:
* showuser={$data['member_id']} NOT showuser=1 so do not try and match numerics only!
*
* IN FORMAT REGEX
*
* This allows the registry to piece back together a URL based on the template regex
* So, for example: "/user/(\d+?)/", 'matches' => array( array( 'showuser' => '$1' ) )tells IP.Board to populate 'showuser' with the result
* of the parenthesis capture #1
*/
$_SEOTEMPLATES = array(
'showuser' => array( 'app' => 'members',
'allowRedirect' => 1,
'out' => array( '#showuser=(.+?)(&|$)#i', 'user/$1/$2' ),
'in' => array( 'regex' => "#/user/(\d+)/#i",
'matches' => array( array( 'showuser', '$1' ) ) ) ),
);
<?php
/**
* Invision Power Services
* IP.Board v3.0.1
* Sets up SEO templates
* Last Updated: $Date: 2009-03-04 15:08:31 +0000 (Wed, 04 Mar 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 4136 $
*
*/
/**
* SEO templates
*
* 'allowRedirect' is a flag to tell IP.Board whether to check the incoming link and if not formatted correctly, redirect the correct one
*
* OUT FORMAT REGEX:
* First array element is a regex to run to see if we've a match for the URL
* The second array element is the template to use the results of the parenthesis capture
*
* Special variable #{__title__} is replaced with the $title data passed to output->formatUrl( $url, $title)
*
* IMPORTANT: Remember that when these regex are used, the output has not been fully parsed so you will get:
* showuser={$data['member_id']} NOT showuser=1 so do not try and match numerics only!
*
* IN FORMAT REGEX
*
* This allows the registry to piece back together a URL based on the template regex
* So, for example: "/user/(\d+?)/", 'matches' => array( array( 'showuser' => '$1' ) )tells IP.Board to populate 'showuser' with the result
* of the parenthesis capture #1
*/
$_SEOTEMPLATES = array(
'showuser' => array( 'app' => 'members',
'allowRedirect' => 1,
'out' => array( '#showuser=(.+?)(&|$)#i', 'user/$1/$2' ),
'in' => array( 'regex' => "#/user/(\d+)/?#i",
'matches' => array( array( 'showuser', '$1' ) ) ) ),
'members_status_friends'=> array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status(?:&|&amp;)type=friends(&|$)#i', 'statuses/friends/$2' ),
'in' => array( 'regex' => "#/statuses/friends#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ),
array( 'type' , 'friends' ) ) ) ),
'members_status_all' => array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status((?:&|&amp;)type=all)?(&|$)#i', 'statuses/all/$2' ),
'in' => array( 'regex' => "#/statuses/all#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ) ) ) ),
'members_list' => array(
'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members((&|&amp;)module=list)?#i', 'members/' ),
'in' => array(
'regex' => "#/members(/|$|\?)#i",
'matches' => array( array( 'app', 'members' ),
array( 'module', 'list' ) )
)
),
);
@@ -1,139 +1,141 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* RSS output plugin :: posts
* Last Updated: $Date: 2009-01-05 22:21:54 +0000 (Mon, 05 Jan 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Forums
* @link http://www.iinvisionpower.com
* @since 6/24/2008
* @version $Revision: 3572 $
*/
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 furlRedirect_members
{
/**
* Key type: Type of action (topic/forum)
*
* @access private
* @var string
*/
private $_type = '';
/**
* Key ID
*
* @access private
* @var int
*/
private $_id = 0;
/**
* Constructor
*
*/
function __construct( ipsRegistry $registry )
{
$this->registry = $registry;
$this->DB = $registry->DB();
$this->settings =& $registry->fetchSettings();
}
/**
* Set the key ID
* @example furlRedirect_forums::setKey( 'topic', 12 );
*
* @access public
* @param string Type
* @param mixed Value
*/
public function setKey( $name, $value )
{
$this->_type = $name;
$this->_id = $value;
}
/**
* Set up the key by URI
*
* @access public
* @param string URI (example: index.php?showtopic=5&view=getlastpost)
* @return void
*/
public function setKeyByUri( $uri )
{
$uri = str_replace( '&amp;', '&', $uri );
if ( strstr( $uri, '?' ) )
{
list( $_chaff, $uri ) = explode( '?', $uri );
}
foreach( explode( '&', $uri ) as $bits )
{
list( $k, $v ) = explode( '=', $bits );
if ( $k )
{
if ( $k == 'showuser' )
{
$this->setKey( 'user', intval( $v ) );
return TRUE;
}
}
}
return FALSE;
}
/**
* Return the SEO title
*
* @access public
* @return string The SEO friendly name
*/
public function fetchSeoTitle()
{
switch ( $this->_type )
{
default:
return FALSE;
break;
case 'user':
return $this->_fetchSeoTitle_user();
break;
}
}
/**
* Return the SEO title for a user
*
* @access public
* @return string The SEO friendly name
*/
public function _fetchSeoTitle_user()
{
$member = IPSMember::load( intval( $this->_id ), 'core' );
if ( $member['member_id'] )
{
if ( IPB_USE_ONLY_ID_FURL ) return $member['member_id'];
return ( $member['members_seo_name'] ) ? $member['members_seo_name'] : IPSText::makeSeoTitle( $member['members_display_name'] );
}
return FALSE;
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* RSS output plugin :: posts
* 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 Forums
* @link http://www.invisionpower.com
* @since 6/24/2008
* @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();
}
class furlRedirect_members
{
/**
* Key type: Type of action (topic/forum)
*
* @access private
* @var string
*/
private $_type = '';
/**
* Key ID
*
* @access private
* @var int
*/
private $_id = 0;
/**
* Constructor
*
*/
function __construct( ipsRegistry $registry )
{
$this->registry = $registry;
$this->DB = $registry->DB();
$this->settings =& $registry->fetchSettings();
}
/**
* Set the key ID
* <code>furlRedirect_forums::setKey( 'topic', 12 );</code>
*
* @access public
* @param string Type
* @param mixed Value
*/
public function setKey( $name, $value )
{
$this->_type = $name;
$this->_id = $value;
}
/**
* Set up the key by URI
*
* @access public
* @param string URI (example: index.php?showtopic=5&view=getlastpost)
* @return void
*/
public function setKeyByUri( $uri )
{
$uri = str_replace( '&amp;', '&', $uri );
if ( strstr( $uri, '?' ) )
{
list( $_chaff, $uri ) = explode( '?', $uri );
}
foreach( explode( '&', $uri ) as $bits )
{
list( $k, $v ) = explode( '=', $bits );
if ( $k )
{
if ( $k == 'showuser' )
{
$this->setKey( 'user', intval( $v ) );
return TRUE;
}
}
}
return FALSE;
}
/**
* Return the SEO title
*
* @access public
* @return string The SEO friendly name
*/
public function fetchSeoTitle()
{
switch ( $this->_type )
{
default:
return FALSE;
break;
case 'user':
return $this->_fetchSeoTitle_user();
break;
}
}
/**
* Return the SEO title for a user
*
* @access public
* @return string The SEO friendly name
*/
public function _fetchSeoTitle_user()
{
$member = IPSMember::load( intval( $this->_id ), 'core' );
if ( $member['member_id'] )
{
if ( IPB_USE_ONLY_ID_FURL ) return $member['member_id'];
return ( $member['members_seo_name'] ) ? $member['members_seo_name'] : IPSText::makeSeoTitle( $member['members_display_name'] );
}
return FALSE;
}
}
@@ -1,53 +1,83 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* Sets up SEO templates
* Last Updated: $Date: 2009-03-04 15:08:31 +0000 (Wed, 04 Mar 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @since 20th February 2002
* @version $Rev: 4136 $
*
*/
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();
}
/**
* SEO templates
*
* 'allowRedirect' is a flag to tell IP.Board whether to check the incoming link and if not formatted correctly, redirect the correct one
*
* OUT FORMAT REGEX:
* First array element is a regex to run to see if we've a match for the URL
* The second array element is the template to use the results of the parenthesis capture
*
* Special variable #{__title__} is replaced with the $title data passed to output->formatUrl( $url, $title)
*
* IMPORTANT: Remember that when these regex are used, the output has not been fully parsed so you will get:
* showuser={$data['member_id']} NOT showuser=1 so do not try and match numerics only!
*
* IN FORMAT REGEX
*
* This allows the registry to piece back together a URL based on the template regex
* So, for example: "/user/(\d+?)/", 'matches' => array( array( 'showuser' => '$1' ) )tells IP.Board to populate 'showuser' with the result
* of the parenthesis capture #1
*/
$_SEOTEMPLATES = array(
'showuser' => array( 'app' => 'members',
'allowRedirect' => 1,
'out' => array( '#showuser=(.+?)((?:&|&amp;)f=(.+?))?(&|$)#i', 'user/$1-#{__title__}/$2$4' ),
'in' => array( 'regex' => "#/user/(\d+?)-#i",
'matches' => array( array( 'showuser', '$1' ) ) ) ),
);
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Sets up SEO templates
* Last Updated: $Date: 2010-06-15 03:53:37 -0400 (Tue, 15 Jun 2010) $
* </pre>
*
* @author $Author: matt $
* @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 $Rev: 6531 $
*
*/
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();
}
/**
* SEO templates
*
* 'allowRedirect' is a flag to tell IP.Board whether to check the incoming link and if not formatted correctly, redirect the correct one
*
* OUT FORMAT REGEX:
* First array element is a regex to run to see if we've a match for the URL
* The second array element is the template to use the results of the parenthesis capture
*
* Special variable #{__title__} is replaced with the $title data passed to output->formatUrl( $url, $title)
*
* IMPORTANT: Remember that when these regex are used, the output has not been fully parsed so you will get:
* showuser={$data['member_id']} NOT showuser=1 so do not try and match numerics only!
*
* IN FORMAT REGEX
*
* This allows the registry to piece back together a URL based on the template regex
* So, for example: "/user/(\d+?)/", 'matches' => array( array( 'showuser' => '$1' ) )tells IP.Board to populate 'showuser' with the result
* of the parenthesis capture #1
*/
$_SEOTEMPLATES = array(
'showuser' => array( 'app' => 'members',
'allowRedirect' => 1,
'out' => array( '#showuser=(.+?)((?:&|&amp;)f=(.+?))?(&|$)#i', 'user/$1-#{__title__}/$2$4' ),
'in' => array( 'regex' => "#/user/(\d+?)-#i",
'matches' => array( array( 'showuser', '$1' ) ) ) ),
'members_status_friends'=> array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status(?:&|&amp;)type=friends(&|$)#i', 'statuses/friends/$2' ),
'in' => array( 'regex' => "#/statuses/friends#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ),
array( 'type' , 'friends' ) ) ) ),
'members_status_all' => array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status((?:&|&amp;)type=all)?(&|$)#i', 'statuses/all/$2' ),
'in' => array( 'regex' => "#/statuses/all#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ) ) ) ),
'members_list' => array(
'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members((&|&amp;)module=list)?#i', 'members/' ),
'in' => array(
'regex' => "#/members(/|$|\?)#i",
'matches' => array( array( 'app', 'members' ),
array( 'module', 'list' ) )
)
),
);
@@ -1 +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.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; 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.invisionboard.com/">IP.Board</a>
</body>
</html>
@@ -0,0 +1,106 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Forum permissions mappings
* Last Updated: $Date: 2010-04-26 19:40:44 +0100 (Mon, 26 Apr 2010) $
* </pre>
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @version $Rev: 6179 $
**/
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();
}
/**
* Member Synchronization extensions
*
* @author $author$
* @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
* @version $Rev: 6179 $
**/
class membersMemberSync
{
/**
* Registry reference
*
* @access public
* @var object
*/
public $registry;
/**
* CONSTRUCTOR
*
* @access public
* @return void
**/
public function __construct()
{
$this->registry = ipsRegistry::instance();
}
/**
* This method is run when a member is flagged as a spammer
*
* @access public
* @param array $member Array of member data
* @return void
**/
public function onSetAsSpammer( $member )
{
/* Load status class */
if ( ! $this->registry->isClassLoaded( 'memberStatus' ) )
{
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/member/status.php', 'memberStatus' );
$this->registry->setClass( 'memberStatus', new $classToLoad( ipsRegistry::instance() ) );
}
/* Delete the stuff */
$this->registry->getClass('memberStatus')->setAuthor( $member );
$this->registry->getClass('memberStatus')->deleteAllReplies();
$this->registry->getClass('memberStatus')->deleteAllMemberStatus();
}
/**
* This method is run when a member is un-flagged as a spammer
*
* @access public
* @param array $member Array of member data
* @return void
**/
public function onUnSetAsSpammer( $member )
{
}
/**
* This method is called after a member account has been removed
*
* @access public
* @param string $ids SQL IN() clause
* @return 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 */
ipsRegistry::DB()->delete( 'member_status_updates', "status_member_id" . $mids );
ipsRegistry::DB()->delete( 'member_status_actions', "action_member_id" . $mids );
ipsRegistry::DB()->delete( 'member_status_replies', "reply_member_id" . $mids );
}
}
@@ -0,0 +1,56 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Define the core notification types
* Last Updated: $Date: 2010-04-16 21:25:51 -0400 (Fri, 16 Apr 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 Forums
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 6142 $
*
*/
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();
}
/**
* Notification types
*/
class members_notifications
{
public function getConfiguration()
{
/**
* 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' => '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' ),
);
return $_NOTIFY;
}
}
@@ -1 +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.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; 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.invisionboard.com/">IP.Board</a>
</body>
</html>
@@ -1,19 +1,21 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Portal plugin: online users
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
* 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.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @link http://www.invisionpower.com
* @since 1st march 2002
* @version $Revision: 4948 $
* @version $Revision: 5713 $
*
*/
@@ -1,20 +1,20 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.0.5
* IP.Board v3.1.4
* Portal plugin: online users
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
* Last Updated: $Date: 2010-10-21 07:08:38 -0400 (Thu, 21 Oct 2010) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @link http://www.invisionpower.com
* @since 1st march 2002
* @version $Revision: 3887 $
*
* @version $Revision: 7007 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -28,7 +28,6 @@ class ppi_online_users extends public_portal_portal_portal
/**
* Initialize module
*
* @access public
* @return void
*/
public function init()
@@ -38,7 +37,6 @@ class ppi_online_users extends public_portal_portal_portal
/**
* Show the online users
*
* @access public
* @return string HTML content to replace tag with
*/
public function online_users_show()
@@ -47,8 +45,8 @@ class ppi_online_users extends public_portal_portal_portal
// Get the users from the DB
//-----------------------------------------
require_once( IPSLib::getAppDir( 'forums', 'forums' ) . '/boards.php' );
$boards = new public_forums_forums_boards();
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums', 'forums' ) . '/boards.php', 'public_forums_forums_boards' );
$boards = new $classToLoad();
$boards->makeRegistryShortcuts( $this->registry );
$active = $boards->getActiveUserDetails();
@@ -57,5 +55,4 @@ class ppi_online_users extends public_portal_portal_portal
return $this->registry->getClass('output')->getTemplate('portal')->onlineUsers( $active );
}
}
@@ -0,0 +1,50 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* 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
* @package IP.Board
* @subpackage Members
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 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();
}
/**
* Plug in name (Default tab name)
*/
$CONFIG['plugin_name'] = 'About Me';
/**
* Language string for the tab
*/
$CONFIG['plugin_lang_bit'] = 'pp_tab_aboutme';
/**
* Plug in key (must be the same as the main {file}.php name
*/
$CONFIG['plugin_key'] = 'aboutme';
/**
* Show tab?
*/
$CONFIG['plugin_enabled'] = 1;
/**
* Order
*/
$CONFIG['plugin_order'] = 2;
@@ -0,0 +1,96 @@
<?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,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; 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.invisionboard.com/">IP.Board</a>
</body>
</html>
@@ -0,0 +1,50 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* 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
* @package IP.Board
* @subpackage Members
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 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();
}
/**
* Plug in name (Default tab name)
*/
$CONFIG['plugin_name'] = 'Recent Status Updates';
/**
* Language string for the tab
*/
$CONFIG['plugin_lang_bit'] = 'pp_tab_statusupdates';
/**
* Plug in key (must be the same as the main {file}.php name
*/
$CONFIG['plugin_key'] = 'status';
/**
* Show tab?
*/
$CONFIG['plugin_enabled'] = intval( ipsRegistry::$settings['su_enabled'] );
/**
* Order
*/
$CONFIG['plugin_order'] = 1;
@@ -0,0 +1,65 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Profile Plugin Library
* Last Updated: $Date: 2010-07-15 21:31:17 -0400 (Thu, 15 Jul 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 20th February 2002
* @version $Revision: 6661 $
*
*/
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_status extends profile_plugin_parent
{
/**
* Feturn HTML block
*
* @access public
* @param array Member information
* @return string HTML block
*/
public function return_html_block( $member=array() )
{
if ( ! is_array( $member ) OR ! count( $member ) )
{
return $this->registry->getClass('output')->getTemplate('profile')->tabNoContent( 'err_no_status_to_show' );
}
/* Load status class */
if ( ! $this->registry->isClassLoaded( 'memberStatus' ) )
{
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/member/status.php', 'memberStatus' );
$this->registry->setClass( 'memberStatus', new $classToLoad( ipsRegistry::instance() ) );
}
/* 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 );
/* Replace Macros and return */
$content = $this->registry->output->replaceMacros( $content );
return $content ? $content : $this->registry->getClass('output')->getTemplate('profile')->tabNoContent( 'err_no_status_to_show' );
}
}
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; 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.invisionboard.com/">IP.Board</a>
</body>
</html>
@@ -0,0 +1,408 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Report Center :: Private Messages plugin
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
* </pre>
*
* @author $Author: bfarber $
* @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
* @package IP.Board
* @subpackage Members
* @link http://www.invisionpower.com
* @version $Rev: 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 'admin.php'.";
exit();
}
class messages_plugin
{
/**#@+
* Registry objects
*
* @access protected
* @var object
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $cache;
/**#@-*/
/**
* Holds extra data for the plugin
*
* @access private
* @var array Data specific to the plugin
*/
public $_extra;
/**
* Constructor
*
* @access public
* @param object Registry object
* @return void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// Make object
//-----------------------------------------
$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;
}
/**
* 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
*/
public function displayAdminForm( $plugin_data, &$html )
{
$req_input = '';
$return = '';
if( is_array($plugin_data['required_input']) && count($plugin_data['required_input']) > 0 )
{
foreach( $plugin_data['required_input'] as $key => $value )
{
if( $req_input != '' )
{
$req_input .= "\r\n";
}
$req_input .= $key . ' ' . $value;
}
}
foreach( $this->cache->getCache('group_cache') as $g )
{
$groups[] = array( $g['g_id'], $g['g_title'] );
}
$return .= $html->addRow( $this->lang->words['r_messages_enter'],
$this->lang->words['r_menter_desc'],
$this->registry->output->formMultiDropdown('plugi_messages_add[]', $groups, explode( ',', $plugin_data['plugi_messages_add'] ) )
);
return $return;
}
/**
* Process the plugin's form fields for saving
*
* @access public
* @param array Plugin data for save
* @return string Error message
*/
public function processAdminForm( &$save_data_array )
{
$save_data_array['plugi_messages_add'] = ( is_array($this->request['plugi_messages_add']) AND count($this->request['plugi_messages_add']) ) ? implode( ',', $this->request['plugi_messages_add'] ) : '';
return '';
}
/**
* Update timestamp for report
*
* @access public
* @param array New reports
* @param array New members cache
* @return boolean
*/
public function updateReportsTimestamp( $new_reports, &$new_members_cache )
{
return true;
}
/**
* Get report permissions
*
* @access public
* @param string Type of perms to check
* @param array Permissions data
* @param array group ids
* @param string Special permissions
* @return boolean
*/
public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return )
{
if( $this->_extra['report_bypass'] == 0 || $this->memberData['g_is_supmod'] == 1 )
{
return true;
}
else
{
return false;
}
}
/**
* Show the report form for this module
*
* @access public
* @param array Application data
* @return string HTML form information
*/
public function reportForm( $com_dat )
{
$this->registry->class_localization->loadLanguageFile( array( 'public_messaging' ), 'members' );
$msg = intval($this->request['topicID']);
if( ! $msg )
{
$this->registry->output->showError( 'reports_no_msg', 10166 );
}
//-----------------------------------------
// Check user can access PM
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
$_messengerLib = new $classToLoad( $this->registry );
if( !$_messengerLib->canAccessTopic( $this->memberData['member_id'], $msg ) )
{
$this->registry->output->showError( 'reports_no_msg', 1016666 );
}
$message = $this->DB->buildAndFetch( array(
'select' => 'mt_title',
'from' => 'message_topics',
'where' => 'mt_id=' . intval($msg)
) );
$ex_form_data = array(
'topic' => $msg,
'msg' => intval($this->request['msg']),
'st' => intval($this->request['st']),
'ctyp' => 'message',
'title' => $message['mt_title']
);
$this->registry->output->setTitle( $this->lang->words['report_msg_page'] );
$this->registry->output->addNavigation( $this->lang->words['t_welcome'], "app=members&amp;module=messaging" );
$this->registry->output->addNavigation( $this->lang->words['report_msg_page'], '' );
$this->lang->words['report_basic_title'] = $this->lang->words['report_msg_title'];
$this->lang->words['report_basic_url_title'] = $this->lang->words['report_msg_title'];
$this->lang->words['report_basic_enter'] = $this->lang->words['report_msg_msg'];
$url = $this->settings['base_url'] . "app=members&amp;module=messaging&amp;section=view&amp;do=showConversation&amp;topicID=" . $ex_form_data['topic'] . "&amp;st=" . $ex_form_data['st'] . "#msg" . $ex_form_data['msg'];
return $this->registry->getClass('reportLibrary')->showReportForm( $message['mt_title'], $url, $ex_form_data );
}
/**
* Get section and link
*
* @access public
* @param array Report data
* @return array Section/link
*/
public function giveSectionLinkTitle( $report_row )
{
return array(
'title' => $this->lang->words['report_section_title_msg'],
'url' => "/index.php?app=core&amp;module=reports&amp;section=reports&amp;do=showMessage&amp;topicID={$report_row['exdat1']}&amp;st={$report_row['exdat3']}&amp;msg={$report_row['exdat2']}",
);
}
/**
* Process a report and save the data appropriate
*
* @access public
* @param array Report data
* @return array Data from saving the report
*/
public function processReport( $com_dat )
{
$topic = $this->request['topic'];
$msg = $this->request['msg'];
$st = $this->request['st'];
$url = 'app=members&module=messaging&section=view&do=showConversation&topicID=' . $topic;
if( $msg < 1 )
{
$this->registry->output->showError( 'reports_no_msg', 10167 );
}
$return_data = array();
$a_url = str_replace("&", "&amp;", $url);
$uid = md5( 'msg_' . $msg . '_' . $com_dat['com_id'] );
$status = array();
$this->DB->build( array( 'select' => 'status, is_new, is_complete',
'from' => 'rc_status',
'where' => "is_new=1 OR is_complete=1",
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
if( $row['is_new'] == 1 )
{
$status['new'] = $row['status'];
}
elseif( $row['is_complete'] == 1 )
{
$status['complete'] = $row['status'];
}
}
$this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) );
$this->DB->execute();
if( $this->DB->getTotalRows() == 0 )
{
$built_report_main = array(
'uid' => $uid,
'title' => $this->request['title'],
'status' => $status['new'],
'url' => '/index.php?' . $a_url,
'rc_class' => $com_dat['com_id'],
'updated_by' => $this->memberData['member_id'],
'date_updated' => time(),
'date_created' => time(),
'exdat1' => $topic,
'exdat2' => $msg,
'exdat3' => $st,
);
$this->DB->insert( 'rc_reports_index', $built_report_main );
$rid = $this->DB->getInsertId();
}
else
{
$the_report = $this->DB->fetch();
$rid = $the_report['id'];
$this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "id='{$rid}'" );
}
$data = $this->DB->buildAndFetch( array(
'select' => 't.mt_title',
'from' => array( 'message_topics' => 't' ),
'where' => 't.mt_id=' . $topic . ' AND m.msg_id=' . $msg,
'add_join' => array(
array(
'select' => 'm.msg_post',
'from' => array( 'message_posts' => 'm' ),
'where' => 't.mt_id=m.msg_topic_id',
'type' => 'left',
),
array(
'select' => 'mem.member_id, mem.members_display_name',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_id=m.msg_author_id',
'type' => 'left',
),
)
) );
$message = "[quote name='" . IPSText::getTextClass('bbcode')->makeQuoteSafe( $data['members_display_name'] ) . "']";
$message .= $data['msg_post'];
$message .= "[/quote]\n\n";
$message .= $this->request['message'];
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parse_html = 0;
IPSText::getTextClass('bbcode')->parse_emoticons = 1;
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'reports';
$build_report = array(
'rid' => $rid,
'report' => IPSText::getTextClass('bbcode')->preDbParse( $message ),
'report_by' => $this->memberData['member_id'],
'date_reported' => time(),
);
$this->DB->insert( 'rc_reports', $build_report );
$reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) );
$this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" );
$return_data = array(
'REDIRECT_URL' => "app=members&amp;module=messaging&amp;section=view&amp;do=showConversation&amp;topicID=" . $topic . "&amp;st=" . $st . "#msg" . $msg,
'REPORT_INDEX' => $rid,
'SAVED_URL' => '/index.php?' . $url,
'REPORT' => $build_report['report']
);
return $return_data;
}
/**
* Where to send user after report is submitted
*
* @access public
* @param array Report data
* @return void
*/
public function reportRedirect( $report_data )
{
$this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'] );
}
/**
* 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
*/
public function getNotificationList( $group_ids, $report_data )
{
$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',
)
)
) );
$this->DB->execute();
if( $this->DB->getTotalRows() > 0 )
{
while( $row = $this->DB->fetch() )
{
$notify[] = $row;
}
}
return $notify;
}
}
@@ -0,0 +1,354 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Report Center :: Profiles plugin
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
* </pre>
*
* @author $Author: bfarber $
* @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
* @package IP.Board
* @subpackage Members
* @link http://www.invisionpower.com
* @version $Rev: 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 'admin.php'.";
exit();
}
class profiles_plugin
{
/**#@+
* Registry objects
*
* @access protected
* @var object
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $cache;
/**#@-*/
/**
* Holds extra data for the plugin
*
* @access private
* @var array Data specific to the plugin
*/
public $_extra;
/**
* Constructor
*
* @access public
* @param object Registry object
* @return void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// Make object
//-----------------------------------------
$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;
}
/**
* 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
*/
public function displayAdminForm( $plugin_data, &$html )
{
$return = '';
return $return;
}
/**
* Process the plugin's form fields for saving
*
* @access public
* @param array Plugin data for save
* @return string Error message
*/
public function processAdminForm( &$save_data_array )
{
return '';
}
/**
* Update timestamp for report
*
* @access public
* @param array New reports
* @param array New members cache
* @return boolean
*/
public function updateReportsTimestamp( $new_reports, &$new_members_cache )
{
return true;
}
/**
* 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
* @param string Special permissions
* @return boolean
*/
public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return )
{
if( $this->_extra['report_bypass'] == 0 || $this->memberData['g_is_supmod'] == 1 )
{
return true;
}
else
{
return false;
}
}
/**
* Show the report form for this module
*
* @access public
* @param array Application data
* @return string HTML form information
*/
public function reportForm( $com_dat )
{
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
$mem = intval($this->request['member_id']);
if( ! $mem )
{
$this->registry->output->showError( 'reports_no_member', 10175 );
}
$member = IPSMember::load( $mem );
$ex_form_data = array(
'member_id' => $mem,
'ctyp' => 'profile',
'title' => $member['members_display_name']
);
$this->registry->output->setTitle( $this->lang->words['report_mem_page'] );
$this->registry->output->addNavigation( $member['members_display_name'], "showuser=" . $member['member_id'] );
$this->registry->output->addNavigation( $this->lang->words['report_mem_page'], '' );
$this->lang->words['report_basic_title'] = $this->lang->words['report_mem_page'];
$this->lang->words['report_basic_url_title'] = $this->lang->words['report_mem_page'];
$this->lang->words['report_basic_enter'] = $this->lang->words['report_mem_msg'];
$url = $this->registry->getClass('output')->buildSEOUrl( "showuser=" . $ex_form_data['member_id'], 'public', $member['members_seo_name'], 'showuser' );
return $this->registry->getClass('reportLibrary')->showReportForm( $member['members_display_name'], $url, $ex_form_data );
}
/**
* Get section and link
*
* @access public
* @param array Report data
* @return array Section/link
*/
public function giveSectionLinkTitle( $report_row )
{
return array(
'title' => $this->lang->words['report_section_title_mem'],
'url' => "/index.php?showuser={$report_row['exdat1']}",
'seo_template' => "showuser",
'seo_title' => $report_row['seoname'],
);
}
/**
* Process a report and save the data appropriate
*
* @access public
* @param array Report data
* @return array Data from saving the report
*/
public function processReport( $com_dat )
{
$mem = $this->request['member_id'];
$url = 'showuser=' . $mem;
if( $mem < 1 )
{
$this->registry->output->showError( 'reports_no_member', 10176 );
}
$return_data = array();
$a_url = str_replace("&", "&amp;", $url);
$uid = md5( 'mem_' . $mem . '_' . $com_dat['com_id'] );
$status = array();
$this->DB->build( array( 'select' => 'status, is_new, is_complete',
'from' => 'rc_status',
'where' => "is_new=1 OR is_complete=1",
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
if( $row['is_new'] == 1 )
{
$status['new'] = $row['status'];
}
elseif( $row['is_complete'] == 1 )
{
$status['complete'] = $row['status'];
}
}
$data = IPSMember::load( $this->request['member_id'] );
$this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) );
$this->DB->execute();
if( $this->DB->getTotalRows() == 0 )
{
$built_report_main = array(
'uid' => $uid,
'title' => $this->request['title'],
'status' => $status['new'],
'url' => '/index.php?' . $a_url,
'seoname' => $data['members_seo_name'],
'seotemplate' => 'showuser',
'rc_class' => $com_dat['com_id'],
'updated_by' => $this->memberData['member_id'],
'date_updated' => time(),
'date_created' => time(),
'exdat1' => $mem,
'exdat2' => 0,
'exdat3' => 0
);
$this->DB->insert( 'rc_reports_index', $built_report_main );
$rid = $this->DB->getInsertId();
}
else
{
$the_report = $this->DB->fetch();
$rid = $the_report['id'];
$this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'], 'seoname' => $data['members_seo_name'], 'seotemplate' => 'showuser' ), "id='{$rid}'" );
}
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parse_html = 0;
IPSText::getTextClass('bbcode')->parse_emoticons = 1;
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'reports';
$build_report = array(
'rid' => $rid,
'report' => IPSText::getTextClass('bbcode')->preDbParse( $this->request['message'] ),
'report_by' => $this->memberData['member_id'],
'date_reported' => time(),
);
$this->DB->insert( 'rc_reports', $build_report );
$reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) );
$this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" );
$return_data = array(
'REDIRECT_URL' => $a_url,
'REPORT_INDEX' => $rid,
'SAVED_URL' => '/index.php?' . $url,
'REPORT' => $build_report['report'],
'TEMPLATE' => 'showuser',
'SEOTITLE' => $data['members_seo_name'],
);
return $return_data;
}
/**
* Where to send user after report is submitted
*
* @access public
* @param array Report data
* @return void
*/
public function reportRedirect( $report_data )
{
if( $report_data['SEOTITLE'] )
{
$name['members_seo_name'] = $report_data['SEOTITLE'];
}
else
{
$name = $this->DB->buildAndFetch( array( 'select' => 'members_seo_name', 'from' => 'members', 'where' => 'member_id=' . intval($this->request['member_id']) ) );
}
$this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'], $name['members_seo_name'], 'showuser' );
}
/**
* 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
*/
public function getNotificationList( $group_ids, $report_data )
{
$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',
)
)
) );
$this->DB->execute();
if( $this->DB->getTotalRows() > 0 )
{
while( $row = $this->DB->fetch() )
{
$notify[] = $row;
}
}
return $notify;
}
}
@@ -0,0 +1,38 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Config file
* Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $
* </pre>
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @version $Rev: 5855 $
**/
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();
}
/* Can search with this app */
$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;
/* Can fetch user generated content */
$CONFIG['can_userContent'] = 1;
/* Content types, put the default one first */
$CONFIG['contentTypes'] = array( 'members', 'comments' );
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; 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.invisionboard.com/">IP.Board</a>
</body>
</html>
@@ -0,0 +1,428 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Basic Forum Search
* Last Updated: $Date: 2010-02-23 12:38:11 +0000 (Tue, 23 Feb 2010) $
* </pre>
*
* @author $Author: matt $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @version $Rev: 5861 $
*/
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 search_engine_members extends search_engine
{
/**
* Constructor
*/
public function __construct( ipsRegistry $registry )
{
parent::__construct( $registry );
}
/**
* Decide what type of search we're using
*
* @access public
* @return array
*/
public function search()
{
/* 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'] )
{
IPSSearchRegistry::set('members.searchInKey', 'members');
}
if ( IPSSearchRegistry::get('members.searchInKey') AND IPSSearchRegistry::get('members.searchInKey') != 'comments' )
{
return $this->_membersSearch();
}
else
{
return $this->_commentsSearch();
}
}
/**
* Perform a comment search.
* Returns an array of a total count (total number of matches)
* and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search
*
* 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' ) ) ) );
/* 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();
/* Sort */
while ( $_row = $this->DB->fetch() )
{
$rows[ $got ] = $_row;
$got++;
}
/* Return it */
return array( 'count' => $count['total_results'], 'resultSet' => $rows );
}
/**
* Perform a MEMBER search.
* Returns an array of a total count (total number of matches)
* and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search
*
* 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;
if ( IPSSearchRegistry::get('opt.noPostPreview') OR IPSSearchRegistry::get('display.onlyTitles') )
{
$group_by = 'm.member_id';
}
/* Sorting */
switch( $sort_by )
{
default:
case 'date':
$sortKey = ( $content_title_only ) ? 'member_id' : 'member_id';
$sortType = 'numerical';
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 ),
'group' => $group_by,
'add_join' => array( array( 'from' => array( 'profile_portal' => 'p' ),
'where' => "p.pp_member_id=m.member_id",
'type' => 'left' ) ) ) );
/* Fetch data */
$this->DB->build( array('select' => 'm.*',
'from' => array( 'members' => 'm' ),
'where' => $this->_buildWhereStatement( $search_term, $content_title_only ),
'group' => $group_by,
'order' => $sortKey . ' ' . $sort_order,
'limit' => array( IPSSearchRegistry::get('in.start'), IPSSearchRegistry::get('opt.search_per_page') ),
'add_join' => array( array( 'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => "p.pp_member_id=m.member_id",
'type' => 'left' ) ) ) );
$this->DB->execute();
/* Sort */
while ( $_row = $this->DB->fetch() )
{
$rows[ $got ] = $_row;
$got++;
}
/* Return it */
return array( 'count' => $count['total_results'], 'resultSet' => $rows );
}
/**
* 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 _buildCommentsWhereStatement( $search_term, $content_title_only=false )
{
/* INI */
$where_clause = array();
if( $search_term )
{
$where_clause[] = "c.comment_content LIKE '%" . mb_strtolower( $search_term ) . "%'";
}
/* Add in AND where conditions */
if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) )
{
$where_clause = array_merge( $where_clause, $this->whereConditions['AND'] );
}
/* ADD in OR where conditions */
if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) )
{
$where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )';
}
/* 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 );
}
else
{
if( $this->search_begin_timestamp )
{
$where_clause[] = "c.comment_date > {$this->search_begin_timestamp}";
}
if( $this->search_end_timestamp )
{
$where_clause[] = "c.comment_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 )
{
/* INI */
$where_clause = array();
if( $search_term )
{
if( $content_title_only )
{
$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}%'";
}
}
/* Add in AND where conditions */
if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) )
{
$where_clause = array_merge( $where_clause, $this->whereConditions['AND'] );
}
/* ADD in OR where conditions */
if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) )
{
$where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )';
}
/* Date Restrict */
if( $this->search_begin_timestamp && $this->search_end_timestamp )
{
$where_clause[] = $this->DB->buildBetween( "m.joined", $this->search_begin_timestamp, $this->search_end_timestamp );
}
else
{
if( $this->search_begin_timestamp )
{
$where_clause[] = "m.joined > {$this->search_begin_timestamp}";
}
if( $this->search_end_timestamp )
{
$where_clause[] = "m.joined < {$this->search_end_timestamp}";
}
}
/* Build and return the string */
return implode( " AND ", $where_clause );
}
/**
* Remap standard columns (Apps can override )
*
* @access public
* @param string $column sql table column for this condition
* @return string column
* @return void
*/
public function remapColumn( $column )
{
if ( IPSSearchRegistry::get( 'members.searchInKey') == 'comments' )
{
$column = ( $column == 'member_id' ) ? 'c.comment_by_member_id' : '';
}
return $column;
}
/**
* 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();
}
}
@@ -0,0 +1,77 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Returns HTML for the form (optional class, not required)
* Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $
* </pre>
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @version $Rev: 5855 $
**/
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 search_form_members
{
/**
* 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();
}
/**
* Return sort drop down
*
*
* @access public
* @return array
*/
public function fetchSortDropDown()
{
$array = array( 'members' => array( 'date' => $this->lang->words['s_search_type_0'],
'title' => $this->lang->words['forum_sort_title'] ),
'comments' => array( 'date' => $this->lang->words['s_search_sort_creation_date'] ) );
return $array;
}
/**
* Return sort in
* 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'] ) );
return $array;
}
}
@@ -0,0 +1,122 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Formats forum search results
* Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $
* </pre>
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @version $Rev: 5855 $
**/
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 search_format_members extends search_format
{
/**
* Constructor
*/
public function __construct( ipsRegistry $registry )
{
parent::__construct( $registry );
}
/**
* Parse search results
*
* @access private
* @param array $r Search result
* @return array $html Blocks of HTML
*/
public function parseAndFetchHtmlBlocks( $rows )
{
return parent::parseAndFetchHtmlBlocks( $rows );
}
/**
* 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';
return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->$template( $data, IPSSearchRegistry::get('display.onlyTitles') ), 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 )
{
$rows[ $i ] = $this->genericizeResults( $d );
}
return $rows;
}
/**
* Reassigns fields in a generic way for results output
*
* @param array $r
* @return array
**/
public function genericizeResults( $r )
{
if ( IPSSearchRegistry::get('members.searchInKey') AND 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(
'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']
) );
}
return $r;
}
}
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; 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.invisionboard.com/">IP.Board</a>
</body>
</html>
@@ -1,69 +0,0 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* Format member search results
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @version $Rev: 4948 $
**/
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 membersSearchDisplay implements iSearchDisplay
{
/**
* The search plugin for this app
*
* @access public
* @var object
*/
public $search_plugin;
/**
* Formats the member search result for display
*
* @access public
* @param array $search_row Array of data from search_index
* @return string Formatted content, ready for display
*/
public function formatContent( $search_row )
{
$search_row['misc'] = unserialize( $search_row['misc'] );
return ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->memberSearchResult( $search_row, $this->search_plugin->onlyTitles );
}
/**
* Retuns the html for displaying the member filter on the advanced search page
*
* @access public
* @return string
*/
public function getFilterHTML()
{
return '';
}
/**
* Build filter SQL data
*
* @access public
* @param array
* @return array
*/
public function buildFilterSQL( $data )
{
return array();
}
}
@@ -1,425 +0,0 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* Basic Member Search
* Last Updated: $Date: 2009-01-12 16:56:39 -0500 (Mon, 12 Jan 2009) $
*
* @author $Author: josh $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @version $Rev: 3640 $
*/
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 searchMembersPlugin implements iSearchIndexPlugin
{
/**
* Database object
*
* @access private
* @var object
*/
private $DB;
/**
* Date range restriction start
*
* @access private
* @var integer
*/
private $search_begin_timestamp = 0;
/**
* Date range restriction end
*
* @access private
* @var integer
*/
private $search_end_timestamp = 0;
/**
* Array of conditions for this search
*
* @access private
* @var array
*/
private $whereConditions = array();
/**
* Remoe self from search results
*
* @access public
* @var boolean
*/
public $removeSelf = false;
/**
* Only display title
*
* @access public
* @var boolean
*/
public $onlyTitles = false;
/**
* Setup registry objects
*
* @access public
* @param object ipsRegistry $registry
* @return void
*/
public function __construct( ipsRegistry $registry )
{
$this->DB = $registry->DB();
$this->member = $registry->member();
$this->memberData =& $registry->member()->fetchMemberData();
}
/**
* Performs search and returns an array of results
*
* @access public
* @param string $search_term
* @param array $limit_clause The erray should be array( begin, end )
* @param string $sort_by Column to sort by
* @param string $group_by Column to group by
* @param bool $content_title_only Only search title records
* @return array
*/
public function getSearchResults( $search_term, $limit_clause, $sort_by, $group_by='', $content_title_only=false, $sort_order='' )
{
if( $group_by )
{
$group_by = 'm.' . $group_by;
}
/* User prefs */
$order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc';
/* Do the search */
$this->DB->build( array(
'select' => "m.*",
'from' => array( 'members' => 'm' ),
'where' => $this->_buildWhereStatement( $search_term, $content_title_only ),
'limit' => $limit_clause,
'group' => $group_by,
'order' => "m.member_id " . $order_dir, //"m.joined DESC", - m.member_id uses Primary key and avoids filesort
'add_join' => array(
array(
'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => "p.pp_member_id=m.member_id",
'type' => 'left',
),
array(
'from' => array( 'profile_friends' => 'friend' ),
'where' => 'friend.friends_member_id=m.member_id AND friend.friends_friend_id=' . $this->memberData['member_id'],
'type' => 'left',
),
)
) );
$this->DB->execute();
/* Build result array */
$rows = array();
while( $r = $this->DB->fetch() )
{
/* Reassign stuff to match the search_index */
$rows[] = $this->formatFieldsForIndex( $r );
}
return $rows;
}
/**
* Performs live search and returns an array of results
* NOT AVAILABLE IN BASIC SEARCH
*
* @access public
* @param string $search_term
* @return array
*/
public function getLiveSearchResults( $search_term )
{
return array();
}
/**
* Returns the total number of results the search will return
*
* @access public
* @param string $search_term Search term
* @param string $group_by Column to group by
* @param bool $content_title_only Only search title records
* @return integer
*/
public function getSearchCount( $search_term, $group_by='', $content_title_only=false )
{
/* Query the count */
$this->DB->build( array(
'select' => 'COUNT(*) as total_results',
'from' => array( 'members' => 'm' ),
'where' => $this->_buildWhereStatement( $search_term, $content_title_only ),
'group' => $group_by,
'add_join' => array(
array(
'from' => array( 'profile_portal' => 'p' ),
'where' => "p.pp_member_id=m.member_id",
'type' => 'left',
)
)
) );
$this->DB->execute();
$search = $this->DB->fetch();
/* Return the count */
return $search['total_results'];
}
/**
* Restrict the date range that the search is performed on
*
* @access public
* @param int $begin Start timestamp
* @param int [$end] End timestamp
* @return void
*/
public function setDateRange( $begin, $end=0 )
{
$this->search_begin_timestamp = $begin;
$this->search_end_timestamp = $end;
}
/**
* mySQL function for adding special search conditions
*
* @access public
* @param string $column sql table column for this condition
* @param string $operator Operation to perform for this condition, ex: =, <>, IN, NOT IN
* @param mixed $value Value to check with
* @param string $comp Comparison type
* @return void
*/
public function setCondition( $column, $operator, $value, $comp='AND' )
{
if( $column == 'app' OR $column == 'type_id' )
{
return;
}
/* Build the condition based on operator */
switch( strtoupper( $operator ) )
{
case 'IN':
case 'NOT IN':
$this->whereConditions[$comp][] = "m.{$column} {$operator} ( {$value} )";
break;
default:
$this->whereConditions[$comp][] = "m.{$column} {$operator} {$value}";
break;
}
}
/**
* Allows you to specify multiple conditions that are chained together
*
* @access public
* @param array $conditions Array of conditions, each element has 3 keys: column, operator, value, see the setCondition function for information on each
* @param string $inner_comp Comparison operator to use inside the chain
* @param string $outer_comp Comparison operator to use outside the chain
* @return void
*/
public function setMultiConditions( $conditions, $inner_comp='OR', $outer_comp='AND' )
{
/* Loop through the conditions to build the statement */
$_temp = array();
foreach( $conditions as $r )
{
/* REMAP */
if( $r['column'] == 'type_id' )
{
continue;
}
if( $r['column'] == 'app' )
{
continue;
}
switch( strtoupper( $r['operator'] ) )
{
case 'IN':
case 'NOT IN':
$_temp[] = "m.{$r['column']} {$r['operator']} ( {$r['value']} )";
break;
default:
$_temp[] = "m.{$r['column']} {$r['operator']} {$r['value']}";
break;
}
}
$this->whereConditions[$outer_comp][] = '( ' . implode( $_temp, ' ' . $inner_comp . ' ' ) . ' ) ';
}
/**
* Set search conditions for "View unread content"
*
* @access public
* @return void
*/
public function setUnreadConditions()
{
$this->setDateRange( intval( $this->memberData['last_visit'] ), time() );
}
/**
* 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 )
{
/* INI */
$where_clause = array();
if( $search_term )
{
if( $content_title_only )
{
$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.pp_bio_content LIKE '%{$search_term}%' OR p.signature LIKE '%{$search_term}%' OR p.pp_about_me LIKE '%{$search_term}%'";
}
}
/* Add in AND where conditions */
if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) )
{
$where_clause = array_merge( $where_clause, $this->whereConditions['AND'] );
}
/* ADD in OR where conditions */
if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) )
{
$where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )';
}
/* Date Restrict */
if( $this->search_begin_timestamp && $this->search_end_timestamp )
{
$where_clause[] = $this->DB->buildBetween( "m.joined", $this->search_begin_timestamp, $this->search_end_timestamp );
}
else
{
if( $this->search_begin_timestamp )
{
$where_clause[] = "m.joined > {$this->search_begin_timestamp}";
}
if( $this->search_end_timestamp )
{
$where_clause[] = "m.joined < {$this->search_end_timestamp}";
}
}
/* Build and return the string */
return implode( " AND ", $where_clause );
}
/**
* Reassigns fields in a way the index exepcts
*
* @param array $r
* @return array
**/
public function formatFieldsForIndex( $r )
{
$r['app'] = 'members';
$r['content'] = $r['signature'] . ' ' . $r['bio'] . ' ' . $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_bio_content' => $r['pp_bio_content'],
'pp_thumb_photo' => $r['pp_thumb_photo'],
'pp_thumb_width' => $r['pp_thumb_width'],
'pp_thumb_height' => $r['pp_thumb_height']
) );
return $r;
}
/**
* This function grabs the actual results for display
*
* @param array $ids
* @return query result
**/
public function getResultsForSphinx( $ids )
{
$this->DB->build( array(
'select' => "m.*",
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id IN( ' . implode( ',', $ids ) . ')',
'order' => 'm.member_id DESC', //'m.joined DESC',
'add_join' => array(
array(
'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => "p.pp_member_id=m.member_id",
'type' => 'left',
)
)
) );
return $this->DB->execute();
}
/**
* Gets the name of the field this search index uses for dates.... >_<
*
* @return string
**/
public function getDateField()
{
return 'joined';
}
/**
* Gets field names for other conditions
*
* @param string Column
* @return string
**/
public function getConditionField( $column )
{
switch( $column )
{
case 'member_id':
return 'search_id';
break;
}
return $column;
}
}
@@ -1,92 +1,97 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.5
* Sphinx template file
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.iinvisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.iinvisionpower.com
* @version $Rev: 4948 $
* @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
}
index members_search_delta : members_search_main
{
source = members_search_delta
path = <!--SPHINX_BASE_PATH-->/members_search_delta
}
EOF;
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Sphinx template file
* Last Updated: $Date: 2010-06-22 03:39:59 -0400 (Tue, 22 Jun 2010) $
* </pre>
*
* @author $Author: matt $
* @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
* @version $Rev: 6566 $
* @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;
File diff suppressed because it is too large. Load diff