class boardIndexFeaturedEntry extends skin_boards(~id~) { public function boardIndexTemplate( $lastvisit="", $stats=array(), $calendar_events=FALSE, $birthdays=FALSE, $chat_html='', $news_data=array(), $cat_data=array(), $show_side_blocks=true, $side_blocks=array() ) { if( ! $this->memberData['g_blog_allowview'] ) { return parent::boardIndexTemplate( $lastvisit, $stats, $calendar_events, $birthdays, $chat_html, $news_data, $cat_data, $show_side_blocks, $side_blocks ); } $this->cache->getCache( array( 'emoticons', 'cblocks' ) ); /* Setup Blog Environment */ require_once( IPSLib::getAppDir( 'blog' ) . '/app_class_blog.php' ); $blog = new app_class_blog( $this->registry ); $this->registry->output->addToDocumentHead( 'importcss', $this->settings['public_dir'] . 'style_css/' . $this->registry->output->skin['_csscacheid'] . '/ipblog.css' ); //--------------------------------------------------- // Featured entry //--------------------------------------------------- $featured = $this->DB->buildAndFetch( array( 'select' => 'e.*', 'from' => array( 'blog_entries' => 'e' ), 'where' => 'e.entry_featured=1', 'add_join' => array( array( 'select' => 'b.*', 'from' => array( 'blog_blogs' =>'b' ), 'where' => 'b.blog_id=e.blog_id', 'type' => 'left', ), array( 'select' => 'm.members_display_name, m.member_group_id, m.mgroup_others, m.members_seo_name', 'from' => array( 'members' => 'm' ), 'where' => 'm.member_id=e.entry_author_id', 'type' => 'left' ), array( 'select' => 'pp.*', 'from' => array( 'profile_portal' => 'pp' ), 'where' => 'pp.pp_member_id=m.member_id', 'type' => 'left', ) ) ) ); if( $featured['entry_id'] ) { if( !$featured['blog_disabled'] AND $featured['entry_status'] != 'draft' ) { $featured = IPSMember::buildDisplayData( $featured, 0, 0 ); $featured['entry_date'] = $this->registry->getClass('class_localization')->getDate( $featured['entry_date'], 'SHORT' ); $featured['entry'] = str_replace( array( '
', '
' ), " ", $featured['entry'] ); $featured['entry'] = str_replace( '', " ", $featured['entry'] ); $featured['entry'] = strip_tags( $featured['entry'] ); $featured['entry_excerpt'] = $this->registry->getClass('blogFunctions')->getEntryExcerpt( $featured ); $featured['url'] = $this->registry->getClass('blogFunctions')->getBlogUrl( $featured['blog_id'] ); } } $output = $this->registry->output->getTemplate('blog_list')->blogFeaturedEntry( $featured ); $output .= parent::boardIndexTemplate( $lastvisit, $stats, $calendar_events, $birthdays, $chat_html, $news_data, $cat_data, $show_side_blocks, $side_blocks ); return $output; } }