title = $_G['cache']['plugin']['myapp']['showtitle']; $this->num = intval($_G['cache']['plugin']['myapp']['shownum']); $this->myapp = intval($_G['cache']['plugin']['myapp']['showmyapp']); } } class plugin_myapp_forum extends plugin_myapp { function viewthread_sidebottom_output() { global $_G, $postlist; if(IS_ROBOT) { return array(); } if(!$_G['forum_firstpid']) { return array(); } loadcache('myapp'); $thisApp = ''; $poster = reset($postlist); $userapp = C::t('home_userapp_plying')->fetch($poster['authorid']); if(!empty($userapp['appid'])) { $applist = explode(',', $userapp['appid']); $i = 0; foreach($applist as $appid) { if(!empty($_G['cache']['myapp'][$appid])) { if($i < $this->num) { $thisApp .= ''. ''; $i++; } else { break; } } } } $thisApp = $thisApp ? '
'.$this->title.'
'.$thisApp.'
' : ''; return array($thisApp); } function viewthread_postsightmlafter_output() { global $_G, $postlist; if(IS_ROBOT || !$this->myapp) { return array(); } $myappdiv = $myapp = $uids = array(); foreach($postlist as $post) { $uids[$post['authorid']] = $post['authorid']; } require_once libfile('function/feed'); foreach(C::t('common_member')->fetch_all($uids) as $uid) { $list = array(); foreach(C::t('home_feed_app')->fetch_all_by_uid_icon($uid['uid'], '', 0, 1) as $feed) { $list[$feed['icon']][] = mkfeed($feed); } $myapp[$uid['uid']] = $this->getmyapplist($list); } foreach($postlist as $post) { $myappdiv[] = $myapp[$post['authorid']]; } return $myappdiv; } function getmyapplist($list) { if(!$list) { return ''; } $myapp = ''.$value[body_general].'