本文整理汇总了PHP中mkfeed函数的典型用法代码示例。如果您正苦于以下问题:PHP mkfeed函数的具体用法?PHP mkfeed怎么用?PHP mkfeed使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了mkfeed函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: viewthread_postsightmlafter_output
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;
}
示例2: realname_get
}
if (app_ckprivacy($value['privacy']) && $value['myml']) {
$value['appurl'] = 'userapp.php?id=' . $value['appid'];
if ($value['narrow']) {
$narrowlist[] = $value;
} else {
$widelist[] = $value;
}
}
}
}
//ᅧ새
realname_get();
//feed
foreach ($feedlist as $key => $value) {
$feedlist[$key] = mkfeed($value);
}
//자채ᅮᄊ
if (!$space['self'] && $_SGLOBAL['supe_uid']) {
include_once S_ROOT . './source/function_cp.php';
addfriendnum($space['uid'], $space['username']);
}
@(include_once S_ROOT . './data/data_profilefield.php');
$fields = empty($_SGLOBAL['profilefield']) ? array() : $_SGLOBAL['profilefield'];
//ᄌᄊ¢ᅲᅧᅬ
$base_farr = $contact_farr = array();
$query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spaceinfo') . " WHERE uid='{$space['uid']}'");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
$v_friend = ckfriend($value['uid'], $value['friend']);
if ($value['type'] == 'base' || $value['type'] == 'contact') {
if (!$v_friend) {
示例3: empty
$icon = empty($_GET['icon']) ? '' : trim($_GET['icon']);
$multi = '';
$feed_list = $appfeed_list = $hiddenfeed_list = $filter_list = $hiddenfeed_num = $icon_num = array();
$count = $filtercount = 0;
$query = C::t('home_feed')->fetch_all_by_search(1, $uids, $icon, '', '', '', '', '', $start, $perpage, $f_index);
foreach ($query as $value) {
$feed_list[$value['icon']][] = $value;
$count++;
}
$multi = simplepage($count, $perpage, $page, $theurl);
require_once libfile('function/feed');
$list = $filter_list = array();
foreach ($feed_list as $key => $values) {
$nowcount = 0;
foreach ($values as $value) {
$value = mkfeed($value);
$nowcount++;
if ($nowcount > 5 && empty($icon)) {
break;
}
$list[$key][] = $value;
}
}
getuserapp();
$my_userapp = array();
if ($_G['uid']) {
if (is_array($_G['cache']['userapp'])) {
foreach ($_G['cache']['userapp'] as $value) {
$my_userapp[$value['appid']] = $value;
}
}
示例4: getblockhtml
//.........这里部分代码省略.........
}
$html .= lang('space', 'blog_li_ext', array('uid' => $value['uid'], 'blogid' => $value['blogid'], 'viewnum' => $value['viewnum'], 'replynum' => $value['replynum']));
$html .= "</dl>";
} else {
$html .= '<p>' . lang('space', 'block_view_noperm') . '</p>';
}
}
$more = $html ? '<p class="ptm" style="text-align: right;"><a href="home.php?mod=space&uid=' . $uid . '&do=blog&view=me&from=space">' . lang('space', 'viewmore') . '</a></p>' : '';
$contentclassname = ' xld';
$html = $html . $more;
break;
case 'album':
$do = $blockname;
if (ckprivacy('album', 'view')) {
$query = DB::query("SELECT * FROM " . DB::table('home_album') . " WHERE uid='{$uid}' ORDER BY updatetime DESC LIMIT 0,{$shownum}");
while ($value = DB::fetch($query)) {
if (ckfriend($value['uid'], $value['friend'], $value['target_ids'])) {
$value['pic'] = pic_cover_get($value['pic'], $value['picflag']);
$html .= lang('space', 'album_li', array('albumid' => $value['albumid'], 'src' => $value['pic'], 'albumname' => $value['albumname'], 'uid' => $value['uid'], 'picnum' => $value['picnum'], 'date' => dgmdate($value['updatetime'], 'n-j')));
}
}
} else {
$html .= '<li>' . lang('space', 'block_view_noperm') . '</li>';
}
$html = '<ul class="ml mla cl">' . $html . '</ul>';
break;
case 'feed':
$do = $blockname;
if (!IS_ROBOT && ckprivacy('feed', 'view')) {
require_once libfile('function/feed');
$query = DB::query("SELECT * FROM " . DB::table('home_feed') . " WHERE uid='{$uid}' ORDER BY dateline DESC LIMIT 0,{$shownum}");
while ($value = DB::fetch($query)) {
if (ckfriend($value['uid'], $value['friend'], $value['target_ids'])) {
$html .= mkfeedhtml(mkfeed($value));
}
}
}
$contenttagname = 'ul';
$contentclassname = ' el';
$html = empty($html) ? '' : $html;
break;
case 'thread':
$do = $blockname;
if ($_G['setting']['allowviewuserthread'] !== false) {
$fidsql = empty($_G['setting']['allowviewuserthread']) ? '' : " AND fid IN({$_G[setting][allowviewuserthread]}) ";
$query = DB::query("SELECT * FROM " . DB::table('forum_thread') . " WHERE authorid='{$uid}' {$fidsql} AND displayorder>='0' ORDER BY tid DESC LIMIT 0,{$shownum}");
while ($thread = DB::fetch($query)) {
if ($thread['author']) {
$html .= "<li><a href=\"forum.php?mod=viewthread&tid={$thread['tid']}\" target=\"_blank\">{$thread['subject']}</a></li>";
}
}
}
$html = empty($html) ? '' : '<ul class="xl">' . $html . '</ul>';
break;
case 'friend':
$do = $blockname;
require_once libfile('function/friend');
$friendlist = array();
$friendlist = friend_list($uid, $shownum);
$fuids = array_keys($friendlist);
getonlinemember($fuids);
foreach ($friendlist as $key => $value) {
$classname = $_G['ols'][$value['fuid']] ? 'gol' : '';
$html .= '<li><a href="home.php?mod=space&uid=' . $value['fuid'] . '" target="_blank"><em class="' . $classname . '"></em>' . avatar($value['fuid'], 'small') . '</a><p><a href="home.php?mod=space&uid=' . $value[fuid] . '" target="_blank">' . $value['fusername'] . '</a></p></li>';
}
$html = '<ul class="ml mls cl">' . $html . '</ul>';
示例5: elseif
if ($thread['closed'] == 1) {
$newthreadlist['dateline']['data'][$tid]['folder'] = 'lock';
} elseif (empty($_G['cookie']['oldtopics']) || strpos($_G['cookie']['oldtopics'], 'D' . $tid . 'D') === FALSE) {
$newthreadlist['dateline']['data'][$tid]['folder'] = 'new';
} else {
$newthreadlist['dateline']['data'][$tid]['folder'] = 'common';
}
}
$groupfeedlist = array();
if (!IS_ROBOT) {
$activityuser = array_keys($groupcache['activityuser']['data']);
if ($activityuser) {
$query = DB::query("SELECT * FROM " . DB::table('home_feed') . " USE INDEX(dateline) WHERE uid IN (" . dimplode($activityuser) . ") ORDER BY dateline desc LIMIT 0, 5");
while ($feed = DB::fetch($query)) {
if ($feed['friend'] == 0) {
$groupfeedlist[] = mkfeed($feed);
}
}
}
}
} else {
$newuserlist = $activityuserlist = array();
$newuserlist = array_slice($groupcache['newuserlist']['data'], 0, 4);
foreach ($newuserlist as $user) {
$newuserlist[$user['uid']] = $user;
$newuserlist[$user['uid']]['online'] = !empty($onlinemember['list']) && is_array($onlinemember['list']) && !empty($onlinemember['list'][$user['uid']]) ? 1 : 0;
}
}
write_groupviewed($_G['fid']);
include template('diy:group/group:' . $_G['fid']);
} elseif ($action == 'memberlist') {
示例6: array
$uids = array(-1);
}
}
if ($_G['adminid'] == 2 && $endtime - $starttime > 86400 * 16 || $_G['adminid'] == 3 && $endtime - $starttime > 86400 * 8) {
$error = 'feed_mod_range_illegal';
}
if (!$error) {
if ($detail) {
$_GET['perpage'] = intval($_GET['perpage']) < 1 ? 20 : intval($_GET['perpage']);
$perpage = $_GET['pp'] ? $_GET['pp'] : $_GET['perpage'];
$query = C::t('home_feed')->fetch_all_by_search(1, $uids, $icon, $starttime, $endtime, $feedids, $hot1, $hot2, ($page - 1) * $perpage, $perpage);
$feeds = '';
include_once libfile('function/feed');
foreach ($query as $feed) {
$feed['dateline'] = dgmdate($feed['dateline']);
$feed = mkfeed($feed);
$feeds .= showtablerow('', array('style="width:20px;"', 'style="width:260px;"', '', 'style="width:120px;"', 'style="width:60px;"'), array("<input class=\"checkbox\" type=\"checkbox\" name=\"delete[]\" value=\"{$feed['feedid']}\" />", $feed['title_template'], $feed['body_template'], $feed['dateline'], '<a href="' . ADMINSCRIPT . '?action=feed&operation=global&feedid=' . $feed['feedid'] . '">' . $lang['edit'] . '</a>'), TRUE);
}
$feedcount = C::t('home_feed')->fetch_all_by_search(3, $uids, $icon, $starttime, $endtime, $feedids, $hot1, $hot2);
$multi = multi($feedcount, $perpage, $page, ADMINSCRIPT . "?action=feed");
$multi = preg_replace("/href=\"" . ADMINSCRIPT . "\\?action=feed&page=(\\d+)\"/", "href=\"javascript:page(\\1)\"", $multi);
$multi = str_replace("window.location='" . ADMINSCRIPT . "?action=feed&page='+this.value", "page(this.value)", $multi);
} else {
$feedcount = 0;
$query = C::t('home_feed')->fetch_all_by_search(2, $uids, $icon, $starttime, $endtime, $feedids, $hot1, $hot2);
foreach ($query as $feed) {
$feedids .= ',' . $feed['feedid'];
$feedcount++;
}
$multi = '';
}
示例7: sgmdate
} else {
$theday = sgmdate('Y-m-d', $value['dateline']);
$list[$theday][] = $value;
}
}
//应用
foreach ($appfeed_list as $values) {
$actors = array();
$a_value = array();
foreach ($values as $value) {
if (empty($a_value)) {
$a_value = $value;
}
$actors[] = "<a href=\"space.php?uid={$value['uid']}\">" . $_SN[$value['uid']] . "</a>";
}
$a_value = mkfeed($a_value, $actors);
$list['app'][] = $a_value;
}
}
$_SGLOBAL['news_list'] = $list;
if (!empty($_GET['show'])) {
include_once template(cp_feed_news);
exit;
}
//获得最新10条已处理的诉求信息
$complainQuery = $_SGLOBAL['db']->query("select * from " . tname("complain_op") . " order by dateline DESC LIMIT 10");
while ($complain = $_SGLOBAL['db']->fetch_array($complainQuery)) {
$complain['dateline'] = date("Y-m-d H:i", $complain['dateline']);
if (!$complain['uid']) {
realname_set($complain['uid'], $complain['username']);
} elseif (empty($_SN[$complain['uid']])) {
示例8: getblockhtml
//.........这里部分代码省略.........
}
$contentclassname = ' xld';
$html = $html . $more;
break;
case 'album':
$do = $blockname;
$view = 'me';
$from = 'space';
if (ckprivacy('album', 'view')) {
$query = C::t('home_album')->fetch_all_by_uid($uid, 'updatetime', 0, $shownum);
foreach ($query as $value) {
if (ckfriend($value['uid'], $value['friend'], $value['target_ids'])) {
$value['pic'] = pic_cover_get($value['pic'], $value['picflag']);
$html .= lang('space', 'album_li', array('albumid' => $value['albumid'], 'src' => $value['pic'], 'albumname' => $value['albumname'], 'uid' => $value['uid'], 'picnum' => $value['picnum'], 'date' => dgmdate($value['updatetime'], 'n-j')));
}
}
if (!$html) {
$html = '<p class="emp">' . lang('space', 'block_album_no_content') . ($space['self'] ? lang('space', 'block_album_no_content_publish', $space) : '') . '</p>';
}
} else {
$html .= '<li>' . lang('space', 'block_view_noperm') . '</li>';
}
$html = '<ul class="ml cl">' . $html . '</ul>';
break;
case 'feed':
$do = 'home';
$view = 'me';
$from = 'space';
if (!IS_ROBOT && ckprivacy('feed', 'view')) {
require_once libfile('function/feed');
$query = C::t('home_feed')->fetch_all_by_uid_dateline($uid, false, 0, $shownum);
foreach ($query as $value) {
if (ckfriend($value['uid'], $value['friend'], $value['target_ids'])) {
$html .= mkfeedhtml(mkfeed($value));
}
}
}
$contenttagname = 'ul';
$contentclassname = ' el';
$html = !$html ? '<p class="emp">' . lang('space', 'block_feed_no_content') . '</p>' : $html;
break;
case 'thread':
$do = $blockname;
$view = 'me';
$from = 'space';
if ($_G['setting']['allowviewuserthread'] !== -1) {
$fidsql = empty($_G['setting']['allowviewuserthread']) ? '' : " AND fid IN({$_G[setting][allowviewuserthread]}) ";
$viewfids = str_replace("'", '', $_G['setting']['allowviewuserthread']);
if (!empty($viewfids)) {
$viewfids = explode(',', $viewfids);
}
foreach (C::t('forum_thread')->fetch_all_by_authorid_displayorder($uid, 0, '>=', null, '', 0, $shownum) as $thread) {
if (!empty($viewfids) && $_G['adminid'] != 1 && !in_array($thread['fid'], $viewfids)) {
continue;
}
if ($thread['author']) {
$html .= "<li><a href=\"forum.php?mod=viewthread&tid={$thread['tid']}\" target=\"_blank\">{$thread['subject']}</a></li>";
}
}
}
$html = !$html ? '<p class="emp">' . lang('space', 'block_thread_no_content') . ($space['self'] ? lang('space', 'block_thread_no_content_publish', $space) : '') . '</p>' : '<ul class="xl">' . $html . '</ul>';
break;
case 'friend':
$do = $blockname;
$view = 'me';
$from = 'space';
示例9: getblockhtml
function getblockhtml($blockname, $parameters = array())
{
global $_G, $space;
$parameters = empty($parameters) ? array() : $parameters;
$list = array();
$sql = $title = $html = $wheresql = $ordersql = '';
$shownum = 6;
$uid = intval($space['uid']);
$shownum = empty($parameters['shownum']) ? $shownum : intval($parameters['shownum']);
switch ($blockname) {
case 'profile':
$html .= '<div class="avt avtm">' . avatar($space['uid'], 'middle');
$html .= '<h2>' . $space['username'] . '</h2>';
$html .= '</div><ul class="xl xl2 cl">';
if ($space['self']) {
$html .= '<li><a href="home.php?mod=space&diy=yes">' . lang('space', 'block_profile_diy') . '</a></li>';
$html .= '<li><a href="home.php?mod=space&do=wall">' . lang('space', 'block_profile_wall') . '</a></li>';
$html .= '<li><a href="home.php?mod=spacecp&ac=avatar">' . lang('space', 'block_profile_avatar') . '</a></li>';
$html .= '<li><a href="home.php?mod=spacecp&ac=profile">' . lang('space', 'block_profile_update') . '</a></li>';
} else {
require_once libfile('function/friend');
$isfriend = friend_check($space['uid']);
if (!$isfriend) {
$html .= "<li><a href=\"home.php?mod=spacecp&ac=friend&op=add&uid={$space['uid']}&handlekey=addfriendhk_{$space[uid]}\" id=\"a_friend_li_{$space[uid]}\" onclick=\"showWindow(this.id, this.href, 'get', 0);\">" . lang('space', 'block_profile_friend_add') . "</a></li>";
} else {
$html .= "<li><a href=\"home.php?mod=spacecp&ac=friend&op=ignore&uid={$space['uid']}&handlekey=ignorefriendhk_{$space[uid]}\" id=\"a_ignore_{$space[uid]}\" onclick=\"showWindow(this.id, this.href, 'get', 0);\">" . lang('space', 'block_profile_friend_ignore') . "</a></li>";
}
$html .= "<li><a href=\"home.php?mod=space&uid={$space['uid']}&do=wall\">" . lang('space', 'block_profile_wall_to_me') . "</a></li>";
$html .= "<li><a href=\"home.php?mod=spacecp&ac=poke&op=send&uid={$space['uid']}&handlekey=propokehk_{$space[uid]}\" id=\"a_poke_{$space[uid]}\" onclick=\"showWindow(this.id, this.href, 'get', 0);\">" . lang('space', 'block_profile_poke') . "</a></li>";
$html .= "<li><a href=\"home.php?mod=spacecp&ac=pm&op=showmsg&handlekey=showmsg_{$space['uid']}&touid={$space['uid']}&pmid=0&daterange=2\" id=\"a_sendpm_{$space['uid']}\" onclick=\"showWindow('showMsgBox', this.href, 'get', 0)\">" . lang('space', 'block_profile_sendmessage') . "</a></li>";
}
$html .= '</ul>';
$html = '<div class="content"><div id="pcd">' . $html . '</div></div>';
break;
case 'doing':
$dolist = array();
$sql = "SELECT * FROM " . DB::table('home_doing') . " WHERE uid='{$uid}' ORDER BY dateline DESC LIMIT 0,{$shownum}";
$query = DB::query($sql);
while ($value = DB::fetch($query)) {
$dolist[] = $value;
}
if ($dolist) {
foreach ($dolist as $dv) {
$doid = $dv['doid'];
$_G[gp_key] = $key = random(8);
$html .= "<li class=\"pbn bbda\">";
$html .= $dv['message'];
$html .= " <a href=\"home.php?mod=space&uid={$dv['uid']}&do=doing&view=me&from=space&doid={$dv['doid']}\" target=\"_blank\" class=\"xg1\">" . lang('space', 'block_doing_reply') . "</a>";
$html .= "</li>";
}
} else {
$html .= "<p class=\"emp\">" . lang('space', 'block_doing_no_content') . "</p>";
}
$html = '<div class="content"><ul class="xl">' . $html . '</ul></div>';
break;
case 'blog':
$query = DB::query("SELECT bf.*, b.* FROM " . DB::table('home_blog') . " b\n\t\t\t\tLEFT JOIN " . DB::table('home_blogfield') . " bf ON bf.blogid=b.blogid\n\t\t\t\tWHERE b.uid='{$uid}'\n\t\t\t\tORDER BY b.dateline DESC LIMIT 0,{$shownum}");
while ($value = DB::fetch($query)) {
if (ckfriend($value['uid'], $value['friend'], $value['target_ids'])) {
if ($value['pic']) {
$value['pic'] = pic_cover_get($value['pic'], $value['picflag']);
}
$value['message'] = $value['friend'] == 4 ? '' : getstr($value['message'], 150, 0, 0, 0, 0, -1);
$html .= lang('space', 'blog_li', array('uid' => $value['uid'], 'blogid' => $value['blogid'], 'subject' => $value['subject'], 'date' => dgmdate($value['dateline'], 'Y-m-d')));
if ($parameters['showmessage']) {
if ($value['pic']) {
$html .= lang('space', 'blog_li_img', array('uid' => $value['uid'], 'blogid' => $value['blogid'], 'src' => $value['pic']));
}
$html .= "<dd>{$value['message']}</dd>";
}
$html .= lang('space', 'blog_li_ext', array('uid' => $value['uid'], 'blogid' => $value['blogid'], 'viewnum' => $value['viewnum'], 'replynum' => $value['replynum']));
$html .= "</dl>";
} else {
$html .= '<p>' . lang('space', 'block_view_noperm') . '</p>';
}
}
$more = $html ? '<p class="ptm" style="text-align: right;"><a href="home.php?mod=space&uid=' . $space['uid'] . '&do=blog&view=me&from=space">' . lang('space', 'viewmore') . '</a></p>' : '';
$html = '<div class="content xld">' . $html . $more . '</div>';
break;
case 'album':
if (ckprivacy('album', 'view')) {
$query = DB::query("SELECT * FROM " . DB::table('home_album') . " WHERE uid='{$uid}' ORDER BY updatetime DESC LIMIT 0,{$shownum}");
while ($value = DB::fetch($query)) {
if (ckfriend($value['uid'], $value['friend'], $value['target_ids'])) {
$value['pic'] = pic_cover_get($value['pic'], $value['picflag']);
$html .= lang('space', 'album_li', array('albumid' => $value['albumid'], 'src' => $value['pic'], 'albumname' => $value['albumname'], 'uid' => $value['uid'], 'picnum' => $value['picnum'], 'date' => dgmdate($value['updatetime'], 'n-j')));
}
}
} else {
$html .= '<li>' . lang('space', 'block_view_noperm') . '</li>';
}
$html = '<div class="content"><ul class="ml mla cl">' . $html . '</ul></div>';
break;
case 'feed':
if (ckprivacy('feed', 'view')) {
require_once libfile('function/feed');
$query = DB::query("SELECT * FROM " . DB::table('home_feed') . " WHERE uid='{$uid}' ORDER BY dateline DESC LIMIT 0,{$shownum}");
while ($value = DB::fetch($query)) {
if (ckfriend($value['uid'], $value['friend'], $value['target_ids'])) {
$html .= mkfeedhtml(mkfeed($value));
//.........这里部分代码省略.........
示例10: template
</div>
</div>
<style id="diy_style" type="text/css"></style>
<div class="wp">
<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
</div><?php include template('home/space_menu'); ?><div id="ct" class="ct1 wp cl">
<div class="mn">
<!--[diy=diycontenttop]--><div id="diycontenttop" class="area"></div><!--[/diy]-->
<div class="bm bw0">
<div class="bm_c">
<?php } } ?>
<div id="feed_div" class="e">
<?php if($hotlist) { ?>
<h4 class="et"><a href="home.php?mod=space&do=home&view=all&order=hot" class="y xw0">查看更多热点 <em>›</em></a>近期热点推荐</h4>
<ul class="el"><?php if(is_array($hotlist)) foreach($hotlist as $value) { $value = mkfeed($value);?><?php include template('home/space_feed_li'); } ?>
</ul>
<?php } if($list) { if($_GET['view'] == 'app' && $_G['setting']['my_app_status']) { include template('home/space_home_feed_app'); } else { if(is_array($list)) foreach($list as $day => $values) { if($_GET['view']!='hot') { ?>
<h4 class="et">
<?php if($day=='yesterday') { ?>昨天<?php } elseif($day=='today') { ?>今天<?php } else { ?><?php echo $day;?><?php } ?>
</h4>
<?php } ?>
<ul class="el"><?php if(is_array($values)) foreach($values as $value) { include template('home/space_feed_li'); } ?>
</ul>
<?php } } } elseif($feed_users) { ?>
<div class="xld xlda mtm"><?php if(is_array($feed_users)) foreach($feed_users as $day => $users) { ?><h4 class="et">
<?php if($day=='yesterday') { ?>昨天<?php } elseif($day=='today') { ?>今天<?php } else { ?><?php echo $day;?><?php } ?>
</h4><?php if(is_array($users)) foreach($users as $user) { $daylist = $feed_list[$day][$user[uid]];?><?php $morelist = $more_list[$day][$user[uid]];?><dl class="bbda cl">
<dd class="m avt">
<?php if($user['uid']) { ?>
示例11: getFeedList
/**
* @author: jason
* @date: 2010-12-16上午11:37:48
* @todo: 获得动态信息
* @params:
*/
public function getFeedList($limit)
{
$cache_key = 'IndexGetFeedList';
$resource = Yii::app()->cache->get($cache_key);
if (!$resource === false) {
return $resource;
}
// 暂只获取相册,活动,群组,投票,话题,心情,日志的动态
$wheresql = "1 AND bb.icon in ('album','blog','click','comment','doing','event','mtag','poll','post','thread','share','wall')";
//没有隐私
$ordersql = "bb.dateline DESC";
$theurl = "space.php?do={$do}&view=all";
//全站feed
$feed_list = array();
$connection = Yii::app()->db_uchome;
$sql = "SELECT * FROM (SELECT * FROM uchome_feed order by dateline DESC limit 200) bb WHERE {$wheresql} group by uid ORDER BY {$ordersql} LIMIT {$limit}";
$command = $connection->createCommand($sql);
$rows = $command->queryAll();
if (!empty($rows)) {
$actors = array();
$a_value = array();
foreach ($rows as $value) {
$actors = "<a href=\"" . UCHOME_API . "/space.php?uid={$value['uid']}\">" . $value['username'] . "</a>";
$a_value = mkfeed($value, $actors);
$a_value['name'] = YiicmsUchome::getUchomeRealname($a_value['uid']);
$feed_list[] = $a_value;
}
}
$data = array('feed_list' => $feed_list);
Yii::app()->cache->set($cache_key, $data, 60 * 5);
return $data;
}