Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -2,19 +2,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* Profile Plugin Library
|
||||
* Last Updated: $Date: 2010-10-23 08:40:34 -0400 (Sat, 23 Oct 2010) $
|
||||
* Last Updated: $Date: 2011-07-27 10:14:00 -0400 (Wed, 27 Jul 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 7023 $
|
||||
* @version $Revision: 9326 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -73,63 +73,56 @@ class profile_posts extends profile_plugin_parent
|
||||
return $this->registry->getClass('output')->getTemplate('profile')->tabNoContent( 'err_no_posts_to_show' );
|
||||
}
|
||||
|
||||
$pids = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// And limit by post count...
|
||||
//-----------------------------------------
|
||||
|
||||
$posts = intval($this->memberData['posts']);
|
||||
|
||||
//-----------------------------------------
|
||||
// Will we need to parse attachments?
|
||||
//-----------------------------------------
|
||||
|
||||
$parseAttachments = false;
|
||||
|
||||
/* Get list of good forum IDs */
|
||||
$forumIdsOk = $this->registry->class_forums->fetchSearchableForumIds();
|
||||
|
||||
/* Set up joins */
|
||||
$_post_joins = array( array(
|
||||
'select' => 't.*',
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => 't.tid=p.topic_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
array(
|
||||
'select' => 'm.member_group_id, m.mgroup_others',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=p.author_id',
|
||||
'type' => 'left'
|
||||
) );
|
||||
|
||||
/* Cache? */
|
||||
if ( IPSContentCache::isEnabled() )
|
||||
{
|
||||
if ( IPSContentCache::fetchSettingValue('post') )
|
||||
{
|
||||
$_post_joins[] = IPSContentCache::join( 'post', 'p.pid' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->settings['search_ucontent_days'] )
|
||||
{
|
||||
$date_cut = ( $this->memberData['last_post'] ? $this->memberData['last_post'] : time() ) - 86400 * intval( $this->settings['search_ucontent_days'] );
|
||||
$date_cut = ' AND p.post_date > ' . $date_cut;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get last X posts
|
||||
//-----------------------------------------
|
||||
|
||||
if( is_array($forumIdsOk) AND count($forumIdsOk) )
|
||||
{
|
||||
/* Init vars */
|
||||
$pids = array();
|
||||
$parseAttachments = false;
|
||||
|
||||
/* Set up joins */
|
||||
$_post_joins = array( array(
|
||||
'select' => 't.*',
|
||||
'from' => array( 'topics' => 't' ),
|
||||
'where' => 't.tid=p.topic_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
array(
|
||||
'select' => 'm.member_group_id, m.mgroup_others',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=p.author_id',
|
||||
'type' => 'left'
|
||||
) );
|
||||
|
||||
/* Cache? */
|
||||
if ( IPSContentCache::isEnabled() )
|
||||
{
|
||||
if ( IPSContentCache::fetchSettingValue('post') )
|
||||
{
|
||||
$_post_joins[] = IPSContentCache::join( 'post', 'p.pid' );
|
||||
}
|
||||
}
|
||||
|
||||
if ( $this->settings['search_ucontent_days'] )
|
||||
{
|
||||
$date_cut = ( $this->memberData['last_post'] ? $this->memberData['last_post'] : time() ) - 86400 * intval( $this->settings['search_ucontent_days'] );
|
||||
$date_cut = ' AND p.post_date > ' . $date_cut;
|
||||
}
|
||||
|
||||
$_queued = $this->registry->class_forums->fetchPostHiddenQuery( array( 'visible' ), 'p.' );
|
||||
$_approved = $this->registry->getClass('class_forums')->fetchTopicHiddenQuery( array( 'visible' ), 't.' );
|
||||
|
||||
$this->DB->build( array(
|
||||
'select' => 'p.*',
|
||||
'from' => array( 'posts' => 'p' ),
|
||||
'where' => "p.queued=0 AND t.approved=1 AND p.author_id={$member['member_id']} AND p.new_topic=0 AND t.forum_id IN (" . implode( ",", $forumIdsOk ) . ") " . $date_cut,
|
||||
'order' => 'p.post_date DESC',
|
||||
'where' => $_queued . " AND " . $_approved . " AND p.author_id={$member['member_id']} AND p.new_topic=0 AND t.forum_id IN (" . implode( ",", $forumIdsOk ) . ") " . $date_cut,
|
||||
'order' => 'p.pid DESC',
|
||||
'limit' => array( 0, $last_x ),
|
||||
'add_join' => $_post_joins
|
||||
) );
|
||||
@@ -148,7 +141,7 @@ class profile_posts extends profile_plugin_parent
|
||||
if ( ! $row['cache_content'] )
|
||||
{
|
||||
IPSText::getTextClass( 'bbcode' )->parse_smilies = $row['use_emo'];
|
||||
IPSText::getTextClass( 'bbcode' )->parse_html = ( $row['use_html'] and $this->memberData['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0;
|
||||
IPSText::getTextClass( 'bbcode' )->parse_html = ( $row['use_html'] and $this->caches['group_cache'][ $row['member_group_id'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0;
|
||||
IPSText::getTextClass( 'bbcode' )->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0;
|
||||
IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1;
|
||||
IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics';
|
||||
@@ -164,45 +157,45 @@ class profile_posts extends profile_plugin_parent
|
||||
$row['post'] = $row['cache_content'];
|
||||
}
|
||||
|
||||
$row['post'] = IPSLib::memberViewImages( $row['post'] );
|
||||
|
||||
$row['_post_date'] = ipsRegistry::getClass( 'class_localization')->getDate( $row['post_date'], 'SHORT' );
|
||||
$row['_post_date'] = ipsRegistry::getClass('class_localization')->getDate( $row['post_date'], 'SHORT' );
|
||||
$row['_raw_date'] = $row['post_date'];
|
||||
$row['_date_array'] = IPSTime::date_getgmdate( $row['post_date'] + ipsRegistry::getClass( 'class_localization')->getTimeOffset() );
|
||||
|
||||
$row['post'] .= "\n<!--IBF.ATTACHMENT_". $row['pid']. "-->";
|
||||
|
||||
$content .= $this->registry->getClass('output')->getTemplate('profile')->tabSingleColumn( $row, $this->lang->words['profile_read_topic'], $this->settings['base_url'].'app=forums&module=forums&section=findpost&pid='.$row['pid'], $this->lang->words['profile_in_topic'] . $row['title'] );
|
||||
$url = $this->registry->output->buildSEOUrl( "showtopic={$row['topic_id']}&view=findpost&p={$row['pid']}", 'public', $row['title_seo'], 'showtopic' );
|
||||
|
||||
$content .= $this->registry->getClass('output')->getTemplate('profile')->tabSingleColumn( $row, $this->lang->words['profile_read_topic'], $url, $this->lang->words['profile_in_topic'] . $row['title'] );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Attachments (but only if necessary)
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $parseAttachments AND !is_object( $this->class_attach ) )
|
||||
{
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
|
||||
$this->class_attach = new $classToLoad( $this->registry );
|
||||
|
||||
$this->class_attach->type = 'post';
|
||||
$this->class_attach->init();
|
||||
|
||||
if ( IPSMember::checkPermissions('download') === false )
|
||||
//-----------------------------------------
|
||||
// Attachments (but only if necessary)
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $parseAttachments AND !is_object( $this->class_attach ) )
|
||||
{
|
||||
$this->settings['show_img_upload'] = 0;
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
|
||||
$this->class_attach = new $classToLoad( $this->registry );
|
||||
|
||||
$this->class_attach->type = 'post';
|
||||
$this->class_attach->init();
|
||||
|
||||
if ( IPSMember::checkPermissions('download') === false )
|
||||
{
|
||||
$this->settings['show_img_upload'] = 0;
|
||||
}
|
||||
|
||||
$content = $this->class_attach->renderAttachments( $content, $pids );
|
||||
$content = $content[0]['html'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Macros...
|
||||
//-----------------------------------------
|
||||
|
||||
$content = $this->class_attach->renderAttachments( $content, $pids );
|
||||
$content = $content[0]['html'];
|
||||
$content = $this->registry->output->replaceMacros( $content );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Macros...
|
||||
//-----------------------------------------
|
||||
|
||||
$content = $this->registry->output->replaceMacros( $content );
|
||||
|
||||
//-----------------------------------------
|
||||
// Return content..
|
||||
//-----------------------------------------
|
||||
|
||||
Reference in new issue
Block a user