加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > CMS系统 > Dedecms > 正文

DEDECMS会员空间调用收藏

发布时间:2020-12-14 05:27:42 所属栏目:Dedecms 来源:网络整理
导读:第一步 打开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' ); ???? '/channelunit.func.php' );

第一步

打开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');
????'/channelunit.func.php');
????$sql?=?"SELECT?s.*,t.*?FROM?`dede_member_stow`?AS?s?left?join?`dede_member_stowtype`?AS?t?on?t.stowname=s.type??where?s.mid='{$_vars['mid']}'?order?by?s.id?desc";
$dlist?=?new?MemberListview();
$dlist->pageSize?=20;
->SetParameter("action",);
->SetTemplate(DEDEMEMBER."/space/{$_vars['spacestyle']}/list_stow.htm");
->SetSource($sql);
->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:include?file='header.htm'/}
<div?class="wrapper?mT10">
??"west">
{dede:include?file='side_icon.htm'/}
????{dede:include?file='side_class.htm'/}
{dede:include?file='side_visitor.htm'/}
{dede:include?file='side_search.htm'/}
div>
"east">
dl?"border">
??????dt?"caption"><strong>收藏>dt>
dd?"body">
{dede:datalist}
????????"mp10?dashed">
??????????"mB10">
h3?"fLeft"a?href'archives_do.php?dopost=viewArchives&aid={dede:field.aid/}'?target'_blank'>{dede:field.title/}ah3>
span?"mL5?aGray">({dede:field.addtime?function="MyDate('Y-m-d?h:i',@me)"/})span>
>
"clearfix?pB10">
>
{/dede:datalist}
"fRight?mTB10?pd10">{dede:pagelist?/}>
"clearfix">
dd>
dl>
>
>
{dede:include?file='footer.htm'/}
body>
html>

第三步 在/member/space/你当前所使用的风格目录下的header.htm里的导航中增加

1
li"index.php?uid={dede:var.userid_e?/}&action=stow" 以上为增加收藏的列表显示方式,下边是在侧边栏调用最新的10条收藏记录。

将以下代码保存为side_stow.htm,249) !important;">

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15