Version 3.3.4

This commit is contained in:
Neo committed 2025-12-19 00:35:52 -08:00
1 parent 78706903a2
commit fb6b5baabc
2206 files changed
+409828 -382984

No files matched your search

@@ -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']}&amp;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 -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -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']}&amp;tab=reputation&amp;app_tab={$app}&amp;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 $
*
*/