Version 3.3.4
This commit is contained in:
1 parent
78706903a2
commit
fb6b5baabc
2206 files changed
+409828
-382984
No files matched your search
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,127 +1,127 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Member form manipulation
|
||||
* Last Updated: $Date: 2011-03-10 21:04:50 -0500 (Thu, 10 Mar 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 8024 $
|
||||
*
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @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' => '' );
|
||||
*
|
||||
* @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&module=members&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&module=members&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&module=members&do=unsuspend',
|
||||
'title' => ipsRegistry::getClass('class_localization')->words['form_unsuspendmem'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$array[] = array( 'img' => '',
|
||||
'url' => 'section=members&module=members&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&module=members&do=merge',
|
||||
'title' => ipsRegistry::getClass('class_localization')->words['form_mergemember'] );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns content for the page.
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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.3.4
|
||||
* Member form manipulation
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @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' => '' );
|
||||
*
|
||||
* @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&module=members&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&module=members&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&module=members&do=unsuspend',
|
||||
'title' => ipsRegistry::getClass('class_localization')->words['form_unsuspendmem'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$array[] = array( 'img' => '',
|
||||
'url' => 'section=members&module=members&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&module=members&do=merge',
|
||||
'title' => ipsRegistry::getClass('class_localization')->words['form_mergemember'] );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns content for the page.
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @author Brandon Farber
|
||||
* @return array Multi-dimensional array (core, extendedProfile) for saving
|
||||
*/
|
||||
public function getForSave()
|
||||
{
|
||||
return array( 'core' => array(), 'extendedProfile' => array() );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* IP.Board messenger attachments plugin
|
||||
* Last Updated: $Date: 2011-09-20 21:18:18 -0400 (Tue, 20 Sep 2011) $
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 9520 $
|
||||
* @version $Revision: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -139,67 +139,62 @@ class plugin_msg extends class_attach
|
||||
|
||||
if ( is_array( $rel_ids ) and count( $rel_ids ) )
|
||||
{
|
||||
$rel_ids = array_map( 'intval', $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 ) )
|
||||
if( count($query_bits) )
|
||||
{
|
||||
$_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;
|
||||
}
|
||||
}
|
||||
|
||||
$this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module='{$this->module}' AND ( " . implode( ' OR ', $query_bits ) . " )" ) );
|
||||
$attach_sql = $this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// Ok?
|
||||
// Loop through and filter off naughty ids
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $_ok )
|
||||
while( $db_row = $this->DB->fetch( $attach_sql ) )
|
||||
{
|
||||
$rows[ $db_row['attach_id'] ] = $db_row;
|
||||
$_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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
+279
@@ -0,0 +1,279 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Online friends plugin
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Content
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 8752 $
|
||||
* @since 1st March 2009
|
||||
*/
|
||||
|
||||
class plugin_online_friends implements pluginBlockInterface
|
||||
{
|
||||
/**#@+
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $registry;
|
||||
protected $caches;
|
||||
protected $request;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Make shortcuts
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry = $registry;
|
||||
$this->DB = $registry->DB();
|
||||
$this->settings = $registry->fetchSettings();
|
||||
$this->member = $registry->member();
|
||||
$this->cache = $registry->cache();
|
||||
$this->caches =& $registry->cache()->fetchCaches();
|
||||
$this->request = $registry->fetchRequest();
|
||||
$this->lang = $registry->class_localization;
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the tag help for this block type
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTags()
|
||||
{
|
||||
$_finalColumns = array();
|
||||
$_noinfoColumns = array();
|
||||
|
||||
foreach( $this->DB->getFieldNames( 'sessions' ) as $_column )
|
||||
{
|
||||
if( $this->lang->words['col__sessions_' . $_column ] )
|
||||
{
|
||||
$_finalColumns[ $_column ] = array( "$r['" . $_column . "']", $this->lang->words['col__sessions_' . $_column ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$_noinfoColumns[ $_column ] = array( "$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true );
|
||||
}
|
||||
}
|
||||
|
||||
foreach( $this->DB->getFieldNames( 'members' ) as $_column )
|
||||
{
|
||||
if( $this->lang->words['col__members_' . $_column ] )
|
||||
{
|
||||
$_finalColumns[ $_column ] = array( "$r['" . $_column . "']", $this->lang->words['col__members_' . $_column ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$_noinfoColumns[ $_column ] = array( "$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true );
|
||||
}
|
||||
}
|
||||
|
||||
$_fieldInfo = array();
|
||||
|
||||
$this->DB->buildAndFetch( array( 'select' => 'pf_id,pf_title,pf_desc', 'from' => 'pfields_data' ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $r= $this->DB->fetch() )
|
||||
{
|
||||
$_fieldInfo[ $r['pf_id'] ] = $r;
|
||||
}
|
||||
|
||||
foreach( $this->DB->getFieldNames( 'pfields_content' ) as $_column )
|
||||
{
|
||||
if( $this->lang->words['col__pfields_content_' . $_column ] )
|
||||
{
|
||||
$_finalColumns[ $_column ] = array( "$r['" . $_column . "']", $this->lang->words['col__pfields_content_' . $_column ] );
|
||||
}
|
||||
else if( preg_match( "/^field_(\d+)$/", $_column, $matches ) AND isset( $_fieldInfo[ $matches[1] ] ) )
|
||||
{
|
||||
$_finalColumns[ $_column ] = array( "$r['" . $_column . "']", $_fieldInfo[ $matches[1] ]['pf_title'] . ( $_fieldInfo[ $matches[1] ]['pf_desc'] ? ': ' . $_fieldInfo[ $matches[1] ]['pf_desc'] : '' ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$_noinfoColumns[ $_column ] = array( "$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true );
|
||||
}
|
||||
}
|
||||
|
||||
foreach( $this->DB->getFieldNames( 'profile_portal' ) as $_column )
|
||||
{
|
||||
if( $this->lang->words['col__profile_portal_' . $_column ] )
|
||||
{
|
||||
$_finalColumns[ $_column ] = array( "$r['" . $_column . "']", $this->lang->words['col__profile_portal_' . $_column ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$_noinfoColumns[ $_column ] = array( "$r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true );
|
||||
}
|
||||
}
|
||||
|
||||
$_finalColumns['my_member_id'] = array( "$r['my_member_id']", $this->lang->words['col__special_my_member_id'] );
|
||||
$_finalColumns['pp_main_photo'] = array( "$r['pp_main_photo']", $this->lang->words['col__special_pp_main_photo'] );
|
||||
$_finalColumns['pp_main_width'] = array( "$r['pp_main_width']", $this->lang->words['col__special_pp_main_width'] );
|
||||
$_finalColumns['pp_main_height'] = array( "$r['pp_main_height']", $this->lang->words['col__special_pp_main_height'] );
|
||||
$_finalColumns['_has_photo'] = array( "$r['_has_photo']", $this->lang->words['col__special__has_photo'] );
|
||||
$_finalColumns['pp_small_photo'] = array( "$r['pp_small_photo']", $this->lang->words['col__special_pp_small_photo'] );
|
||||
$_finalColumns['pp_small_width'] = array( "$r['pp_small_width']", $this->lang->words['col__special_pp_small_width'] );
|
||||
$_finalColumns['pp_small_height'] = array( "$r['pp_small_height']", $this->lang->words['col__special_pp_small_height'] );
|
||||
$_finalColumns['pp_mini_photo'] = array( "$r['pp_mini_photo']", $this->lang->words['col__special_pp_mini_photo'] );
|
||||
$_finalColumns['pp_mini_width'] = array( "$r['pp_mini_width']", $this->lang->words['col__special_pp_mini_width'] );
|
||||
$_finalColumns['pp_mini_height'] = array( "$r['pp_mini_height']", $this->lang->words['col__special_pp_mini_height'] );
|
||||
$_finalColumns['member_rank_img_i'] = array( "$r['member_rank_img_i']", $this->lang->words['col__special_member_rank_img_i'] );
|
||||
$_finalColumns['member_rank_img'] = array( "$r['member_rank_img']", $this->lang->words['col__special_member_rank_img'] );
|
||||
|
||||
return array(
|
||||
$this->lang->words['block_plugin__generic'] => array(
|
||||
array( '$title', $this->lang->words['block_custom__title'] ) ,
|
||||
),
|
||||
|
||||
$this->lang->words['block_plugin__of_users'] => array(
|
||||
array( '$friends', $this->lang->words['block_plugin__of_us'], IPSLib::mergeArrays( $_finalColumns, $_noinfoColumns ) ),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the plugin meta data
|
||||
*
|
||||
* @access public
|
||||
* @return array Plugin data (name, description, hasConfig)
|
||||
*/
|
||||
public function returnPluginInfo()
|
||||
{
|
||||
return array(
|
||||
'key' => 'online_friends',
|
||||
'name' => $this->lang->words['plugin_name__online_friends'],
|
||||
'description' => $this->lang->words['plugin_description__online_friends'],
|
||||
'hasConfig' => false,
|
||||
'templateBit' => 'block__online_friends',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plugin configuration data. Returns form elements and data
|
||||
*
|
||||
* @access public
|
||||
* @param array Session data
|
||||
* @return array Form data
|
||||
*/
|
||||
public function returnPluginConfig( $session )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the plugin config data
|
||||
*
|
||||
* @access public
|
||||
* @param array Submitted plugin data to check (usually $this->request)
|
||||
* @return array Array( (bool) Ok or not, (array) Plugin data to use )
|
||||
*/
|
||||
public function validatePluginConfig( $data )
|
||||
{
|
||||
return array( true, $data );
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the plugin and return the HTML to show on the page.
|
||||
* Can be called from ACP or front end, so the plugin needs to setup any appropriate lang files, skin files, etc.
|
||||
*
|
||||
* @access public
|
||||
* @param array Block data
|
||||
* @return string Block HTML to display or cache
|
||||
*/
|
||||
public function executePlugin( $block )
|
||||
{
|
||||
$config = unserialize($block['block_config']);
|
||||
|
||||
$this->lang->loadLanguageFile( array( 'public_ccs' ), 'ccs' );
|
||||
|
||||
$friends = array();
|
||||
$onlineFriends = array();
|
||||
|
||||
$this->DB->build( array( 'select' => '*', 'from' => 'profile_friends', 'where' => 'friends_member_id=' . $this->memberData['member_id'] ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
$friends[ $r['friends_friend_id'] ] = $r['friends_friend_id'];
|
||||
}
|
||||
|
||||
if( count($friends) )
|
||||
{
|
||||
$_time = $this->settings['au_cutoff'] * 60;
|
||||
$_cutoff = time() - $_time;
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 's.*',
|
||||
'from' => array( 'sessions' => 's' ),
|
||||
'where' => 's.member_id IN(' . implode( ',', $friends ) . ') AND s.running_time > ' . $_cutoff,
|
||||
'order' => 's.running_time DESC',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'm.*, m.member_id as my_member_id',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=s.member_id',
|
||||
'type' => 'left',
|
||||
),
|
||||
array(
|
||||
'select' => 'pf.*',
|
||||
'from' => array( 'pfields_content' => 'pf' ),
|
||||
'where' => 'pf.member_id=m.member_id',
|
||||
'type' => 'left',
|
||||
),
|
||||
array(
|
||||
'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'pp.pp_member_id=m.member_id',
|
||||
'type' => 'left',
|
||||
),
|
||||
)
|
||||
) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
while( $r = $this->DB->fetch($outer) )
|
||||
{
|
||||
$r['member_id'] = $r['my_member_id'];
|
||||
|
||||
$r = IPSMember::buildDisplayData( $r );
|
||||
|
||||
$onlineFriends[ $r['member_id'] ] = $r;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if( $config['hide_empty'] AND !count($onlineFriends) )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
$pluginConfig = $this->returnPluginInfo();
|
||||
$templateBit = $pluginConfig['templateBit'] . '_' . $block['block_id'];
|
||||
|
||||
ob_start();
|
||||
$_return = $this->registry->output->getTemplate('ccs')->$templateBit( $block['block_name'], $onlineFriends );
|
||||
ob_end_clean();
|
||||
return $_return;
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Status Updates widget
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Content
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 8644 $
|
||||
* @since 1st March 2009
|
||||
*/
|
||||
|
||||
class plugin_status_updates implements pluginBlockInterface
|
||||
{
|
||||
/**#@+
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
protected $registry;
|
||||
protected $request;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Make shortcuts
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry = $registry;
|
||||
$this->DB = $registry->DB();
|
||||
$this->settings = $registry->fetchSettings();
|
||||
$this->member = $registry->member();
|
||||
$this->memberData =& $registry->member()->fetchMemberData();
|
||||
$this->cache = $registry->cache();
|
||||
$this->caches =& $registry->cache()->fetchCaches();
|
||||
$this->request = $registry->fetchRequest();
|
||||
$this->lang = $registry->class_localization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the tag help for this block type
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTags()
|
||||
{
|
||||
return array(
|
||||
$this->lang->words['block_plugin__generic'] => array(
|
||||
array( '$title', $this->lang->words['block_custom__title'] ) ,
|
||||
array( '$output', $this->lang->words['block_plugin_su_content'] ) ,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the plugin meta data
|
||||
*
|
||||
* @access public
|
||||
* @return array Plugin data (name, description, hasConfig)
|
||||
*/
|
||||
public function returnPluginInfo()
|
||||
{
|
||||
return array(
|
||||
'key' => 'status_updates',
|
||||
'name' => $this->lang->words['plugin_name__status_updates'],
|
||||
'description' => $this->lang->words['plugin_description__status_updates'],
|
||||
'hasConfig' => false,
|
||||
'templateBit' => 'block__status_updates',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get plugin configuration data. Returns form elements and data
|
||||
*
|
||||
* @access public
|
||||
* @param array Session data
|
||||
* @return array Form data
|
||||
*/
|
||||
public function returnPluginConfig( $session )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the plugin config data
|
||||
*
|
||||
* @access public
|
||||
* @param array Submitted plugin data to check (usually $this->request)
|
||||
* @return array Array( (bool) Ok or not, (array) Plugin data to use )
|
||||
*/
|
||||
public function validatePluginConfig( $data )
|
||||
{
|
||||
return array( true, $data );
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the plugin and return the HTML to show on the page.
|
||||
* Can be called from ACP or front end, so the plugin needs to setup any appropriate lang files, skin files, etc.
|
||||
*
|
||||
* @access public
|
||||
* @param array Block data
|
||||
* @return string Block HTML to display or cache
|
||||
*/
|
||||
public function executePlugin( $block )
|
||||
{
|
||||
$this->lang->loadLanguageFile( array( 'public_boards' ), 'forums' );
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/hooks/gateway.php', "members_hookGateway", 'members' );
|
||||
$hookGateway = new $classToLoad( $this->registry );
|
||||
$output = $hookGateway->statusUpdates();
|
||||
|
||||
$pluginConfig = $this->returnPluginInfo();
|
||||
$templateBit = $pluginConfig['templateBit'] . '_' . $block['block_id'];
|
||||
|
||||
ob_start();
|
||||
$_return = $this->registry->output->getTemplate('ccs')->$templateBit( $block['block_name'], $output );
|
||||
ob_end_clean();
|
||||
return $_return;
|
||||
}
|
||||
}
|
||||
@@ -1,141 +1,253 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Core extensions
|
||||
* Last Updated: $Date: 2011-03-10 21:04:50 -0500 (Thu, 10 Mar 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 8024 $
|
||||
*
|
||||
*/
|
||||
|
||||
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.
|
||||
*
|
||||
* @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( !empty(ipsRegistry::$request['id']) AND ipsRegistry::$request['section'] == 'view' AND ipsRegistry::$request['module'] == 'profile' )
|
||||
{
|
||||
$array['location_1_type'] = 'profile';
|
||||
$array['location_1_id'] = ipsRegistry::$request['id'];
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse/format the online list data for the records
|
||||
*
|
||||
* @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.3.4
|
||||
* Core extensions
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
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.
|
||||
*
|
||||
* @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( !empty(ipsRegistry::$request['id']) AND ipsRegistry::$request['section'] == 'view' AND ipsRegistry::$request['module'] == 'profile' )
|
||||
{
|
||||
$array['location_1_type'] = 'profile';
|
||||
$array['location_1_id'] = ipsRegistry::$request['id'];
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse/format the online list data for the records
|
||||
*
|
||||
* @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();
|
||||
$members = 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, member_banned, members_bitoptions', 'from' => 'members', 'where' => 'member_id IN(' . implode( ',', $profiles ) . ')' ) );
|
||||
$pr = ipsRegistry::DB()->execute();
|
||||
|
||||
while( $r = ipsRegistry::DB()->fetch($pr) )
|
||||
{
|
||||
/* Setup bitwise option to check for banned/spammer members */
|
||||
$r = IPSMember::buildBitWiseOptions( $r );
|
||||
|
||||
if ( ! IPSMember::isInactive( $r ) || ipsRegistry::member()->getProperty('g_is_supmod') )
|
||||
{
|
||||
$members[ $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($members[ $row['location_1_id'] ]) )
|
||||
{
|
||||
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_profile'];
|
||||
$row['where_line_more'] = $members[ $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', $members[ $row['location_1_id'] ]['members_seo_name'], 'showuser' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$final[ $row['id'] ] = $row;
|
||||
}
|
||||
|
||||
return $final;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Item Marking
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
class itemMarking__members
|
||||
{
|
||||
/**
|
||||
* Field Convert Data Remap Array
|
||||
*
|
||||
* This is where you can map your app_key_# numbers to application savvy fields
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $_convertData = array();
|
||||
|
||||
/**#@+
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* I'm a constructor, twisted constructor
|
||||
*
|
||||
* @param object ipsRegistry reference
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make objects */
|
||||
$this->registry = $registry;
|
||||
$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();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert Data
|
||||
* Takes an array of app specific data and remaps it to the DB table fields
|
||||
*
|
||||
* @param array
|
||||
* @return array
|
||||
*/
|
||||
public function convertData( $data )
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether to load all markers for this view or not
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function loadAllMarkers()
|
||||
{
|
||||
/* don't need markers for this app */
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch unread count
|
||||
*
|
||||
* Grab the number of items truly unread
|
||||
* This is called upon by 'markRead' when the number of items
|
||||
* left hits zero (or less).
|
||||
*
|
||||
*
|
||||
* @param array Array of data
|
||||
* @param array Array of read itemIDs
|
||||
* @param int Last global reset
|
||||
* @return integer Last unread count
|
||||
*/
|
||||
public function fetchUnreadCount( $data, $readItems, $lastReset )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Core variables extension file
|
||||
* Last Updated: $Date: 2010-12-19 21:06:50 -0500 (Sun, 19 Dec 2010) $
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 7452 $
|
||||
* @version $Revision: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Dashboard Notifications
|
||||
* Last Updated: $Date
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8397 $
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Define data hook locations (Members)
|
||||
* Last Updated: $Date: 2011-05-18 04:49:10 -0400 (Wed, 18 May 2011) $
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8812 $
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
$dataHookLocations = array(
|
||||
@@ -24,7 +24,12 @@ $dataHookLocations = array(
|
||||
array( 'messengerSendTopicFirstPostData', 'Messenger: New conversation, first post' ),
|
||||
|
||||
/* PROFILE DATA LOCATIONS */
|
||||
array( 'profileCommentNew', 'Profile: New comment' ),
|
||||
array( 'statusUpdateNew', 'New Status Update' ),
|
||||
array( 'statusCommentNew', 'New Status Comment' ),
|
||||
array( 'profileFriendsNew', 'Profile: New friend' ),
|
||||
|
||||
/* MEMBER WARNINGS LOCATIONS */
|
||||
array( 'memberWarningPre', 'Warn Member (Pre Save)' ),
|
||||
array( 'memberWarningPost', 'Warn Member (Post Save)' ),
|
||||
|
||||
);
|
||||
@@ -1,39 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* BBCode Management : Determines if bbcode can be used in this section
|
||||
* Last Updated: $LastChangedDate: 2010-12-17 07:40:13 -0500 (Fri, 17 Dec 2010) $
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* BBCode Management : Determines if bbcode can be used in this section
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 7442 $
|
||||
*
|
||||
*/
|
||||
|
||||
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'],
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
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,74 +0,0 @@
|
||||
<?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 This is NULLED!
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @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(?:&|&)module=profile(?:&|&)section=status(?:&|&)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(?:&|&)module=profile(?:&|&)section=status((?:&|&)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((&|&)module=list)?#i', 'members/' ),
|
||||
'in' => array(
|
||||
'regex' => "#/members(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'members' ),
|
||||
array( 'module', 'list' ) )
|
||||
)
|
||||
),
|
||||
);
|
||||
@@ -1,135 +1,133 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* RSS output plugin :: posts
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 8644 $
|
||||
*/
|
||||
|
||||
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)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_type = '';
|
||||
|
||||
/**
|
||||
* Key ID
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $_id = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*/
|
||||
public 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>
|
||||
*
|
||||
* @param string Type
|
||||
* @param mixed Value
|
||||
*/
|
||||
public function setKey( $name, $value )
|
||||
{
|
||||
$this->_type = $name;
|
||||
$this->_id = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up the key by URI
|
||||
*
|
||||
* @param string URI (example: index.php?showtopic=5&view=getlastpost)
|
||||
* @return @e void
|
||||
*/
|
||||
public function setKeyByUri( $uri )
|
||||
{
|
||||
$uri = str_replace( '&', '&', $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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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.3.4
|
||||
* RSS output plugin :: posts
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 10914 $
|
||||
*/
|
||||
|
||||
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)
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_type = '';
|
||||
|
||||
/**
|
||||
* Key ID
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $_id = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*/
|
||||
public 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>
|
||||
*
|
||||
* @param string Type
|
||||
* @param mixed Value
|
||||
*/
|
||||
public function setKey( $name, $value )
|
||||
{
|
||||
$this->_type = $name;
|
||||
$this->_id = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up the key by URI
|
||||
*
|
||||
* @param string URI (example: index.php?showtopic=5&view=getlastpost)
|
||||
* @return @e void
|
||||
*/
|
||||
public function setKeyByUri( $uri )
|
||||
{
|
||||
$uri = str_replace( '&', '&', $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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @return string The SEO friendly name
|
||||
*/
|
||||
public function _fetchSeoTitle_user()
|
||||
{
|
||||
$member = IPSMember::load( intval( $this->_id ), 'core' );
|
||||
|
||||
if ( $member['member_id'] )
|
||||
{
|
||||
return ( $member['members_seo_name'] ) ? $member['members_seo_name'] : IPSText::makeSeoTitle( $member['members_display_name'] );
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -1,94 +1,106 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Sets up SEO templates
|
||||
* Last Updated: $Date: 2011-04-11 06:49:17 -0400 (Mon, 11 Apr 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 8294 $
|
||||
*
|
||||
*/
|
||||
|
||||
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=(.+?)((?:&|&)f=(.+?))?(&|$)#i', 'user/$1-#{__title__}/$2$4' ),
|
||||
'in' => array( 'regex' => "#/user/(\d+?)-#i",
|
||||
'matches' => array( array( 'showuser', '$1' ) ) ) ),
|
||||
|
||||
|
||||
'members_status_single' => array( 'app' => 'members',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=members(?:&|&)module=profile(?:&|&)section=status(?:&|&)type=single(?:&|&)status_id=(\d+?)(&|$)#i', 'statuses/id/$1/$2' ),
|
||||
'in' => array( 'regex' => "#/statuses/id/(\d+?)/#i",
|
||||
'matches' => array( array( 'app' , 'members' ),
|
||||
array( 'section', 'status' ),
|
||||
array( 'module' , 'profile' ),
|
||||
array( 'type' , 'single' ),
|
||||
array( 'status_id', '$1' ) ) ) ),
|
||||
|
||||
'members_status_friends'=> array( 'app' => 'members',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=members(?:&|&)module=profile(?:&|&)section=status(?:&|&)type=friends(&|$)#i', 'statuses/friends/$2' ),
|
||||
'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(?:&|&)module=profile(?:&|&)section=status((?:&|&)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((&|&)module=list)?#i', 'members/' ),
|
||||
'in' => array(
|
||||
'regex' => "#/members(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'members' ),
|
||||
array( 'module', 'list' ) )
|
||||
)
|
||||
),
|
||||
);
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Sets up SEO templates
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
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=(.+?)((?:&|&)f=(.+?))?(&|$)#i', 'user/$1-#{__title__}/$2$4' ),
|
||||
'in' => array( 'regex' => "#^/user/(\d+?)-#i",
|
||||
'matches' => array( array( 'showuser', '$1' ) ) ) ),
|
||||
|
||||
|
||||
'members_status_single' => array( 'app' => 'members',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=members(?:&|&)module=profile(?:&|&)section=status(?:&|&)type=single(?:&|&)status_id=(\d+?)(&|$)#i', 'statuses/id/$1/$2' ),
|
||||
'in' => array( 'regex' => "#/statuses/id/(\d+?)/#i",
|
||||
'matches' => array( array( 'app' , 'members' ),
|
||||
array( 'section', 'status' ),
|
||||
array( 'module' , 'profile' ),
|
||||
array( 'type' , 'single' ),
|
||||
array( 'status_id', '$1' ) ) ) ),
|
||||
|
||||
'members_status_friends'=> array( 'app' => 'members',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=members(?:&|&)module=profile(?:&|&)section=status(?:&|&)type=friends(&|$)#i', 'statuses/friends/$2' ),
|
||||
'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(?:&|&)module=profile(?:&|&)section=status((?:&|&)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((&|&)module=list)?#i', 'members/' ),
|
||||
'in' => array(
|
||||
'regex' => "#/members(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'members' ),
|
||||
array( 'module', 'list' ) )
|
||||
)
|
||||
),
|
||||
|
||||
'most_liked' => array(
|
||||
'app' => 'members',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=members(?:&|&)module=reputation(?:&|&)section=most#i', 'best-content/' ),
|
||||
'in' => array(
|
||||
'regex' => "#/best-content(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'members' ),
|
||||
array( 'module', 'reputation' ),
|
||||
array( 'section', 'most' ) )
|
||||
)
|
||||
),
|
||||
);
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,101 +1,101 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Forum permissions mappings
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
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 This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
class membersMemberSync
|
||||
{
|
||||
/**
|
||||
* Registry reference
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
public $registry;
|
||||
|
||||
/**
|
||||
* CONSTRUCTOR
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->registry = ipsRegistry::instance();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is run when a member is flagged as a spammer
|
||||
*
|
||||
* @param array $member Array of member data
|
||||
* @return @e 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
|
||||
*
|
||||
* @param array $member Array of member data
|
||||
* @return @e void
|
||||
*/
|
||||
public function onUnSetAsSpammer( $member )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called after a member account has been removed
|
||||
*
|
||||
* @param string $ids SQL IN() clause
|
||||
* @return @e void
|
||||
*/
|
||||
public function onDelete( $mids )
|
||||
{
|
||||
/* Delete Status Updates - note, we can't do this via memberStatus class, since we no longer have the member data */
|
||||
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 );
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Forum permissions mappings
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
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/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
class membersMemberSync
|
||||
{
|
||||
/**
|
||||
* Registry reference
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
public $registry;
|
||||
|
||||
/**
|
||||
* CONSTRUCTOR
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->registry = ipsRegistry::instance();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is run when a member is flagged as a spammer
|
||||
*
|
||||
* @param array $member Array of member data
|
||||
* @return @e 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
|
||||
*
|
||||
* @param array $member Array of member data
|
||||
* @return @e void
|
||||
*/
|
||||
public function onUnSetAsSpammer( $member )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called after a member account has been removed
|
||||
*
|
||||
* @param string $ids SQL IN() clause
|
||||
* @return @e void
|
||||
*/
|
||||
public function onDelete( $mids )
|
||||
{
|
||||
/* Delete Status Updates - note, we can't do this via memberStatus class, since we no longer have the member data */
|
||||
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 );
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,12 +3,12 @@
|
||||
* @file plugin_banned.php Moderator control panel plugin: banned members
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: bfarber $
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mmecham $
|
||||
* @since 2/17/2011
|
||||
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 9425 $
|
||||
* $LastChangedDate: 2012-01-24 11:56:40 -0500 (Tue, 24 Jan 2012) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 10180 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -102,7 +102,7 @@ class plugin_members_banned
|
||||
*/
|
||||
public function canView( $permissions )
|
||||
{
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_ban'] ) )
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -134,23 +134,17 @@ class plugin_members_banned
|
||||
// Get 10 banned members
|
||||
//-----------------------------------------
|
||||
|
||||
$members = array();
|
||||
$_bannedGroup = '';
|
||||
|
||||
if( $this->settings['banned_group'] )
|
||||
{
|
||||
$_bannedGroup = " OR m.member_group_id=" . $this->settings['banned_group'];
|
||||
}
|
||||
$members = array();
|
||||
|
||||
$st = intval($this->request['st']);
|
||||
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "member_banned=1" . str_replace( 'm.', '', $_bannedGroup ) ) );
|
||||
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "member_banned=1" ) );
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'order' => 'm.joined DESC',
|
||||
'limit' => array( $st, 10 ),
|
||||
'where' => "m.member_banned=1" . $_bannedGroup,
|
||||
'where' => "m.member_banned=1",
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'pp.*',
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* @file plugin_iplookup.php Moderator control panel plugin: IP lookup tool
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: bfarber $
|
||||
* @since 2/18/2011
|
||||
* $LastChangedDate: 2011-03-16 21:13:06 -0400 (Wed, 16 Mar 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 8110 $
|
||||
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -161,7 +161,7 @@ class plugin_members_iplookup
|
||||
$exactMatch = 0;
|
||||
$finalIPString = preg_replace( "/^(.+?)\*(.+?)?$/", "\\1", $finalIPString ).'%';
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// H'okay, what have we been asked to do?
|
||||
// (that's a metaphorical "we" in a rhetorical question)
|
||||
@@ -241,7 +241,7 @@ class plugin_members_iplookup
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = $exactMatch ? "p.ip_address LIKE '$finalIPString'" : "p.ip_address='$finalIPString'";
|
||||
$sql = $exactMatch ? "p.ip_address='$finalIPString'" : "p.ip_address LIKE '$finalIPString'";
|
||||
|
||||
//-----------------------------------------
|
||||
// Get forums we can view
|
||||
@@ -298,7 +298,7 @@ class plugin_members_iplookup
|
||||
'order' => 'p.pid DESC',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 't.forum_id',
|
||||
'select' => 't.forum_id, t.title_seo',
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => 't.tid=p.topic_id',
|
||||
'type' => 'left'
|
||||
@@ -331,7 +331,7 @@ class plugin_members_iplookup
|
||||
// Parse the member
|
||||
//-----------------------------------------
|
||||
|
||||
$row = IPSMember::buildDisplayData( $row, array( 'customFields' => 1, 'signature' => 1, 'warn' => 1 ) );
|
||||
$row = IPSMember::buildDisplayData( $row, array( 'reputation' => 0, 'warn' => 0 ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Parse the post
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* @file plugin_modposts.php Moderator control panel plugin: show members on mod queue
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: bfarber $
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* @since 2/17/2011
|
||||
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 9425 $
|
||||
* $LastChangedDate: 2011-11-16 11:36:38 -0500 (Wed, 16 Nov 2011) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 9829 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -102,7 +102,7 @@ class plugin_members_modposts
|
||||
*/
|
||||
public function canView( $permissions )
|
||||
{
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_modq'] ) )
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* @file plugin_restrictposts.php Moderator control panel plugin: show members with post restriction
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: bfarber $
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* @since 2/17/2011
|
||||
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 9425 $
|
||||
* $LastChangedDate: 2011-11-16 11:36:38 -0500 (Wed, 16 Nov 2011) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 9829 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -102,7 +102,7 @@ class plugin_members_restrictposts
|
||||
*/
|
||||
public function canView( $permissions )
|
||||
{
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_post'] ) )
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* @file plugin_suspended.php Moderator control panel plugin: temporarily suspended members
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: bfarber $
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: mark $
|
||||
* @since 2/17/2011
|
||||
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 9425 $
|
||||
* $LastChangedDate: 2011-11-16 11:36:38 -0500 (Wed, 16 Nov 2011) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 9829 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -102,7 +102,7 @@ class plugin_members_suspended
|
||||
*/
|
||||
public function canView( $permissions )
|
||||
{
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_ban'] ) )
|
||||
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* @file plugin_warn.php Moderator control panel plugin: show latest warnings
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: ips_terabyte $
|
||||
* @since 2/14/2011
|
||||
* $LastChangedDate: 2011-03-09 17:51:33 -0500 (Wed, 09 Mar 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 8003 $
|
||||
* $LastChangedDate: 2011-12-14 12:27:41 -0500 (Wed, 14 Dec 2011) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 10000 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -123,25 +123,37 @@ class plugin_members_warn
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Load reasons
|
||||
//-----------------------------------------
|
||||
|
||||
$reasons = array();
|
||||
$this->DB->build( array( 'select' => '*', 'from' => 'members_warn_reasons', 'order' => 'wr_order' ) );
|
||||
$this->DB->execute();
|
||||
while ( $row = $this->DB->fetch() )
|
||||
{
|
||||
$reasons[ $row['wr_id'] ] = $row;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get last 10 warnings
|
||||
//-----------------------------------------
|
||||
|
||||
$st = intval($this->request['st']);
|
||||
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as warns', 'from' => 'warn_logs' ) );
|
||||
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as warns', 'from' => 'members_warn_logs' ) );
|
||||
$warnings = array();
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'w.*',
|
||||
'from' => array( 'warn_logs' => 'w' ),
|
||||
'order' => 'w.wlog_date DESC',
|
||||
'from' => array( 'members_warn_logs' => 'w' ),
|
||||
'order' => 'w.wl_date DESC',
|
||||
'limit' => array( $st, 10 ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=w.wlog_mid',
|
||||
'where' => 'm.member_id=w.wl_member',
|
||||
'type' => 'left',
|
||||
),
|
||||
array(
|
||||
@@ -151,9 +163,9 @@ class plugin_members_warn
|
||||
'type' => 'left',
|
||||
),
|
||||
array(
|
||||
'select' => 'mm.member_id as punisher_id, mm.members_display_name as punisher_name, mm.members_seo_name as punisher_seo_name',
|
||||
'select' => 'mm.member_id as punisher_id, mm.member_group_id as punisher_group, mm.members_display_name as punisher_name, mm.members_seo_name as punisher_seo_name',
|
||||
'from' => array( 'members' => 'mm' ),
|
||||
'where' => 'mm.member_id=w.wlog_addedby',
|
||||
'where' => 'mm.member_id=w.wl_moderator',
|
||||
'type' => 'left',
|
||||
),
|
||||
array(
|
||||
@@ -168,31 +180,18 @@ class plugin_members_warn
|
||||
|
||||
while( $r = $this->DB->fetch($outer) )
|
||||
{
|
||||
if ( strstr( $r['wlog_notes'], '<content>' ) )
|
||||
{
|
||||
$raw = preg_match( "#<content>(.+?)</content>#is", $r['wlog_notes'], $match );
|
||||
}
|
||||
else
|
||||
{
|
||||
$_array = unserialize( $r['wlog_notes'] );
|
||||
|
||||
if ( is_array( $_array ) AND $_array['content'] )
|
||||
{
|
||||
$match[1] = $_array['content'];
|
||||
}
|
||||
}
|
||||
/* Sort out punisher */
|
||||
$r['punisherMember'] = array( 'member_id' => $r['punisher_id'],
|
||||
'member_group_id' => $r['punisher_group'],
|
||||
'members_display_name' => $r['punisher_name'],
|
||||
'members_seo_name' => $r['punisher_seo_name']
|
||||
);
|
||||
|
||||
IPSText::getTextClass( 'bbcode' )->parse_smilies = 1;
|
||||
IPSText::getTextClass( 'bbcode' )->parse_html = 0;
|
||||
IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1;
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_section = 'warn';
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $r['member_group_id'];
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $r['mgroup_others'];
|
||||
|
||||
$r['content'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $match[1] );
|
||||
|
||||
$r['punisher_photo'] = IPSMember::buildProfilePhoto( array( 'pp_main_photo' => $r['punisher_check'], 'pp_thumb_photo' => $r['punisher_photo'], 'pp_thumb_width' => $r['punisher_width'], 'pp_thumb_height' => $r['punisher_height'] ), 'mini' );
|
||||
$warnings[] = IPSMember::buildDisplayData( $r );
|
||||
|
||||
|
||||
$r['wl_reason'] = $r['wl_reason'] ? $reasons[ $r['wl_reason'] ]['wr_name'] : '--';
|
||||
$warnings[] = IPSMember::buildDisplayData( $r, array( 'reputation' => 0, 'warn' => 0 ) );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
@@ -1,53 +1,116 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Define the core notification types
|
||||
* Last Updated: $Date: 2011-04-27 07:31:56 -0400 (Wed, 27 Apr 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 8490 $
|
||||
*
|
||||
*/
|
||||
|
||||
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( 'inline' ), 'disabled' => array(), 'icon' => 'notify_profilecomment' ),
|
||||
array( 'key' => 'friend_request', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'friend_request_approve', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'new_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'reply_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'invite_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'reply_your_status', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
|
||||
array( 'key' => 'reply_any_status', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
|
||||
array( 'key' => 'friend_status_update', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
|
||||
);/*noLibHook*/
|
||||
|
||||
return $_NOTIFY;
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Define the core notification types
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
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( 'inline' ), 'disabled' => array(), 'icon' => 'notify_profilecomment' ),
|
||||
array( 'key' => 'friend_request', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'friend_request_approve', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'new_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'reply_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'invite_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'reply_your_status', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
|
||||
array( 'key' => 'reply_any_status', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
|
||||
array( 'key' => 'friend_status_update', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
|
||||
array( 'key' => 'warning', 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => true, 'icon' => 'notify_warning' ),
|
||||
array( 'key' => 'warning_mods', 'default' => array( 'inline' ), 'disabled' => array(), 'show_callback' => true, 'icon' => 'notify_warning' ),
|
||||
);/*noLibHook*/
|
||||
|
||||
return $_NOTIFY;
|
||||
}
|
||||
|
||||
public function warning( $member )
|
||||
{
|
||||
if ( !ipsRegistry::$settings['warn_on'] )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ipsRegistry::$settings['warn_protected'] )
|
||||
{
|
||||
if ( IPSMember::isInGroup( $member, explode( ',', ipsRegistry::$settings['warn_protected'] ) ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function warning_mods( $member )
|
||||
{
|
||||
if ( !ipsRegistry::$settings['warn_on'] )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( $member['g_is_supmod'] )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
elseif ( $member['is_mod'] )
|
||||
{
|
||||
$other_mgroups = array();
|
||||
$_other_mgroups = IPSText::cleanPermString( $member['mgroup_others'] );
|
||||
|
||||
if( $_other_mgroups )
|
||||
{
|
||||
$other_mgroups = explode( ",", $_other_mgroups );
|
||||
}
|
||||
|
||||
$other_mgroups[] = $member['member_group_id'];
|
||||
|
||||
ipsRegistry::DB()->build( array(
|
||||
'select' => '*',
|
||||
'from' => 'moderators',
|
||||
'where' => "(member_id='" . $member['member_id'] . "' OR (is_group=1 AND group_id IN(" . implode( ",", $other_mgroups ) . ")))"
|
||||
) );
|
||||
|
||||
ipsRegistry::DB()->execute();
|
||||
|
||||
while ( $this->moderator = ipsRegistry::DB()->fetch() )
|
||||
{
|
||||
if ( $this->moderator['allow_warn'] )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,106 +1,106 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Fetches meta data for notifications
|
||||
* Last Updated: $Date: 2011-09-21 10:55:45 -0400 (Wed, 21 Sep 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9528 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class members_class_notifications
|
||||
{
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = ipsRegistry::instance();
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
|
||||
$this->messengerFunctions = new $classToLoad( $this->registry );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches data by meta data
|
||||
* Must return: authorId, content, title, date
|
||||
* @param array $metaData
|
||||
*/
|
||||
public function getLinkedDataByMetaData( array $metaData )
|
||||
{
|
||||
/* Fetch topic */
|
||||
$topic = $this->messengerFunctions->fetchTopicDataWithMessage( $metaData['meta_id'] );
|
||||
|
||||
/* Get participants */
|
||||
$parts = $this->messengerFunctions->fetchTopicParticipants( $metaData['meta_id'] );
|
||||
|
||||
/* New or reply? */
|
||||
if ( ! empty( $parts[ $this->memberData['member_id'] ]['map_read_time'] ) && ! empty( $parts[ $this->memberData['member_id'] ]['map_has_unread'] ) )
|
||||
{
|
||||
/* Is reply */
|
||||
$msg = $this->messengerFunctions->fetchMessageData( $metaData['meta_id'], $topic['mt_last_msg_id'] );
|
||||
|
||||
$topic['msg_author_id'] = $msg['msg_author_id'];
|
||||
$topic['msg_post'] = $msg['msg_post'];
|
||||
$topic['msg_date'] = $msg['msg_date'];
|
||||
}
|
||||
|
||||
/* Is this a new topic or reply? */
|
||||
return array( 'authorId' => $topic['msg_author_id'],
|
||||
'content' => $this->_formatMessageForDisplay( $topic['msg_post'], $this->memberData ),
|
||||
'title' => $topic['mt_title'],
|
||||
'date' => $topic['msg_date'],
|
||||
'type' => $this->lang->words['gbl_notify_pm'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to format the actual message (applies BBcode, etc)
|
||||
*
|
||||
* @param string Raw text
|
||||
* @param array PM data
|
||||
* @return string Processed text
|
||||
*/
|
||||
private function _formatMessageForDisplay( $msgContent, $data=array() )
|
||||
{
|
||||
IPSText::resetTextClass('bbcode');
|
||||
|
||||
$this->settings['max_emos'] = 0;
|
||||
|
||||
IPSText::getTextClass('bbcode')->parse_smilies = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_html = 0;
|
||||
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
|
||||
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $data['member_group_id'];
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $data['mgroup_others'];
|
||||
|
||||
$msgContent = IPSText::getTextClass('bbcode')->preDisplayParse( $msgContent );
|
||||
|
||||
return $msgContent;
|
||||
}
|
||||
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Fetches meta data for notifications
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class members_class_notifications
|
||||
{
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = ipsRegistry::instance();
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
|
||||
$this->messengerFunctions = new $classToLoad( $this->registry );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches data by meta data
|
||||
* Must return: authorId, content, title, date
|
||||
* @param array $metaData
|
||||
*/
|
||||
public function getLinkedDataByMetaData( array $metaData )
|
||||
{
|
||||
/* Fetch topic */
|
||||
$topic = $this->messengerFunctions->fetchTopicDataWithMessage( $metaData['meta_id'] );
|
||||
|
||||
/* Get participants */
|
||||
$parts = $this->messengerFunctions->fetchTopicParticipants( $metaData['meta_id'] );
|
||||
|
||||
/* New or reply? */
|
||||
if ( ! empty( $parts[ $this->memberData['member_id'] ]['map_read_time'] ) && ! empty( $parts[ $this->memberData['member_id'] ]['map_has_unread'] ) )
|
||||
{
|
||||
/* Is reply */
|
||||
$msg = $this->messengerFunctions->fetchMessageData( $metaData['meta_id'], $topic['mt_last_msg_id'] );
|
||||
|
||||
$topic['msg_author_id'] = $msg['msg_author_id'];
|
||||
$topic['msg_post'] = $msg['msg_post'];
|
||||
$topic['msg_date'] = $msg['msg_date'];
|
||||
}
|
||||
|
||||
/* Is this a new topic or reply? */
|
||||
return array( 'authorId' => $topic['msg_author_id'],
|
||||
'content' => $this->_formatMessageForDisplay( $topic['msg_post'], $this->memberData ),
|
||||
'title' => $topic['mt_title'],
|
||||
'date' => $topic['msg_date'],
|
||||
'type' => $this->lang->words['gbl_notify_pm'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to format the actual message (applies BBcode, etc)
|
||||
*
|
||||
* @param string Raw text
|
||||
* @param array PM data
|
||||
* @return string Processed text
|
||||
*/
|
||||
private function _formatMessageForDisplay( $msgContent, $data=array() )
|
||||
{
|
||||
IPSText::resetTextClass('bbcode');
|
||||
|
||||
$this->settings['max_emos'] = 0;
|
||||
|
||||
IPSText::getTextClass('bbcode')->parse_smilies = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_html = 0;
|
||||
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
|
||||
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $data['member_group_id'];
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $data['mgroup_others'];
|
||||
|
||||
$msgContent = IPSText::getTextClass('bbcode')->preDisplayParse( $msgContent );
|
||||
|
||||
return $msgContent;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Config for about me tab
|
||||
* Last Updated: $Date: 2011-03-14 13:48:27 -0400 (Mon, 14 Mar 2011) $
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 8063 $
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -47,4 +47,4 @@ $CONFIG['plugin_enabled'] = 1;
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
$CONFIG['plugin_order'] = 2;
|
||||
$CONFIG['plugin_order'] = 3;
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Profile Plugin Library
|
||||
* Last Updated: $Date: 2011-05-31 15:22:26 -0400 (Tue, 31 May 2011) $
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 8931 $
|
||||
* @version $Revision: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -27,6 +27,8 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
|
||||
class profile_friends extends profile_plugin_parent
|
||||
{
|
||||
const FRIENDS_PER_PAGE = 100;
|
||||
|
||||
/**
|
||||
* Feturn HTML block
|
||||
*
|
||||
@@ -49,22 +51,45 @@ class profile_friends extends profile_plugin_parent
|
||||
//-----------------------------------------
|
||||
// Grab the friends
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'f.*',
|
||||
'from' => array( 'profile_friends' => 'f' ),
|
||||
'where' => 'f.friends_member_id=' . $member['member_id'] . ' AND f.friends_approved=1',
|
||||
//'order' => 'm.members_display_name ASC',
|
||||
'add_join' => array(
|
||||
1 => array( 'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'pp.pp_member_id=f.friends_friend_id',
|
||||
'type' => 'left' ),
|
||||
2 => array( 'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=f.friends_friend_id',
|
||||
'type' => 'left' )
|
||||
)
|
||||
) );
|
||||
|
||||
/* How many friends do we have? */
|
||||
$count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as dracula', 'from' => 'profile_friends', 'where' => 'friends_member_id=' . $member['member_id'] . ' AND friends_approved=1' ) );
|
||||
|
||||
/* Sort out pagination */
|
||||
$st = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0;
|
||||
$pagination = $this->registry->output->generatePagination( array(
|
||||
'totalItems' => $count['dracula'],
|
||||
'itemsPerPage' => self::FRIENDS_PER_PAGE,
|
||||
'currentStartValue' => $st,
|
||||
'baseUrl' => "showuser={$member['member_id']}&tab=friends",
|
||||
'seoTemplate' => 'showuser',
|
||||
'seoTitle' => $member['members_seo_name'],
|
||||
) );
|
||||
|
||||
/* Get em! */
|
||||
$queryData = array( 'select' => 'f.*',
|
||||
'from' => array( 'profile_friends' => 'f' ),
|
||||
'where' => 'f.friends_member_id=' . $member['member_id'] . ' AND f.friends_approved=1',
|
||||
'add_join' => array(
|
||||
1 => array( 'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'pp.pp_member_id=f.friends_friend_id',
|
||||
'type' => 'left' ),
|
||||
2 => array( 'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=f.friends_friend_id',
|
||||
'type' => 'left' )
|
||||
)
|
||||
);
|
||||
// Ordering is bad because it causes a filesort, but if they have more than 100 members, we're going to have
|
||||
// to order so we can paginate
|
||||
if ( $count['dracula'] > self::FRIENDS_PER_PAGE )
|
||||
{
|
||||
$queryData['order'] = 'm.members_display_name';
|
||||
$queryData['limit'] = array( $st, self::FRIENDS_PER_PAGE );
|
||||
}
|
||||
|
||||
$this->DB->build( $queryData );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -81,7 +106,7 @@ class profile_friends extends profile_plugin_parent
|
||||
|
||||
ksort($friends);
|
||||
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->tabFriends( $friends, $member );
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->tabFriends( $friends, $member, $pagination );
|
||||
|
||||
//-----------------------------------------
|
||||
// Macros...
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
+11
-12
@@ -2,21 +2,20 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Config for about me tab
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* IP.Board v3.3.4
|
||||
* Config for reputation tab
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 5713 $
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 4th January 2012
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
* @note This file is only included in order to *disable* the tab for 3.1 upgrades
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -28,22 +27,22 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
/**
|
||||
* Plug in name (Default tab name)
|
||||
*/
|
||||
$CONFIG['plugin_name'] = 'About Me';
|
||||
$CONFIG['plugin_name'] = 'Reputation';
|
||||
|
||||
/**
|
||||
* Language string for the tab
|
||||
*/
|
||||
$CONFIG['plugin_lang_bit'] = 'pp_tab_aboutme';
|
||||
$CONFIG['plugin_lang_bit'] = ipsRegistry::$settings['reputation_point_types'] == 'like' ? 'pp_tab_rep_likes' : 'pp_tab_rep_rep';
|
||||
|
||||
/**
|
||||
* Plug in key (must be the same as the main {file}.php name
|
||||
*/
|
||||
$CONFIG['plugin_key'] = 'aboutme';
|
||||
$CONFIG['plugin_key'] = 'reputation';
|
||||
|
||||
/**
|
||||
* Show tab?
|
||||
*/
|
||||
$CONFIG['plugin_enabled'] = 0;
|
||||
$CONFIG['plugin_enabled'] = intval( ipsRegistry::$settings['reputation_enabled'] );
|
||||
|
||||
/**
|
||||
* Order
|
||||
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Reputation Profile Tab
|
||||
* Last Updated: $Date: 2012-07-09 12:56:26 -0400 (Mon, 09 Jul 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: AndyMillne $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 4th January 2012
|
||||
* @version $Revision: 11047 $
|
||||
*
|
||||
*/
|
||||
|
||||
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_reputation extends profile_plugin_parent
|
||||
{
|
||||
const PER_PAGE = 15;
|
||||
|
||||
/**
|
||||
* Feturn HTML block
|
||||
*
|
||||
* @param array Member information
|
||||
* @return string HTML block
|
||||
*/
|
||||
public function return_html_block( $member=array() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get supported applications
|
||||
//-----------------------------------------
|
||||
|
||||
$supportedApps = array();
|
||||
|
||||
foreach( IPSLib::getEnabledApplications() as $app )
|
||||
{
|
||||
$file = IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/reputation.php';
|
||||
|
||||
if( is_file( $file ) )
|
||||
{
|
||||
require_once( $file );/*maybeLibHook*/
|
||||
|
||||
if( class_exists( 'reputation_' . $app['app_directory'] ) )
|
||||
{
|
||||
$supportedApps[ $app['app_directory'] ] = $app;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get results
|
||||
//-----------------------------------------
|
||||
|
||||
/* What is it we're getting? */
|
||||
$app = ( ! empty($this->request['app_tab']) and isset( $supportedApps[ $this->request['app_tab'] ] ) ) ? $this->request['app_tab'] : 'forums';
|
||||
$type = ( isset( $this->request['type'] ) and $this->request['type'] == 'received' ) ? 'received' : 'given';
|
||||
$st = isset( $this->request['st'] ) ? intval( $this->request['st'] ) : 0;
|
||||
|
||||
/* Can we view given reputation - If not, no point going any further*/
|
||||
if ( $type == 'given' && ! $this->memberData['gbw_view_reps'] )
|
||||
{
|
||||
return $this->registry->getClass('output')->getTemplate('profile')->tabReputation( $member, $app, 'received', $supportedApps );
|
||||
}
|
||||
|
||||
/* Load our extension class */
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $app ) . '/extensions/reputation.php', 'reputation_' . $app, $app );
|
||||
$reputationClass = new $classToLoad();
|
||||
|
||||
/* Get our query */
|
||||
$_query = $reputationClass->fetch( $type, $member );
|
||||
$_query['group'] = 'r.app, r.type, r.type_id';
|
||||
|
||||
/* Get a count */
|
||||
$queryForCount = $_query;
|
||||
$queryForCount['select'] = 'r.type_id';
|
||||
|
||||
$this->DB->build( $queryForCount );
|
||||
|
||||
$rawQuery = $this->DB->fetchSqlString();
|
||||
|
||||
$this->DB->flushQuery();
|
||||
|
||||
$this->DB->allow_sub_select = 1;
|
||||
$this->DB->query( 'SELECT COUNT(*) as dracula FROM ( ' . $rawQuery . ') as x' );
|
||||
$this->DB->execute();
|
||||
|
||||
$count = $this->DB->fetch();
|
||||
|
||||
/* Get em? */
|
||||
$processedResults = '';
|
||||
$pagination = '';
|
||||
|
||||
if ( ! empty($count['dracula']) )
|
||||
{
|
||||
$_query['limit'] = array( $st, self::PER_PAGE );
|
||||
$_query['order'] = ( $type == 'received' ) ? 'r.type_id DESC' : 'r.rep_date DESC';
|
||||
$results = array();
|
||||
|
||||
$this->DB->build( $_query );
|
||||
|
||||
$e = $this->DB->execute();
|
||||
while ( $row = $this->DB->fetch( $e ) )
|
||||
{
|
||||
$results[] = $reputationClass->process( $row );
|
||||
}
|
||||
|
||||
/* Sort out pagination */
|
||||
$pagination = $this->registry->output->generatePagination( array(
|
||||
'totalItems' => intval($count['dracula']),
|
||||
'itemsPerPage' => self::PER_PAGE,
|
||||
'currentStartValue' => $st,
|
||||
'baseUrl' => "showuser={$member['member_id']}&tab=reputation&app_tab={$app}&type={$type}",
|
||||
'seoTitle' => $member['members_seo_name'],
|
||||
'seoTemplate' => 'showuser'
|
||||
) );
|
||||
|
||||
/* Process Results */
|
||||
$processedResults = $reputationClass->display( $results );
|
||||
}
|
||||
|
||||
/* Display processed results */
|
||||
return $this->registry->getClass('output')->getTemplate('profile')->tabReputation( $member, $app, $type, $supportedApps, $processedResults, $pagination );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Config for about me tab
|
||||
* Last Updated: $Date: 2010-12-17 07:40:13 -0500 (Fri, 17 Dec 2010) $
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 7442 $
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Profile Plugin Library
|
||||
* Last Updated: $Date: 2011-08-25 07:46:38 -0400 (Thu, 25 Aug 2011) $
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: mmecham $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 9413 $
|
||||
* @version $Revision: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,421 +1,421 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Report Center :: Private Messages plugin
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @author Based on original "Report Center" by Luke Scott
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
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 Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Holds extra data for the plugin
|
||||
*
|
||||
* @var array Data specific to the plugin
|
||||
*/
|
||||
public $_extra;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e 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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @param array New reports
|
||||
* @param array New members cache
|
||||
* @return boolean
|
||||
*/
|
||||
public function updateReportsTimestamp( $new_reports, &$new_members_cache )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get report permissions
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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&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&module=messaging&section=view&do=showConversation&topicID=" . $ex_form_data['topic'] . "&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
|
||||
*
|
||||
* @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&module=reports&section=reports&do=showMessage&topicID={$report_row['exdat1']}&st={$report_row['exdat3']}&msg={$report_row['exdat2']}",
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a report and save the data appropriate
|
||||
*
|
||||
* @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§ion=view&do=showConversation&topicID=' . $topic;
|
||||
|
||||
if( $msg < 1 )
|
||||
{
|
||||
$this->registry->output->showError( 'reports_no_msg', 10167 );
|
||||
}
|
||||
|
||||
$return_data = array();
|
||||
$a_url = str_replace("&", "&", $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&module=messaging&section=view&do=showConversation&topicID=" . $topic . "&st=" . $st . "#msg" . $msg,
|
||||
'REPORT_INDEX' => $rid,
|
||||
'SAVED_URL' => '/index.php?' . $url,
|
||||
'REPORT' => $build_report['report']
|
||||
);
|
||||
|
||||
return $return_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts an array of data from rc_reports_index and returns an array formatted nearly identical to processReport()
|
||||
*
|
||||
* @param array Report data
|
||||
* @return array Formatted report data
|
||||
*/
|
||||
public function formatReportData( $report_data )
|
||||
{
|
||||
return array(
|
||||
'REDIRECT_URL' => $report_data['url'],
|
||||
'REPORT_INDEX' => $report_data['id'],
|
||||
'SAVED_URL' => str_replace( '&', '&', $report_data['url'] ),
|
||||
'REPORT' => '',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Where to send user after report is submitted
|
||||
*
|
||||
* @param array Report data
|
||||
* @return @e 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
|
||||
*
|
||||
* @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' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'noti.*',
|
||||
'from' => array( 'rc_modpref' => 'noti' ),
|
||||
'where' => 'mem.member_id=noti.mem_id',
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
if( $this->DB->getTotalRows() > 0 )
|
||||
{
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$notify[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
return $notify;
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Report Center :: Private Messages plugin
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </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/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
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 Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Holds extra data for the plugin
|
||||
*
|
||||
* @var array Data specific to the plugin
|
||||
*/
|
||||
public $_extra;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e 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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @param array New reports
|
||||
* @param array New members cache
|
||||
* @return boolean
|
||||
*/
|
||||
public function updateReportsTimestamp( $new_reports, &$new_members_cache )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get report permissions
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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&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&module=messaging&section=view&do=showConversation&topicID=" . $ex_form_data['topic'] . "&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
|
||||
*
|
||||
* @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&module=reports&section=reports&do=showMessage&topicID={$report_row['exdat1']}&st={$report_row['exdat3']}&msg={$report_row['exdat2']}",
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a report and save the data appropriate
|
||||
*
|
||||
* @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§ion=view&do=showConversation&topicID=' . $topic;
|
||||
|
||||
if( $msg < 1 )
|
||||
{
|
||||
$this->registry->output->showError( 'reports_no_msg', 10167 );
|
||||
}
|
||||
|
||||
$return_data = array();
|
||||
$a_url = str_replace("&", "&", $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&module=messaging&section=view&do=showConversation&topicID=" . $topic . "&st=" . $st . "#msg" . $msg,
|
||||
'REPORT_INDEX' => $rid,
|
||||
'SAVED_URL' => '/index.php?' . $url,
|
||||
'REPORT' => $build_report['report']
|
||||
);
|
||||
|
||||
return $return_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts an array of data from rc_reports_index and returns an array formatted nearly identical to processReport()
|
||||
*
|
||||
* @param array Report data
|
||||
* @return array Formatted report data
|
||||
*/
|
||||
public function formatReportData( $report_data )
|
||||
{
|
||||
return array(
|
||||
'REDIRECT_URL' => $report_data['url'],
|
||||
'REPORT_INDEX' => $report_data['id'],
|
||||
'SAVED_URL' => str_replace( '&', '&', $report_data['url'] ),
|
||||
'REPORT' => '',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Where to send user after report is submitted
|
||||
*
|
||||
* @param array Report data
|
||||
* @return @e 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
|
||||
*
|
||||
* @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' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'noti.*',
|
||||
'from' => array( 'rc_modpref' => 'noti' ),
|
||||
'where' => 'mem.member_id=noti.mem_id',
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
if( $this->DB->getTotalRows() > 0 )
|
||||
{
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$notify[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
return $notify;
|
||||
}
|
||||
}
|
||||
@@ -1,369 +1,369 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Report Center :: Profiles plugin
|
||||
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @author Based on original "Report Center" by Luke Scott
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8644 $
|
||||
*/
|
||||
|
||||
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 Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Holds extra data for the plugin
|
||||
*
|
||||
* @var array Data specific to the plugin
|
||||
*/
|
||||
public $_extra;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e 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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @param array Plugin data for save
|
||||
* @return string Error message
|
||||
*/
|
||||
public function processAdminForm( &$save_data_array )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Update timestamp for report
|
||||
*
|
||||
* @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)
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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("&", "&", $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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts an array of data from rc_reports_index and returns an array formatted nearly identical to processReport()
|
||||
*
|
||||
* @param array Report data
|
||||
* @return array Formatted report data
|
||||
*/
|
||||
public function formatReportData( $report_data )
|
||||
{
|
||||
return array(
|
||||
'REDIRECT_URL' => $report_data['url'],
|
||||
'REPORT_INDEX' => $report_data['id'],
|
||||
'SAVED_URL' => str_replace( '&', '&', $report_data['url'] ),
|
||||
'REPORT' => '',
|
||||
'SEOTITLE' => $report_data['seoname'],
|
||||
'TEMPLATE' => 'showuser',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Where to send user after report is submitted
|
||||
*
|
||||
* @param array Report data
|
||||
* @return @e 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
|
||||
*
|
||||
* @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' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'noti.*',
|
||||
'from' => array( 'rc_modpref' => 'noti' ),
|
||||
'where' => 'mem.member_id=noti.mem_id',
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
if( $this->DB->getTotalRows() > 0 )
|
||||
{
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$notify[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
return $notify;
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Report Center :: Profiles plugin
|
||||
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </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/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
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 Object Shortcuts
|
||||
*
|
||||
* @var $registry
|
||||
* @var $DB
|
||||
* @var $settings
|
||||
* @var $request
|
||||
* @var $lang
|
||||
* @var $member
|
||||
* @var $memberData
|
||||
* @var $cache
|
||||
* @var $caches
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
|
||||
/**
|
||||
* Holds extra data for the plugin
|
||||
*
|
||||
* @var array Data specific to the plugin
|
||||
*/
|
||||
public $_extra;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e 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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @param array Plugin data for save
|
||||
* @return string Error message
|
||||
*/
|
||||
public function processAdminForm( &$save_data_array )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Update timestamp for report
|
||||
*
|
||||
* @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)
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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("&", "&", $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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Accepts an array of data from rc_reports_index and returns an array formatted nearly identical to processReport()
|
||||
*
|
||||
* @param array Report data
|
||||
* @return array Formatted report data
|
||||
*/
|
||||
public function formatReportData( $report_data )
|
||||
{
|
||||
return array(
|
||||
'REDIRECT_URL' => $report_data['url'],
|
||||
'REPORT_INDEX' => $report_data['id'],
|
||||
'SAVED_URL' => str_replace( '&', '&', $report_data['url'] ),
|
||||
'REPORT' => '',
|
||||
'SEOTITLE' => $report_data['seoname'],
|
||||
'TEMPLATE' => 'showuser',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Where to send user after report is submitted
|
||||
*
|
||||
* @param array Report data
|
||||
* @return @e 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
|
||||
*
|
||||
* @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' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'noti.*',
|
||||
'from' => array( 'rc_modpref' => 'noti' ),
|
||||
'where' => 'mem.member_id=noti.mem_id',
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
if( $this->DB->getTotalRows() > 0 )
|
||||
{
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$notify[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
return $notify;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Config file
|
||||
* Last Updated: $Date: 2011-04-14 23:16:18 -0400 (Thu, 14 Apr 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8347 $
|
||||
*/
|
||||
|
||||
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;
|
||||
$CONFIG['can_vnc_filter_by_followed'] = 0;
|
||||
$CONFIG['can_vnc_unread_content'] = 0;
|
||||
|
||||
/* Can fetch user generated content */
|
||||
$CONFIG['can_userContent'] = 1;
|
||||
|
||||
/* Content types, put the default one first */
|
||||
if( $_REQUEST['do'] == 'user_activity' )
|
||||
{
|
||||
$CONFIG['contentTypes'] = array( 'comments' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$CONFIG['contentTypes'] = array( 'members', 'comments' );
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Config file
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
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;
|
||||
$CONFIG['can_vnc_filter_by_followed'] = 0;
|
||||
$CONFIG['can_vnc_unread_content'] = 0;
|
||||
|
||||
/* Can fetch user generated content */
|
||||
$CONFIG['can_userContent'] = 1;
|
||||
|
||||
/* Content types, put the default one first */
|
||||
if( $_REQUEST['do'] == 'user_activity' )
|
||||
{
|
||||
$CONFIG['contentTypes'] = array( 'comments' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$CONFIG['contentTypes'] = array( 'members', 'comments' );
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,81 +1,81 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Returns HTML for the form (optional class, not required)
|
||||
* Last Updated: $Date: 2011-04-14 23:16:18 -0400 (Thu, 14 Apr 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8347 $
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @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'.
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fetchSortIn()
|
||||
{
|
||||
if( $this->request['do'] == 'user_activity' )
|
||||
{
|
||||
$array = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$array = array( 0 => array( 'members', $this->lang->words['s_msin_members'] ),
|
||||
1 => array( 'comments', $this->lang->words['s_msin_comments'] ) );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Returns HTML for the form (optional class, not required)
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @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'.
|
||||
*
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fetchSortIn()
|
||||
{
|
||||
if( $this->request['do'] == 'user_activity' )
|
||||
{
|
||||
$array = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$array = array( 0 => array( 'members', $this->lang->words['s_msin_members'] ),
|
||||
1 => array( 'comments', $this->lang->words['s_msin_comments'] ) );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,234 +1,249 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* Formats forum search results
|
||||
* Last Updated: $Date: 2011-06-15 07:22:24 -0400 (Wed, 15 Jun 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 9043 $
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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') == 'comments' ? 'memberCommentsSearchResult' : 'memberSearchResult';
|
||||
|
||||
return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->$template( $data, IPSSearchRegistry::get('opt.searchType') == 'titles' ? true : false ), 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats / grabs extra data for results
|
||||
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function processResults( $ids )
|
||||
{
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
|
||||
{
|
||||
return $this->processResultsComments( $ids );
|
||||
}
|
||||
else
|
||||
{
|
||||
$rows = array();
|
||||
|
||||
foreach( $ids as $i => $d )
|
||||
{
|
||||
$rows[ $i ] = $this->genericizeResults( $d );
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats / grabs extra data for results
|
||||
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
|
||||
*
|
||||
* @param array $ids Ids
|
||||
* @return array
|
||||
*/
|
||||
public function processResultsComments( $ids )
|
||||
{
|
||||
/* INIT */
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
$search_term = IPSSearchRegistry::get('in.clean_search_term');
|
||||
$content_title_only = IPSSearchRegistry::get('opt.searchType') == 'content' ? false : true;
|
||||
$members = array();
|
||||
$results = array();
|
||||
$statusIds = array();
|
||||
$replyIds = IPSSearchRegistry::get('_internal.replyIds');
|
||||
$replyData = IPSSearchRegistry::get('_internal.replyData');
|
||||
$replies = array();
|
||||
$sortKey = '';
|
||||
|
||||
/* Got some? */
|
||||
if ( count( $ids ) )
|
||||
{
|
||||
/* Set vars */
|
||||
IPSSearch::$ask = 'status_date';
|
||||
IPSSearch::$aso = strtolower( $sort_order );
|
||||
IPSSearch::$ast = 'numerical';
|
||||
|
||||
/* Get the status updates */
|
||||
$this->DB->build( array('select' => "s.*",
|
||||
'from' => array( 'member_status_updates' => 's' ),
|
||||
'where' => 's.status_id IN( ' . implode( ',', $ids ) . ')',
|
||||
'add_join' => array_merge( array( array( 'select' => 'm.member_id as owner_id, m.members_display_name as owner_display_name, m.members_seo_name as owner_seo_name',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=s.status_member_id',
|
||||
'type' => 'left' ),
|
||||
array( 'select' => 'mem.member_id as author_id, mem.members_display_name as author_display_name, mem.members_seo_name as author_seo_name',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_id=s.status_author_id',
|
||||
'type' => 'left' ) ) ) ) );
|
||||
|
||||
/* Grab data */
|
||||
$this->DB->execute();
|
||||
|
||||
/* Grab the results */
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$statusIds[ $row['status_id'] ] = $row;
|
||||
}
|
||||
|
||||
/* Sort */
|
||||
if ( count( $statusIds ) )
|
||||
{
|
||||
usort( $statusIds, array("IPSSearch", "usort") );
|
||||
|
||||
foreach( $statusIds as $id => $row )
|
||||
{
|
||||
/* Do we have any reply data? */
|
||||
if ( ! empty( $replyData[ $id ] ) )
|
||||
{
|
||||
$row = array_merge( $row, $replyData[ $id ] );
|
||||
}
|
||||
|
||||
/* Get author data? */
|
||||
if ( ! empty( $row['status_author_id'] ) )
|
||||
{
|
||||
$members[ $row['status_author_id'] ] = $row['status_author_id'];
|
||||
}
|
||||
|
||||
if ( ! empty( $row['status_member_id'] ) )
|
||||
{
|
||||
$members[ $row['status_member_id'] ] = $row['status_member_id'];
|
||||
}
|
||||
|
||||
if ( ! empty( $row['reply_member_id'] ) )
|
||||
{
|
||||
$members[ $row['reply_member_id'] ] = $row['reply_member_id'];
|
||||
}
|
||||
|
||||
$results[ $row['status_id'] ] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
/* Need to load members? */
|
||||
if ( count( $members ) )
|
||||
{
|
||||
$mems = IPSMember::load( $members, 'all' );
|
||||
|
||||
foreach( $results as $id => $r )
|
||||
{
|
||||
$_status_member = IPSMember::buildDisplayData( $mems[ $r['status_member_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
|
||||
$_status_author = IPSMember::buildDisplayData( $mems[ $r['status_author_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
|
||||
|
||||
$results[ $id ]['status_member'] = $_status_member;
|
||||
$results[ $id ]['status_author'] = $_status_author;
|
||||
|
||||
if ( ! empty( $r['reply_member_id'] ) )
|
||||
{
|
||||
$results[ $id ]['reply_author'] = IPSMember::buildDisplayData( $mems[ $r['reply_member_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reassigns fields in a generic way for results output
|
||||
*
|
||||
* @param array $r
|
||||
* @return array
|
||||
*/
|
||||
public function genericizeResults( $r )
|
||||
{
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
|
||||
{
|
||||
$r['app'] = 'members';
|
||||
$r['content'] = $r['comment_content'];
|
||||
$r['content_title'] = $r['member_display_name_owner'];
|
||||
$r['updated'] = $r['comment_date'];
|
||||
$r['type_2'] = 'comment_id';
|
||||
$r['type_id_2'] = $r['comment_id'];
|
||||
$r['misc'] = serialize( array(
|
||||
'members_display_name' => $r['members_display_name'],
|
||||
'pp_thumb_photo' => $r['pp_thumb_photo'],
|
||||
'pp_thumb_width' => $r['pp_thumb_width'],
|
||||
'pp_thumb_height' => $r['pp_thumb_height']
|
||||
) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$r['app'] = 'members';
|
||||
$r['content'] = $r['signature'] . ' ' . $r['pp_about_me'];
|
||||
$r['content_title'] = $r['members_display_name'];
|
||||
$r['updated'] = time();
|
||||
$r['type_2'] = 'profile_view';
|
||||
$r['type_id_2'] = $r['member_id'];
|
||||
$r['misc'] = serialize( array(
|
||||
'pp_thumb_photo' => $r['pp_thumb_photo'],
|
||||
'pp_thumb_width' => $r['pp_thumb_width'],
|
||||
'pp_thumb_height' => $r['pp_thumb_height']
|
||||
) );
|
||||
}
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.3.4
|
||||
* Formats forum search results
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*/
|
||||
|
||||
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 );
|
||||
|
||||
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse search results
|
||||
*
|
||||
* @param array $r Search result
|
||||
* @return array $html Blocks of HTML
|
||||
*/
|
||||
public function parseAndFetchHtmlBlocks( $rows )
|
||||
{
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
|
||||
{
|
||||
$this->registry->getClass('output')->addJSModule( 'status', 0 );
|
||||
}
|
||||
|
||||
return parent::parseAndFetchHtmlBlocks( $rows );
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats the forum search result for display
|
||||
*
|
||||
* @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') == 'comments' ? 'memberCommentsSearchResult' : 'memberSearchResult';
|
||||
|
||||
if ( $data['status_last_ids'] )
|
||||
{
|
||||
foreach ( unserialize( $data['status_last_ids'] ) as $_data )
|
||||
{
|
||||
$data['replies'][ $_data['reply_id'] ] = array_merge( $_data, IPSMember::buildDisplayData( $_data['reply_member_id'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
return array( ipsRegistry::getClass('output')->getTemplate('search')->$template( $data, IPSSearchRegistry::get('opt.searchType') == 'titles' ? true : false ), 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats / grabs extra data for results
|
||||
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function processResults( $ids )
|
||||
{
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
|
||||
{
|
||||
return $this->processResultsComments( $ids );
|
||||
}
|
||||
else
|
||||
{
|
||||
$rows = array();
|
||||
|
||||
foreach( $ids as $i => $d )
|
||||
{
|
||||
$rows[ $i ] = $this->genericizeResults( $d );
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats / grabs extra data for results
|
||||
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
|
||||
*
|
||||
* @param array $ids Ids
|
||||
* @return array
|
||||
*/
|
||||
public function processResultsComments( $ids )
|
||||
{
|
||||
/* INIT */
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
$search_term = IPSSearchRegistry::get('in.clean_search_term');
|
||||
$content_title_only = IPSSearchRegistry::get('opt.searchType') == 'content' ? false : true;
|
||||
$members = array();
|
||||
$results = array();
|
||||
$statusIds = array();
|
||||
$replyIds = IPSSearchRegistry::get('_internal.replyIds');
|
||||
$replyData = IPSSearchRegistry::get('_internal.replyData');
|
||||
$replies = array();
|
||||
$sortKey = '';
|
||||
|
||||
/* Got some? */
|
||||
if ( count( $ids ) )
|
||||
{
|
||||
/* Set vars */
|
||||
IPSSearch::$ask = 'status_date';
|
||||
IPSSearch::$aso = strtolower( $sort_order );
|
||||
IPSSearch::$ast = 'numerical';
|
||||
|
||||
/* Get the status updates */
|
||||
$this->DB->build( array('select' => "s.*",
|
||||
'from' => array( 'member_status_updates' => 's' ),
|
||||
'where' => 's.status_id IN( ' . implode( ',', $ids ) . ')',
|
||||
'add_join' => array_merge( array( array( 'select' => 'm.member_id as owner_id, m.members_display_name as owner_display_name, m.members_seo_name as owner_seo_name',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=s.status_member_id',
|
||||
'type' => 'left' ),
|
||||
array( 'select' => 'mem.member_id as author_id, mem.members_display_name as author_display_name, mem.members_seo_name as author_seo_name',
|
||||
'from' => array( 'members' => 'mem' ),
|
||||
'where' => 'mem.member_id=s.status_author_id',
|
||||
'type' => 'left' ) ) ) ) );
|
||||
|
||||
/* Grab data */
|
||||
$this->DB->execute();
|
||||
|
||||
/* Grab the results */
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$statusIds[ $row['status_id'] ] = $row;
|
||||
}
|
||||
|
||||
/* Sort */
|
||||
if ( count( $statusIds ) )
|
||||
{
|
||||
usort( $statusIds, array("IPSSearch", "usort") );
|
||||
|
||||
foreach( $statusIds as $id => $row )
|
||||
{
|
||||
/* Do we have any reply data? */
|
||||
if ( ! empty( $replyData[ $id ] ) )
|
||||
{
|
||||
$row = array_merge( $row, $replyData[ $id ] );
|
||||
}
|
||||
|
||||
/* Get author data? */
|
||||
if ( ! empty( $row['status_author_id'] ) )
|
||||
{
|
||||
$members[ $row['status_author_id'] ] = $row['status_author_id'];
|
||||
}
|
||||
|
||||
if ( ! empty( $row['status_member_id'] ) )
|
||||
{
|
||||
$members[ $row['status_member_id'] ] = $row['status_member_id'];
|
||||
}
|
||||
|
||||
if ( ! empty( $row['reply_member_id'] ) )
|
||||
{
|
||||
$members[ $row['reply_member_id'] ] = $row['reply_member_id'];
|
||||
}
|
||||
|
||||
$results[ $row['status_id'] ] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
/* Need to load members? */
|
||||
if ( count( $members ) )
|
||||
{
|
||||
$mems = IPSMember::load( $members, 'all' );
|
||||
|
||||
foreach( $results as $id => $r )
|
||||
{
|
||||
$_status_member = IPSMember::buildDisplayData( $mems[ $r['status_member_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
|
||||
$_status_author = IPSMember::buildDisplayData( $mems[ $r['status_author_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
|
||||
|
||||
$results[ $id ]['status_member'] = $_status_member;
|
||||
$results[ $id ]['status_author'] = $_status_author;
|
||||
|
||||
if ( ! empty( $r['reply_member_id'] ) )
|
||||
{
|
||||
$results[ $id ]['reply_author'] = IPSMember::buildDisplayData( $mems[ $r['reply_member_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $results;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reassigns fields in a generic way for results output
|
||||
*
|
||||
* @param array $r
|
||||
* @return array
|
||||
*/
|
||||
public function genericizeResults( $r )
|
||||
{
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
|
||||
{
|
||||
$r['app'] = 'members';
|
||||
$r['content'] = $r['comment_content'];
|
||||
$r['content_title'] = $r['member_display_name_owner'];
|
||||
$r['updated'] = $r['comment_date'];
|
||||
$r['type_2'] = 'comment_id';
|
||||
$r['type_id_2'] = $r['comment_id'];
|
||||
$r['misc'] = serialize( array(
|
||||
'members_display_name' => $r['members_display_name'],
|
||||
'pp_thumb_photo' => $r['pp_thumb_photo'],
|
||||
'pp_thumb_width' => $r['pp_thumb_width'],
|
||||
'pp_thumb_height' => $r['pp_thumb_height']
|
||||
) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$r['app'] = 'members';
|
||||
$r['content'] = $r['signature'] . ' ' . $r['pp_about_me'];
|
||||
$r['content_title'] = $r['members_display_name'];
|
||||
$r['updated'] = time();
|
||||
$r['type_2'] = 'profile_view';
|
||||
$r['type_id_2'] = $r['member_id'];
|
||||
$r['misc'] = serialize( array(
|
||||
'pp_thumb_photo' => $r['pp_thumb_photo'],
|
||||
'pp_thumb_width' => $r['pp_thumb_width'],
|
||||
'pp_thumb_height' => $r['pp_thumb_height']
|
||||
) );
|
||||
}
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -3,16 +3,16 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Sphinx template file
|
||||
* Last Updated: $Date: 2011-06-02 17:57:20 -0400 (Thu, 02 Jun 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @link http://hatynka.in
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 8953 $
|
||||
* @since 3.0.0
|
||||
*
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* @file warnings.php Warnings extension for members
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: http://www.invisionpower.com/company/standards.php#license$
|
||||
* $Author: ips_terabyte $ (Original: Mark)
|
||||
* @since -
|
||||
* $LastChangedDate: 2010-10-14 13:11:17 -0400 (Thu, 14 Oct 2010) $
|
||||
* @version v3.3.4
|
||||
* $Revision: 477 $
|
||||
*/
|
||||
|
||||
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 warnings_members
|
||||
* @brief Warnings Extension for members
|
||||
*/
|
||||
class warnings_members
|
||||
{
|
||||
/**
|
||||
* Get Content URL
|
||||
*
|
||||
* @param array $warning Row from members_warn_logs
|
||||
* @return @e array array( url => URL to the content the warning came from, title => Title )
|
||||
*/
|
||||
public function getContentUrl( $warning )
|
||||
{
|
||||
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
|
||||
if ( $warning['wl_content_id1'] )
|
||||
{
|
||||
$post = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', 'from' => 'message_posts', 'where' => "msg_id=" . intval( $warning['wl_content_id1'] ) ) );
|
||||
|
||||
if ( ! empty($post['msg_topic_id']) )
|
||||
{
|
||||
$topic = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', 'from' => 'message_topics', 'where' => "mt_id={$post['msg_topic_id']}" ) );
|
||||
|
||||
if ( ! empty($topic['mt_id']) )
|
||||
{
|
||||
ipsRegistry::DB()->build( array( 'select' => '*', 'from' => 'message_topic_user_map', 'where' => "map_topic_id={$post['msg_topic_id']}" ) );
|
||||
ipsRegistry::DB()->execute();
|
||||
|
||||
while ( $row = ipsRegistry::DB()->fetch() )
|
||||
{
|
||||
if ( $row['map_user_id'] == ipsRegistry::member()->getProperty('member_id') )
|
||||
{
|
||||
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=members&module=messaging&section=view&do=findMessage&topicID={$topic['mt_id']}&msgID={$post['msg_id']}" ), 'title' => $topic['mt_title'] );
|
||||
}
|
||||
}
|
||||
|
||||
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=core&module=reports§ion=reports&do=showMessage&topicID={$topic['mt_id']}&msg={$post['msg_id']}" ), 'title' => $topic['mt_title'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$member = IPSMember::load( $warning['wl_member'] );
|
||||
|
||||
if ( ! empty($member['member_id']))
|
||||
{
|
||||
return array( 'url' => ipsRegistry::getClass('output')->buildSEOUrl( "showuser={$member['member_id']}", 'public', $member['members_seo_name'], 'showuser' ), 'title' => ipsRegistry::getClass('class_localization')->words['warnings_profile'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user