Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Profile AJAX hCard
|
||||
* Last Updated: $Date: 2010-09-08 12:09:02 -0400 (Wed, 08 Sep 2010) $
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 6840 $
|
||||
* @version $Revision: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,9 +30,8 @@ class public_members_ajax_card extends ipsAjaxCommand
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -98,7 +97,7 @@ class public_members_ajax_card extends ipsAjaxCommand
|
||||
/* Reputation */
|
||||
if ( $this->settings['reputation_protected_groups'] )
|
||||
{
|
||||
if ( in_array( $this->memberData['member_group_id'], explode( ",", $this->settings['reputation_protected_groups'] ) ) )
|
||||
if ( in_array( $member['member_group_id'], explode( ",", $this->settings['reputation_protected_groups'] ) ) )
|
||||
{
|
||||
$this->settings['reputation_show_profile'] = false;
|
||||
}
|
||||
|
||||
@@ -1,234 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile AJAX Comment Handler
|
||||
* Last Updated: $Date: 2010-09-07 14:10:16 -0400 (Tue, 07 Sep 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 6834 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_comments extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Comments library
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $comments;
|
||||
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/comments.php', 'profileCommentsLib', 'members' );
|
||||
$this->comments = new $classToLoad( $this->registry );
|
||||
|
||||
switch( $this->request[ 'do' ] )
|
||||
{
|
||||
case 'view':
|
||||
default:
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( intval( $this->request['member_id'] ) ) ) );
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
$this->_addComment();
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$this->_deleteComment();
|
||||
break;
|
||||
|
||||
case 'approve':
|
||||
$this->_approveComment();
|
||||
break;
|
||||
|
||||
case 'reload':
|
||||
$this->_reloadComment();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Approve a comment on member's profile
|
||||
*
|
||||
* @access protected
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
protected function _approveComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$comment_id = intval( $this->request['comment_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete
|
||||
//-----------------------------------------
|
||||
|
||||
$result = $this->comments->approveComment( $member_id, $comment_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( $member_id ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload comments
|
||||
*
|
||||
* @access protected
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-15
|
||||
*/
|
||||
protected function _reloadComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Regenerate comments...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->returnHtml( $this->comments->buildComments( $member ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a comment on member's profile
|
||||
*
|
||||
* @access protected
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
protected function _deleteComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$comment_id = intval( $this->request['comment_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete
|
||||
//-----------------------------------------
|
||||
|
||||
$result = $this->comments->deleteComment( $member_id, $comment_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( $member_id ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Saves a comment on member's profile
|
||||
*
|
||||
* @access protected
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
protected function _addComment()
|
||||
{
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
|
||||
$result = $this->comments->addCommentToDB( $member_id, IPSText::parseCleanValue( $_POST['comment'] ) );
|
||||
|
||||
/* Check for error */
|
||||
if( $result AND $result != 'pp_comment_added_mod' )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( $member_id ), 0, '' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Profile display name history
|
||||
* Last Updated: $Date: 2010-04-15 15:46:26 -0400 (Thu, 15 Apr 2010) $
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 6133 $
|
||||
* @version $Revision: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,9 +30,8 @@ class public_members_ajax_dname extends ipsAjaxCommand
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Member AJAX DST switcher
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 5713 $
|
||||
* @version $Revision: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,9 +30,8 @@ class public_members_ajax_dst extends ipsAjaxCommand
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Profile AJAX Comment Handler
|
||||
* Last Updated: $Date: 2010-07-14 17:57:17 -0400 (Wed, 14 Jul 2010) $
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 6651 $
|
||||
* @version $Revision: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,17 +30,15 @@ class public_members_ajax_friends extends ipsAjaxCommand
|
||||
/**
|
||||
* Friends library
|
||||
*
|
||||
* @access private
|
||||
* @var object
|
||||
*/
|
||||
private $friends;
|
||||
protected $friends;
|
||||
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -62,94 +60,16 @@ class public_members_ajax_friends extends ipsAjaxCommand
|
||||
|
||||
case 'remove':
|
||||
$this->_removeFriend();
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
$this->_iframeList();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the content for the friends tab
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-15
|
||||
*/
|
||||
private function _iframeList()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$content = '';
|
||||
$friends = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->returnString( $this->lang->words['nofriendid'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab the friends
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'f.*',
|
||||
'from' => array( 'profile_friends' => 'f' ),
|
||||
'where' => 'f.friends_member_id=' . $member_id . ' AND f.friends_approved=1',
|
||||
'order' => 'm.members_display_name ASC',
|
||||
'add_join' => array(
|
||||
1 => array( 'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'pp.pp_member_id=f.friends_friend_id',
|
||||
'type' => 'left' ),
|
||||
2 => array( 'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=f.friends_friend_id',
|
||||
'type' => 'left' )
|
||||
)
|
||||
) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// Get and store...
|
||||
//-----------------------------------------
|
||||
|
||||
while( $row = $this->DB->fetch($outer) )
|
||||
{
|
||||
$row['members_display_name_short'] = IPSText::truncate( $row['members_display_name'], 13 );
|
||||
|
||||
$friends[] = IPSMember::buildDisplayData( $row, 0 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Ok.. show the friends
|
||||
//-----------------------------------------
|
||||
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->friendsIframe( $member, $friends );
|
||||
|
||||
$this->returnHtml( $content );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a friend
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
private function _addFriend()
|
||||
protected function _addFriend()
|
||||
{
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
@@ -177,10 +97,9 @@ class public_members_ajax_friends extends ipsAjaxCommand
|
||||
/**
|
||||
* Removes a friend
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
private function _removeFriend()
|
||||
protected function _removeFriend()
|
||||
{
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Profile AJAX Ignore User
|
||||
* Last Updated: $Date: 2010-10-21 07:08:38 -0400 (Thu, 21 Oct 2010) $
|
||||
* 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 http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 7007 $
|
||||
* @version $Revision: 8644 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -29,7 +29,7 @@ class public_members_ajax_ignore extends ipsAjaxCommand
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
<a href="http://www.invisionpower.com">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Profile AJAX Tab Loader
|
||||
* Last Updated: $Date: 2010-10-21 07:08:38 -0400 (Thu, 21 Oct 2010) $
|
||||
* 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 http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 7007 $
|
||||
* @version $Revision: 8644 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -29,7 +29,7 @@ class public_members_ajax_load extends ipsAjaxCommand
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -75,12 +75,12 @@ class public_members_ajax_load extends ipsAjaxCommand
|
||||
// Load config
|
||||
//-----------------------------------------
|
||||
|
||||
if( !file_exists( IPSLib::getAppDir( $app ) . '/extensions/profileTabs/' . $tab . '.conf.php' ) )
|
||||
if( !is_file( IPSLib::getAppDir( $app ) . '/extensions/profileTabs/' . $tab . '.conf.php' ) )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
require( IPSLib::getAppDir( $app ) . '/extensions/profileTabs/' . $tab . '.conf.php' );
|
||||
require( IPSLib::getAppDir( $app ) . '/extensions/profileTabs/' . $tab . '.conf.php' );/*noLibHook*/
|
||||
|
||||
//-----------------------------------------
|
||||
// Active?
|
||||
@@ -95,12 +95,12 @@ class public_members_ajax_load extends ipsAjaxCommand
|
||||
// Load main class...
|
||||
//-----------------------------------------
|
||||
|
||||
if( !file_exists( IPSLib::getAppDir( $app ) . '/extensions/profileTabs/' . $tab . '.php' ) )
|
||||
if( !is_file( IPSLib::getAppDir( $app ) . '/extensions/profileTabs/' . $tab . '.php' ) )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
require( IPSLib::getAppDir( 'members' ) . '/sources/tabs/pluginParentClass.php' );
|
||||
require( IPSLib::getAppDir( 'members' ) . '/sources/tabs/pluginParentClass.php' );/*noLibHook*/
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $app ) . '/extensions/profileTabs/' . $tab . '.php', 'profile_' . $tab, $app );
|
||||
$plugin = new $classToLoad( $this->registry );
|
||||
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Profile AJAX Ignored User methods
|
||||
* Last Updated: $Date: 2010-10-05 21:26:08 -0400 (Tue, 05 Oct 2010) $
|
||||
* Last Updated: $Date: 2011-09-13 21:55:41 -0400 (Tue, 13 Sep 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since Thursday 26th June 2008
|
||||
* @version $Revision: 6945 $
|
||||
* @version $Revision: 9487 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
/**
|
||||
* Messenger library
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $messengerFunctions;
|
||||
@@ -38,9 +37,8 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -76,15 +74,68 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
break;
|
||||
case 'archiveConversation':
|
||||
$this->_archiveConversation();
|
||||
break;
|
||||
case 'getInboxDropDown':
|
||||
$this->_getInboxDropDown();
|
||||
break;
|
||||
case 'sigCloseMenu':
|
||||
$this->_sigCloseMenu();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function _sigCloseMenu()
|
||||
{
|
||||
$this->lang->loadLanguageFile( array( 'public_topic', 'public_mod' ), 'forums' );
|
||||
|
||||
$msgid = intval( $this->request['msgid'] );
|
||||
|
||||
/* Fetch post */
|
||||
$msg = $this->messengerFunctions->fetchMessageDataById( $msgid, true );
|
||||
|
||||
if ( $this->messengerFunctions->canAccessTopic( $this->memberData['member_id'], $msg['msg_topic_id'] ) )
|
||||
{
|
||||
return $this->returnHtml( $this->registry->output->getTemplate('topic')->ajaxSigCloseMenu( $msg ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnJsonError( 'nopermission' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the last 10 Pms or whatever.
|
||||
*
|
||||
* @return string HTML to be returned via ajax
|
||||
* @since IPB 3.1.0.2011-03-24
|
||||
*/
|
||||
protected function _getInboxDropDown()
|
||||
{
|
||||
if ( ! $this->messengerFunctions->canUsePMSystem( $this->memberData ) )
|
||||
{
|
||||
$this->returnJsonError( 'cannotUsePMSystem' );
|
||||
}
|
||||
|
||||
$this->lang->loadLanguageFile( array( 'public_messaging' ), 'members' );
|
||||
|
||||
/* Alright. Fetch the last 10 */
|
||||
//$this->messengerFunctions->addFolderFilter('myconvo');
|
||||
|
||||
$topics = $this->messengerFunctions->getPersonalTopicsList( $this->memberData['member_id'], 'myconvo', array( 'sort' => 'date', 'offsetStart' => 0, 'offsetEnd' => 10 ) );
|
||||
$topics = ( ! is_array( $topics ) ) ? array() : $topics;
|
||||
|
||||
/* reset */
|
||||
$this->messengerFunctions->resetMembersAlertCounts( $this->memberData );
|
||||
|
||||
$this->returnJsonArray( array( 'html' => $this->cleanOutput( $this->registry->output->getTemplate('global_other')->inboxList( $topics ) ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Archives the conversation
|
||||
*
|
||||
* @access protected
|
||||
* @return string HTML to be returned via ajax
|
||||
* @since IPB 3.1.2.2010-07-07
|
||||
*/
|
||||
@@ -157,7 +208,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
/**
|
||||
* Sends the PM
|
||||
*
|
||||
* @access protected
|
||||
* @return string HTML to be returned via ajax
|
||||
* @since IPB 3.0.0.2008-06-25
|
||||
*/
|
||||
@@ -176,8 +226,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
$msgContent = $this->convertHtmlEntities( $this->convertUnicode( $_POST['Post'] ) );
|
||||
$msgTitle = IPSText::parseCleanValue( $this->convertHtmlEntities( $this->convertUnicode( $_POST['subject'] ) ) );
|
||||
$this->request['Post'] = IPSText::parseCleanValue( $_POST['Post'] );
|
||||
$_trackMsg = intval( $this->request['trackMsg'] );
|
||||
$_addToSent = intval( $this->request['addToSent'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check viewing permissions, etc
|
||||
@@ -198,12 +246,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
$this->returnJsonError( 'cannotUsePMSystem' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Reset Classes
|
||||
//-----------------------------------------
|
||||
|
||||
IPSText::resetTextClass('editor');
|
||||
|
||||
//-----------------------------------------
|
||||
// Load lang file
|
||||
//-----------------------------------------
|
||||
@@ -227,12 +269,7 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
|
||||
try
|
||||
{
|
||||
$this->messengerFunctions->sendNewPersonalTopic( $toMemberID, $this->memberData['member_id'], array(), $msgTitle, $msgContent, array( 'origMsgID' => 0,
|
||||
'fromMsgID' => 0,
|
||||
'postKey' => md5(microtime()),
|
||||
'trackMsg' => $_trackMsg,
|
||||
'addToSentFolder' => $_addToSent,
|
||||
'hideCCUser' => 0 ) );
|
||||
$this->messengerFunctions->sendNewPersonalTopic( $toMemberID, $this->memberData['member_id'], array(), $msgTitle, $msgContent );
|
||||
|
||||
return $this->returnJsonArray( array( 'status' => 'sent' ) );
|
||||
}
|
||||
@@ -267,7 +304,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
/**
|
||||
* Shows the quick PM form
|
||||
*
|
||||
* @access protected
|
||||
* @return string HTML to be returned via ajax
|
||||
* @since IPB 3.0.0.2008-06-25
|
||||
*/
|
||||
@@ -326,7 +362,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
/**
|
||||
* Returns PM notification
|
||||
*
|
||||
* @access protected
|
||||
* @return string JSON either error or status
|
||||
* @since IPB 3.0.0.2008-06-25
|
||||
*/
|
||||
@@ -397,7 +432,7 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $msg['mgroup_others'];
|
||||
|
||||
$msg['msg_post'] = IPSText::getTextClass('bbcode')->stripAllTags( strip_tags( str_replace( '<br />', "\n", $msg['msg_post'] ) ) );
|
||||
$msg['msg_post'] = IPSText::getTextClass('bbcode')->wordWrap( $msg['msg_post'], 50, "\n" );
|
||||
$msg['msg_post'] = wordwrap( $msg['msg_post'], 50, "\n" );
|
||||
|
||||
if ( IPSText::mbstrlen( $msg['msg_post'] ) > 300 )
|
||||
{
|
||||
@@ -438,7 +473,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
/**
|
||||
* Empties a folder
|
||||
*
|
||||
* @access protected
|
||||
* @return string JSON either error or status
|
||||
* @since IPB 3.0.0.2008-06-25
|
||||
*/
|
||||
@@ -529,7 +563,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
/**
|
||||
* Renames a folder
|
||||
*
|
||||
* @access protected
|
||||
* @return string JSON either error or status
|
||||
* @since IPB 3.0.0.2008-06-25
|
||||
*/
|
||||
@@ -611,7 +644,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
/**
|
||||
* Removes a folder
|
||||
*
|
||||
* @access protected
|
||||
* @return string JSON either error or status
|
||||
* @since IPB 3.0.0.2008-06-25
|
||||
*/
|
||||
@@ -669,11 +701,31 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
|
||||
//-----------------------------------------
|
||||
// .. and it has no messages
|
||||
// Change May 9 2011 - JS alert already warns that
|
||||
// all messages in folder will be deleted, so just empty and delete
|
||||
// @link http://community.invisionpower.com/tracker/issue-29857-cannot-delete-pm-folder
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $folders[ $folderID ]['count'] > 0 )
|
||||
//if ( $folders[ $folderID ]['count'] > 0 )
|
||||
//{
|
||||
// $this->returnJsonError( 'cannotDeleteHasMessages' );
|
||||
//}
|
||||
|
||||
$messages = $this->messengerFunctions->getPersonalTopicsList( $memberID, $folderID, array( 'offsetStart' => 0, 'offsetEnd' => 100000 ) );
|
||||
|
||||
/* Just grab IDs */
|
||||
$mtids = array_keys( $messages );
|
||||
|
||||
try
|
||||
{
|
||||
$this->returnJsonError( 'cannotDeleteHasMessages' );
|
||||
$this->messengerFunctions->deleteTopics( $memberData['member_id'], $mtids );
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
if( $error->getMessage() != 'NO_IDS_TO_DELETE' )
|
||||
{
|
||||
$this->returnJsonError( $error->getMessage() );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -704,7 +756,6 @@ class public_members_ajax_messenger extends ipsAjaxCommand
|
||||
/**
|
||||
* Adds a folder
|
||||
*
|
||||
* @access protected
|
||||
* @return string JSON either error or status
|
||||
* @since IPB 3.0.0.2008-06-25
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,194 @@
|
||||
<?php
|
||||
/**
|
||||
* @file photo.php Returns a cropped photo for an ajax request
|
||||
*~TERABYTE_DOC_READY~
|
||||
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
|
||||
* $License: This is NULLED!
|
||||
* $Author: mmecham $
|
||||
* @since 7th Feb 2011
|
||||
* $LastChangedDate: 2011-09-08 11:58:29 -0400 (Thu, 08 Sep 2011) $
|
||||
* @version v3.2.3
|
||||
* $Revision: 9467 $
|
||||
*/
|
||||
|
||||
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 public_members_ajax_photo
|
||||
* @brief Returns a cropped photo for an ajax request
|
||||
*
|
||||
*/
|
||||
class public_members_ajax_photo extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Main function executed automatically by the controller
|
||||
*
|
||||
* @param object $registry Registry object
|
||||
* @return @e void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
|
||||
/* Load library */
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/member/photo.php', 'classes_member_photo' );
|
||||
$this->photo = new $classToLoad( $registry );
|
||||
|
||||
switch( $this->request[ 'do' ] )
|
||||
{
|
||||
case 'cropPhoto':
|
||||
$this->_cropPhoto();
|
||||
break;
|
||||
case 'show':
|
||||
$this->_show();
|
||||
break;
|
||||
case 'remove':
|
||||
$this->_remove();
|
||||
break;
|
||||
case 'save':
|
||||
$this->_save();
|
||||
break;
|
||||
case 'importUrl':
|
||||
$this->_importUrl();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Import a photo or image from URL
|
||||
*
|
||||
*/
|
||||
protected function _importUrl()
|
||||
{
|
||||
$url = trim( $this->request['url'] );
|
||||
|
||||
/* Do it */
|
||||
try
|
||||
{
|
||||
/* Check for valid URL */
|
||||
$photo = $this->photo->save( $this->memberData, 'url', '', $url );
|
||||
|
||||
if ( is_array( $photo ) )
|
||||
{
|
||||
$photo = IPSMember::buildDisplayData( IPSMember::load( $this->memberData['member_id'], 'all' ) );
|
||||
$photo['oldThumb'] = $this->memberData['pp_small_photo'];
|
||||
$photo['status'] = 'ok';
|
||||
$photo['thumb'] = $photo['pp_thumb_photo'];
|
||||
$this->returnJsonArray( $photo );
|
||||
}
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
$msg = $error->getMessage();
|
||||
|
||||
switch ( $msg )
|
||||
{
|
||||
default:
|
||||
$this->returnJsonError( $this->lang->words[ $msg ] );
|
||||
break;
|
||||
case 'PROFILE_DISABLED':
|
||||
$this->returnJsonError( 'member_profile_disabled' );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves data
|
||||
*
|
||||
* @return @e void [HTML]
|
||||
*/
|
||||
protected function _save()
|
||||
{
|
||||
$photoType = $this->request['photoType'];
|
||||
$gravatar = $this->request['gravatar'];
|
||||
|
||||
/* Do it */
|
||||
try
|
||||
{
|
||||
$photo = $this->photo->save( $this->memberData, $photoType, $gravatar );
|
||||
|
||||
if ( is_array( $photo ) )
|
||||
{
|
||||
$photo = IPSMember::buildDisplayData( IPSMember::load( $this->memberData['member_id'], 'all' ) );
|
||||
$photo['oldThumb'] = $this->memberData['pp_small_photo'];
|
||||
$photo['status'] = 'ok';
|
||||
$photo['thumb'] = $photo['pp_thumb_photo'];
|
||||
$this->returnJsonArray( $photo );
|
||||
}
|
||||
}
|
||||
catch( Exception $error )
|
||||
{
|
||||
$msg = $error->getMessage();
|
||||
|
||||
switch ( $msg )
|
||||
{
|
||||
default:
|
||||
$this->returnJsonError( $this->lang->words[ 'pp_' . $msg ] );
|
||||
break;
|
||||
case 'PROFILE_DISABLED':
|
||||
$this->returnJsonError( 'member_profile_disabled' );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the photo
|
||||
*
|
||||
* @return @e void [HTML]
|
||||
*/
|
||||
protected function _remove()
|
||||
{
|
||||
$this->photo->remove( $this->memberData['member_id'] );
|
||||
|
||||
$return = IPSMember::buildDisplayData( IPSMember::load( $this->memberData['member_id'], 'all' ) );
|
||||
$return['oldThumb'] = $this->memberData['pp_small_photo'];
|
||||
$return['status'] = 'deleted';
|
||||
$return['thumb'] = $return['pp_thumb_photo'];
|
||||
|
||||
$this->returnJsonArray( $return );
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the photo editor
|
||||
*
|
||||
* @return @e void [HTML]
|
||||
*/
|
||||
protected function _show()
|
||||
{
|
||||
$this->returnHtml( $this->photo->getEditorHtml( $this->memberData ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Crop the chosen photo
|
||||
*
|
||||
* @return @e void [JSON array]
|
||||
*/
|
||||
protected function _cropPhoto()
|
||||
{
|
||||
$x1 = intval( $this->request['x1'] );
|
||||
$x2 = intval( $this->request['x2'] );
|
||||
$y1 = intval( $this->request['y1'] );
|
||||
$y2 = intval( $this->request['y2'] );
|
||||
$dims = array( 'x1' => $x1, 'y1' => $y1, 'x2' => $x2, 'y2' => $y2 );
|
||||
|
||||
/* Crop and fetch return data */
|
||||
$return = $this->photo->cropPhoto( $this->memberData['member_id'], $dims );
|
||||
$member = IPSMember::buildDisplayData( IPSMember::load( $this->memberData['member_id'], 'all' ) );
|
||||
|
||||
if ( $return['status'] == 'ok' )
|
||||
{
|
||||
$this->returnJsonArray( array_merge( $member, $return ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnJsonError('fail');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Profile AJAX Tab Loader
|
||||
* Last Updated: $Date: 2010-07-14 23:29:48 -0400 (Wed, 14 Jul 2010) $
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 6655 $
|
||||
* @version $Revision: 8644 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,9 +30,8 @@ class public_members_ajax_rate extends ipsAjaxCommand
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -151,10 +150,9 @@ class public_members_ajax_rate extends ipsAjaxCommand
|
||||
/**
|
||||
* Utility method to make hooking into file easier
|
||||
*
|
||||
* @access protected
|
||||
* @param array Data to return
|
||||
* @param array Member data
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function outputResult( $return, $member )
|
||||
{
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile AJAX Tab Loader
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 5713 $
|
||||
* @deprecated We no longer have AJAX setting changes in profile
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_settings extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval($this->request['member_id']);
|
||||
$member = array();
|
||||
$command = trim( $this->request['cmd'] );
|
||||
$value = $this->convertAndMakeSafe( $this->request['value'], 0 );
|
||||
$md5_check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$return_string = '';
|
||||
$pp_b_day = intval( $this->request['pp_b_day'] );
|
||||
$pp_b_month = intval( $this->request['pp_b_month'] );
|
||||
$pp_b_year = intval( $this->request['pp_b_year'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5_check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member_id OR ! $this->memberData['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
if ( ! $this->memberData['g_edit_profile'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id, 'extendedProfile,groups' );
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Not the same member?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !$this->memberData['g_is_supmod'] AND $member_id != $this->memberData['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Alright.. what are we doing?
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $command )
|
||||
{
|
||||
case 'birthdate':
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ) );
|
||||
|
||||
if( $pp_b_month OR $pp_b_day OR $pp_b_year )
|
||||
{
|
||||
if ( ! $pp_b_month or ! $pp_b_day )
|
||||
{
|
||||
$return_string = 'dateerror';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ( $pp_b_month AND $pp_b_day AND $pp_b_year ) AND ! @checkdate( $pp_b_month, $pp_b_day, $pp_b_year ) )
|
||||
{
|
||||
$return_string = 'dateerror';
|
||||
}
|
||||
|
||||
if( $return_string != 'dateerror' )
|
||||
{
|
||||
IPSMember::save( $member_id, array( 'core' => array( 'bday_month' => intval( $pp_b_month ), 'bday_day' => intval( $pp_b_day ), 'bday_year' => intval( $pp_b_year ) ) ) );
|
||||
|
||||
$_pp_b_month = '';
|
||||
|
||||
if( $pp_b_month > 0 AND $pp_b_month < 13 )
|
||||
{
|
||||
$_pp_b_month = $this->lang->words['M_' . $pp_b_month ];
|
||||
}
|
||||
|
||||
$date_vars = array();
|
||||
|
||||
# Adding this to support birthdays that don't specify all 3 params
|
||||
|
||||
if( $_pp_b_month )
|
||||
{
|
||||
$date_vars[] = $_pp_b_month;
|
||||
}
|
||||
|
||||
if( $pp_b_day )
|
||||
{
|
||||
$date_vars[] = $pp_b_day;
|
||||
}
|
||||
|
||||
if( $pp_b_year )
|
||||
{
|
||||
$date_vars[] = $pp_b_year;
|
||||
}
|
||||
|
||||
$return_string = ( count($date_vars) ) ? implode( '-', $date_vars ) : $this->lang->words['m_bday_unknown'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->returnString( $return_string );
|
||||
}
|
||||
}
|
||||
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Allow user to change their status
|
||||
* Last Updated: $Date: 2010-10-04 21:50:24 -0400 (Mon, 04 Oct 2010) $
|
||||
* Last Updated: $Date: 2011-07-05 09:10:56 -0400 (Tue, 05 Jul 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 6942 $
|
||||
* @version $Revision: 9154 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -30,9 +30,8 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
* @return @e void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
@@ -84,17 +83,28 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the requested skin group
|
||||
*
|
||||
* @return @e void
|
||||
*/
|
||||
protected function getSkinGroup()
|
||||
{
|
||||
return ( !in_array( $this->request['skin_group'], array('boards', 'profile') ) ) ? 'profile' : $this->request['skin_group'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a reply statussesses
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _showAll()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
$st = intval( $this->request['st'] );
|
||||
|
||||
$skin_group = $this->getSkinGroup();
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id )
|
||||
@@ -112,14 +122,13 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
$statusData = $this->registry->getClass('memberStatus')->getStatusData();
|
||||
|
||||
/* Fetch */
|
||||
$this->returnJsonArray( array( 'status' => 'success', 'status_replies' => $statusData['status_replies'] + 1, 'html' => $this->cleanOutput( $this->registry->getClass('output')->getTemplate('profile')->statusReplies( $this->registry->getClass('memberStatus')->fetchAllReplies() ) ) ) );
|
||||
$this->returnJsonArray( array( 'status' => 'success', 'status_replies' => $statusData['status_replies'] + 1, 'html' => $this->cleanOutput( $this->registry->getClass('output')->getTemplate( $skin_group )->statusReplies( $this->registry->getClass('memberStatus')->fetchAllReplies() ) ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Lock a status
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _lockStatus()
|
||||
{
|
||||
@@ -154,8 +163,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Lock a status
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _unlockStatus()
|
||||
{
|
||||
@@ -190,8 +198,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Delete a status
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _deleteStatus()
|
||||
{
|
||||
@@ -226,8 +233,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Delete a status reply
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _deleteReply()
|
||||
{
|
||||
@@ -264,8 +270,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Add a reply statussesses
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _reply()
|
||||
{
|
||||
@@ -273,6 +278,8 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
$comment = $this->convertAndMakeSafe( $_POST['content'] );
|
||||
$id = intval( $this->request['id'] );
|
||||
|
||||
$skin_group = $this->getSkinGroup();
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id OR ! $comment )
|
||||
@@ -299,7 +306,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
$this->registry->getClass('memberStatus')->reply();
|
||||
|
||||
/* Now grab the reply and return it */
|
||||
$reply = $this->registry->getClass('output')->getTemplate('profile')->statusReplies( $this->registry->getClass('memberStatus')->fetchAllReplies( $status_id, array( 'sort_dir' => 'desc', 'limit' => 1 ) ) );
|
||||
$reply = $this->registry->getClass('output')->getTemplate( $skin_group )->statusReplies( $this->registry->getClass('memberStatus')->fetchAllReplies( $status_id, array( 'sort_dir' => 'desc', 'limit' => 1 ) ) );
|
||||
|
||||
/* And the number of replies */
|
||||
$statusData = $this->registry->getClass('memberStatus')->getStatusData();
|
||||
@@ -310,8 +317,7 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/**
|
||||
* Add a new statussesses
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _new()
|
||||
{
|
||||
@@ -322,6 +328,8 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
$smallSpace = intval( $this->request['smallSpace'] );
|
||||
$su_Twitter = intval( $this->request['su_Twitter'] );
|
||||
$su_Facebook = intval( $this->request['su_Facebook'] );
|
||||
$skin_group = $this->getSkinGroup();
|
||||
$forMemberId = intval( $this->request['forMemberId'] );
|
||||
|
||||
/* Got content? */
|
||||
if( !trim( $this->convertAndMakeSafe( str_replace( array( ' ', ' ' ), '', $_POST['content'] ) ) ) )
|
||||
@@ -335,20 +343,36 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
/* Set Content */
|
||||
$this->registry->getClass('memberStatus')->setContent( trim( $this->convertAndMakeSafe( $_POST['content'] ) ) );
|
||||
|
||||
/* Set post outs */
|
||||
$this->registry->getClass('memberStatus')->setExternalUpdates( array( 'twitter' => $su_Twitter, 'facebook' => $su_Facebook ) );
|
||||
|
||||
/* Can we reply? */
|
||||
/* Can we create? */
|
||||
if ( ! $this->registry->getClass('memberStatus')->canCreate() )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Update or comment? */
|
||||
if ( $forMemberId && $forMemberId != $this->memberData['member_id'] )
|
||||
{
|
||||
$owner = IPSMember::load( $forMemberId );
|
||||
|
||||
if ( ! $owner['pp_setting_count_comments'] )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Set owner */
|
||||
$this->registry->getClass('memberStatus')->setStatusOwner( $owner );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Set post outs */
|
||||
$this->registry->getClass('memberStatus')->setExternalUpdates( array( 'twitter' => $su_Twitter, 'facebook' => $su_Facebook ) );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$newStatus = $this->registry->getClass('memberStatus')->create();
|
||||
|
||||
/* Now grab the reply and return it */
|
||||
$new = $this->registry->getClass('output')->getTemplate('profile')->statusUpdates( $this->registry->getClass('memberStatus')->fetch( $this->memberData['member_id'], array( 'member_id' => $this->memberData['member_id'], 'sort_dir' => 'desc', 'limit' => 1 ) ), $smallSpace );
|
||||
$new = $this->registry->getClass('output')->getTemplate( $skin_group )->statusUpdates( $this->registry->getClass('memberStatus')->fetch( $this->memberData['member_id'], array( 'relatedTo' => $member['member_id'], 'isApproved' => true, 'sort_dir' => 'desc', 'limit' => 1 ) ), $smallSpace );
|
||||
|
||||
$this->returnJsonArray( array( 'status' => 'success', 'html' => $this->cleanOutput( $new ) ) );
|
||||
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Retrieve member warn log
|
||||
* Last Updated: $Date: 2010-10-21 07:08:38 -0400 (Thu, 21 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 7007 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class public_members_ajax_warn extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_mod' ), 'forums' );
|
||||
|
||||
if ( ! $this->settings['warn_on'] )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['ajax_no_warn'] );
|
||||
}
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'view':
|
||||
$this->_viewWarnLogs();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retieve warn logs and return them
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _viewWarnLogs()
|
||||
{
|
||||
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir('members') . '/modules_public/warn/warn.php', 'public_members_warn_warn' );
|
||||
$warn = new $classToLoad();
|
||||
$warn->makeRegistryShortcuts( $this->registry );
|
||||
$warn->loadData();
|
||||
|
||||
$warnHTML = $warn->viewLog();
|
||||
|
||||
if ( !$warnHTML )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['ajax_bad_html'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->registry->getClass('output')->getTemplate('mod')->warnLogsAjaxWrapper( $warnHTML ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user