下了YOHO风格,发现圈子里有两个数据调用是空白,看了很多用YOHO风格的站,都是一样的,于是自己写了两个
1.右边需要关心圈子
SQL:SELECT * FROM `dnewhome_mtag` AS `mtag` ORDER BY `mtag`.`membernum` ASC
HTML代码:
<ul>
<!--{loop $_SBLOCK['block3'] $value}-->
<li><IMG height=10 src="template/yohocss/image/g_index_icon.gif" width=12><a href="space.php?do=mtag&tagid=$value[tagid]" target="_blank">$value[tagname]</a></li>
<!--{/loop}-->
</ul>
2.活跃圈主
看了下YOHO风格,不知道他根据什么判断活跃的,俺就根据圈主的主题和回复数判断
SQL:SELECT max(tagid) as qid,a.uid,a.username,(case when renumber is null then 0 else renumber end) as renumber FROM (select uid,username,tagid from dnewhome_tagspace where grade>'7') as a left join (select uid,count(*) as renumber from dnewhome_post group by uid) as b on a.uid=b.uid group by a.uid,a.username
HTML代码:
<!--{loop $_SBLOCK['block4'] $value}-->
<DIV class=p_user_list>
<DL>
<DT><a href="space.php?uid=$value[uid]"><img src="<!--{avatar($value[uid],small)}-->" /></a>
</DT>
<DD class=p_user_name><SPAN class=font_yellow><B><a href="space.php?uid=$value[uid]">$value[username]</a></B></SPAN></DD>
<DD class="p_user_info font_gray">参与主题:$value[renumber] <IMG height=10 src="template/yohocss/image/icon_rendu.gif" width=11 ><br /><a href="space.php?do=mtag&tagid=$value[qid]">进入群组</a></DD>
</DL>
</DIV>
<!--{/loop}-->
注意下,上面图片路径改成自己的,还有'block3','block4'那个自己看下是多少
AD下,新站右愿意做连接的不
www.dnewhome.cn |