Spróbuj:
<?php
$this->registry = ipsRegistry::instance();
$this->DB = $this->registry->DB();
/* 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() ) );
}
$this->DB->build( array(
'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'pp.pp_status <> ""',
'order' => 'pp.pp_status_update DESC',
'limit' => array( 0, 10 ),
'add_join' => array(
array(
'select' => 'm.members_display_name, m.members_seo_name',
'from' => array( 'members' => 'm' ),
'where' => 'pp.pp_member_id=m.member_id',
'type' => 'left'
)
)
) );
$q = $this->DB->execute();
$rows = array();
while( $r = $this->DB->fetch( $q ) )
{
$r = ipsMember::buildProfilePhoto( $r );
$rows[] = $r;
}
echo $this->registry->output->getTemplate( 'boards' )->hookBoardIndexStatusUpdates( $rows );
?>