树缝里也漏着一两点路灯光,没精打彩的,是渴睡人的眼。春尚浅,几处山顶上的梅花却挣扎着吐出红苞来。微风柔和地吹,柔和地爱抚我的面孔。荷塘里的荷花都羞涩地打着朵。落叶随着风高低起舞。
第一步
打开member/inc/space_action.php
将以下代码加入到最底部
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//我的收藏 else if ( $action == 'stow' ) {
include_once (DEDEINC. '/arc.memberlistview.class.php' );
include_once (DEDEINC. '/channelunit.func.php' );
$sql = "SELECTs.*,t.*FROM`dede_member_stow`ASsleftjoin`dede_member_stowtype`AStont.stowname=s.typewheres.mid='{$_vars['mid']}'orderbys.iddesc" ;
$dlist = new MemberListview();
$dlist ->pageSize=20;
$dlist ->SetParameter( "action" , $action );
$dlist ->SetTemplate(DEDEMEMBER. "/space/{$_vars['spacestyle']}/list_stow.htm" );
$dlist ->SetSource( $sql );
$dlist ->Display();
exit (); } |
第二步
将以下代码保存为list_stow.htm,保存在/member/space/你当前所使用的风格目录下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{dede:includefile='header.htm'/} < div class = "wrappermT10" >
< div class = "west" >
{dede:includefile='side_icon.htm'/}
{dede:includefile='side_class.htm'/}
{dede:includefile='side_visitor.htm'/}
{dede:includefile='side_search.htm'/}
</ div >
< div class = "east" >
< dl class = "border" >
< dt class = "caption" >< strong >收藏</ strong ></ dt >
< dd class = "body" > {dede:datalist}
< div class = "mp10dashed" >
< div class = "mB10" >
< h3 class = "fLeft" >< a href = 'archives_do.php?dopost=viewArchives&aid={dede:field.aid/}' target = '_blank' >{dede:field.title/}</ a ></ h3 >
< span class = "mL5aGray" >({dede:field.addtimefunction="MyDate('Y-m-dh:i',@me)"/})</ span >
</ div >
< div class = "clearfixpB10" ></ div >
</ div > {/dede:datalist}
< div class = "fRightmTB10pd10" >{dede:pagelist/}</ div >
< div class = "clearfix" ></ div >
</ dd >
</ dl >
</ div > </ div > {dede:includefile='footer.htm'/} </ body > </ html > |
第三步 在/member/space/你当前所使用的风格目录下的header.htm里的导航中增加
1
|
< li >< a href = "index.php?uid={dede:var.userid_e/}&action=stow" >< span >收藏</ span ></ a ></ li > |
以上为增加收藏的列表显示方式,下边是在侧边栏调用最新的10条收藏记录。
第一步
将以下代码保存为side_stow.htm,保存在/member/space/你当前所使用的风格目录下
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<!--//links--> < dl class = "bordermT10" >
< dt class = "caption" >< strong >收藏</ strong ></ dt >
< dd class = "bodylh20" >
< ul class = "list2mB5" >
<? php
$dsql->Execute('fl',"Select*From`dede_member_stow`wheremid='{$_vars['mid']}'orderbyiddesclimit10");
while($arr=$dsql->GetArray('fl'))
{
echo"< li >< a href = 'archives_do.php?dopost=viewArchives&aid={$arr[' aid']}' target = '_blank' >{$arr['title']}</ a ></ li >\r\n";
}
?>
</ ul >
</ dd > </ dl > |
然后打开当前风格的index.htm 找到
1
|
{dede:includefile='side_links.htm'/} |
在其下方增加
1
|
{dede:includefile='side_stow.htm'/} |
完成。
到此这篇关于DEDECMS会员空间调用收藏就介绍到这了。若是时间允许,自己还会在哪些地方做得更好等等,只有坚持这样,你才可能有快速的进步。更多相关DEDECMS会员空间调用收藏内容请查看相关栏目,小编编辑不易,再次感谢大家的支持!