Version 2.2.0 RC-1

This commit is contained in:
Neo committed 2025-12-19 00:22:37 -08:00
1 parent f73f8bff6d
commit 22f1b963ee
1034 files changed
+178610 -70897

No files matched your search

+37 -54
View File
@@ -2,28 +2,18 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Tuesday 18th of July 2006 05:56:00 PM
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2005-12-06 17:36:43 +0000 (Tue, 06 Dec 2005) $
| > $Revision: 94 $
| > $Author: bfarber $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > PORTAL PLUG IN MODULE: Recent topics
@@ -59,6 +49,13 @@
* @copyright Invision Power Services, Inc.
* @version 2.1
*/
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 ppi_recent_topics
{
/**
@@ -105,6 +102,10 @@ class ppi_recent_topics
{
$qe = "forum_id IN(".implode(',', $this->portal_object['good_forum'] ).") AND ";
}
else
{
return;
}
$this->ipsclass->DB->simple_construct( array( 'select' => 'tid, title, posts, starter_id as member_id, starter_name as member_name, start_date as post_date, views',
'from' => 'topics',
@@ -229,39 +230,7 @@ class ppi_recent_topics
// Attachments?
//-----------------------------------------
preg_match_all( "#\[attachmentid=(\d+)\]#is", $entry['post'], $match );
if ( is_array($match[0]) and count($match[0]) )
{
for ( $i = 0 ; $i < count($match[0]) ; $i++ )
{
if ( $match[1][$i] )
{
$attach_pids[ $match[1][$i] ] = $match[1][$i];
}
}
$got_these_attach = 1;
}
if( $entry['topic_hasattach'] > 0 && $got_these_attach == 0 )
{
$this->ipsclass->DB->build_query( array( 'select' => 'attach_id', 'from' => 'attachments', 'where' => "attach_pid={$entry['topic_firstpost']}" ) );
$this->ipsclass->DB->exec_query();
$these_attach = array();
while( $att = $this->ipsclass->DB->fetch_row() )
{
$attach_pids[$att['attach_id']] = $att['attach_id'];
$these_attach[] = $att['attach_id'];
}
foreach($these_attach as $k => $v )
{
$entry['post'] .= "<br />\n[attachmentid={$v}]";
}
}
$attach_pids[ $entry['pid'] ] = $entry['pid'];
//-----------------------------------------
// Format posts
@@ -293,12 +262,26 @@ class ppi_recent_topics
if ( count( $attach_pids ) )
{
require_once( ROOT_PATH.'sources/action_public/topics.php' );
$this->topic = new topics();
$this->topic->ipsclass =& $this->ipsclass;
$this->topic->topic_init();
$html = $this->topic->parse_attachments( $html, $attach_pids , 'attach_id' );
if ( ! is_object( $this->class_attach ) )
{
//-----------------------------------------
// Grab render attach class
//-----------------------------------------
require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' );
$this->class_attach = new class_attach();
$this->class_attach->ipsclass =& $this->ipsclass;
$this->class_attach->attach_post_key = '';
$this->ipsclass->load_template( 'skin_topic' );
$this->ipsclass->load_language( 'lang_topic' );
}
$this->class_attach->attach_post_key = '';
$this->class_attach->type = 'post';
$this->class_attach->init();
$html = $this->class_attach->render_attachments( $html, $attach_pids );
}
return $this->ipsclass->compiled_templates['skin_portal']->tmpl_articles($html);