很多人裝了wowo主頁的幻燈片卻只出現一個X
解決方法:
打開index.php在//應用上面添加以下代碼:
//首頁焦點圖輪換,調用全局動態sitefeed備註中含有《推薦》字樣
$focuskey='推薦';
$query = $_SGLOBAL['db']->query("SELECT feedid,image_1,image_2,image_3,image_1_link,image_2_link,image_3_link FROM ".tname('feed')." WHERE uid=0 AND body_general like '%".$focuskey."%' ORDER BY dateline DESC LIMIT 0,1");
$ifocus = $_SGLOBAL['db']->fetch_array($query);
$myfocus = array();
if($ifocus[image_1]){$myfocus[]=$myvalue=array('image'=>$ifocus[image_1],'link'=>$ifocus[image_1_link]);}
if($ifocus[image_2]){$myfocus[]=$myvalue=array('image'=>$ifocus[image_2],'link'=>$ifocus[image_2_link]);}
if($ifocus[image_3]){$myfocus[]=$myvalue=array('image'=>$ifocus[image_3],'link'=>$ifocus[image_3_link]);}
//競價排名
$showlist = array();
$query = $_SGLOBAL['db']->query("SELECT sh.note, s.* FROM ".tname('show')." sh
LEFT JOIN ".tname('space')." s ON s.uid=sh.uid
ORDER BY sh.credit DESC LIMIT 0,23");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
realname_set($value['uid'], $value['username'], $value['name'], $value['namestatus']);
$value['note'] = addslashes(getstr($value['note'], 80, 0, 0, 0, 0, -1));
$showlist[$value['uid']] = $value;
}
if(empty($star) && $showlist) {
$star = sarray_rand($showlist, 1);
}
//在線用戶
$onlinelist = array();
$query = $_SGLOBAL['db']->query("SELECT s.*, sf.note FROM ".tname('session')." s
LEFT JOIN ".tname('spacefield')." sf ON sf.uid=s.uid
ORDER BY s.lastactivity DESC LIMIT 0,12");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
if(!$value['magichidden']) {
$value['note'] = shtmlspecialchars(strip_tags($value['note']));
realname_set($value['uid'], $value['username']);
$onlinelist[$value['uid']] = $value;
}
}
if(empty($star) && $onlinelist) {
$star = sarray_rand($onlinelist, 1);
}
//大家的最新動態
$feedlist = array();
$query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('feed')." WHERE friend='0' ORDER BY dateline DESC LIMIT 0,10");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
realname_set($value['uid'], $value['username']);
$feedlist[] = $value;
}
//格式化動態
foreach ($feedlist as $key => $value) {
$feedlist[$key] = mkfeed($value);
}
=======================
打開source/network.php在//應用上面添加以下代碼:
//首頁焦點圖輪換,調用全局動態sitefeed備註中含有首頁字樣,Dwowo.com自定義
$focuskey='推薦';
$query = $_SGLOBAL['db']->query("SELECT feedid,image_1,image_2,image_3,image_1_link,image_2_link,image_3_link FROM ".tname('feed')." WHERE uid=0 AND body_general like '%".$focuskey."%' ORDER BY dateline DESC LIMIT 0,1");
$ifocus = $_SGLOBAL['db']->fetch_array($query);
$myfocus = array();
if($ifocus[image_1]){$myfocus[]=$myvalue=array('image'=>$ifocus[image_1],'link'=>$ifocus[image_1_link]);}
if($ifocus[image_2]){$myfocus[]=$myvalue=array('image'=>$ifocus[image_2],'link'=>$ifocus[image_2_link]);}
if($ifocus[image_3]){$myfocus[]=$myvalue=array('image'=>$ifocus[image_3],'link'=>$ifocus[image_3_link]);}
//競價排名
$showlist = array();
$query = $_SGLOBAL['db']->query("SELECT sh.note, s.* FROM ".tname('show')." sh
LEFT JOIN ".tname('space')." s ON s.uid=sh.uid
ORDER BY sh.credit DESC LIMIT 0,23");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
realname_set($value['uid'], $value['username'], $value['name'], $value['namestatus']);
$value['note'] = addslashes(getstr($value['note'], 80, 0, 0, 0, 0, -1));
$showlist[$value['uid']] = $value;
}
if(empty($star) && $showlist) {
$star = sarray_rand($showlist, 1);
}
//在線用戶
$onlinelist = array();
$query = $_SGLOBAL['db']->query("SELECT s.*, sf.note FROM ".tname('session')." s
LEFT JOIN ".tname('spacefield')." sf ON sf.uid=s.uid
ORDER BY s.lastactivity DESC LIMIT 0,12");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
if(!$value['magichidden']) {
$value['note'] = shtmlspecialchars(strip_tags($value['note']));
realname_set($value['uid'], $value['username']);
$onlinelist[$value['uid']] = $value;
}
}
if(empty($star) && $onlinelist) {
$star = sarray_rand($onlinelist, 1);
}
if($space['self'] && empty($start)) {
//好友申請
$addfriendcount = getcount('friend', array('fuid'=>$space['uid'], 'status'=>0));
//群組邀請
$mtaginvitecount = getcount('mtaginvite', array('uid'=>$space['uid']));
//應用請求
if($_SCONFIG['my_status']) {
$myinvitecount = getcount('myinvite', array('touid'=>$space['uid']));
}
//舉報管理
if(checkperm('managereport')) {
$newreport = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM ".tname('report')." WHERE new='1'"), 0);
}
//等待實名認證
if($_SCONFIG['realname'] && checkperm('managename')) {
$namestatus = $_SGLOBAL['db']->result($_SGLOBAL['db']->query("SELECT COUNT(*) FROM ".tname('space')." WHERE namestatus='0' AND name!=''"), 0);
}
//打招呼
$pokecount = getcount('poke', array('uid'=>$space['uid']));
}
//熱門群組
$mtaglist = $wthreadlist = array();
$query = $_SGLOBAL['db']->query("SELECT tagid,tagname,membernum,pic FROM ".tname('mtag')." ORDER BY membernum DESC LIMIT 0,2");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
if(empty($value['pic'])) {
$value['pic'] = 'image/nologo.jpg';
}
$mtaglist[] = $value;
//最新話題
$query2 = $_SGLOBAL['db']->query("SELECT tid,subject,uid,username FROM ".tname('thread')." WHERE tagid='$value[tagid]' ORDER BY dateline DESC LIMIT 0,3");
while ($thread = $_SGLOBAL['db']->fetch_array($query2)) {
$wthreadlist[$value['tagid']][] = $thread;
}
}
//大家的最新動態
$feedlist = array();
$query = $_SGLOBAL['db']->query("SELECT * FROM ".tname('feed')." WHERE friend='0' ORDER BY dateline DESC LIMIT 0,10");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
realname_set($value['uid'], $value['username']);
$feedlist[] = $value;
}
//格式化動態
foreach ($feedlist as $key => $value) {
$feedlist[$key] = mkfeed($value);
}
====================
以上兩個檔中的$focuskey='推薦';
就是備註中要有"推薦"
如果你的檔案不是"推薦".請修改$focuskey='推薦';
文字和備註要一樣... |