DEDECMS个人会员自选空间模板简单方法

相关案例演示
织梦DEDECMS个人会员自选空间模板简单方法 。

1、数据库member表spacename后增加字段spacetemplets字段
添加数据库字段
2、在member/templets/space/目录增加几个自选模板文件夹
如:
member/templets/space/1/
member/templets/space/2/
member/templets/space/3/
增加自选模板
3、修改member/index.php
104行
require_once(dirname
(__FILE__)."/templets/space/".$spacetemplets."/member_info.htm");
132行
require_once(dirname
(__FILE__)."/templets/space/".$spacetemplets."/member_guestbook_form.htm");
167行
require_once(dirname
(__FILE__)."/templets/space/".$spacetemplets."/member_index.htm");
213行
require_once(dirname
(__FILE__)."/templets/space/".$spacetemplets."/member_group.htm"); 此行数为修改过后的行数,所给出的代码为修改后的代码,只作参考。
253行
require_once(dirname
(__FILE__)."/templets/space/".$spacetemplets."/member_threads.htm");
287行
require_once(dirname
(__FILE__)."/templets/space/".$spacetemplets."/member_asks.htm");
321行
require_once(dirname
(__FILE__)."/templets/space/".$spacetemplets."/member_infos.htm");
增加".$spacetemplets."/路径
115行
$spaceInfos = $dsql->GetOne("Select
ID,uname,spacename,spacetemplets,spaceimage,news,sex,c1,c2,spaceshow,logintime,scores From
dede_member where `$fieldname`=’{$fieldvalue}’; ");
143行
$spaceInfos = $dsql->GetOne("Select ID, userid, `type`,
uname,c1,c2,spaceshow,logintime,spacename,spacetemplets,spaceimage,news,scores From
dede_member where `$fieldname`=’{$fieldvalue}’; ");
184行
$spaceInfos = $dsql->GetOne("Select ID, userid, `type`, 字串8
uname,c1,c2,spaceshow,logintime,spacename,spacetemplets,spaceimage,news,scores From
dede_member where `$fieldname`=’{$fieldvalue}’; ");
224行
$spaceInfos = $dsql->GetOne("Select ID, userid, `type`,
uname,c1,c2,spaceshow,logintime,spacename,spacetemplets,spaceimage,news,scores From
dede_member where `$fieldname`=’{$fieldvalue}’; ");
258行
$spaceInfos = $dsql->GetOne("Select ID, userid, `type`,
uname,c1,c2,spaceshow,logintime,spacename,spacetemplets,spaceimage,news,scores From
dede_member where `$fieldname`=’{$fieldvalue}’; ");
292行
$spaceInfos = $dsql->GetOne("Select ID, userid, `type`,
uname,c1,c2,spaceshow,logintime,spacename,spacetemplets,spaceimage,news,scores From
dede_member where `$fieldname`=’{$fieldvalue}’; ");
增加spacetemplets字段
4、member/space_info.php
7行
require_once(dirname
(__FILE__)."/templets/space/".$spacetemplets."/member_infos.htm");
增加spacetemplets字段
5、member/templets/space_info.htm
58行后增加
<tr> 
<td height="24" colspan="2" bgcolor="#FBFEEF" > 选择模板:</td>
</tr>
<tr> 
<td height="35" colspan="2" >   
<input name="spacetemplets" type="text" id="spacetemplets" size="35" 
value="<?php echo $spacetemplets?>" class="company_manage_form_label" /> 
</td>
</tr>
会员空间自选模板效果
6、member/index_do.php
327行
$upquery = "Update dede_member set
spacename=’$spacename’,spacetemplets=’$spacetemplets’,spaceimage=’$spaceimage’,news=’$news’,mybb=’$mybb’
where ID=’".$cfg_ml->M_ID."’;
增加spacetemplets字段
 

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。


来源:网友投稿 关注: 时间:2020-05-19 08:31
首先声明,只要是我们的vip会员所有源码均可以免费下载,不做任何限制(了解更多)
☉本站的源码不会像其它下载站一样植入大量的广告。为了更好的用户体验以后坚持不打水印
☉本站只提供精品织梦源码,源码在于可用,不在多!!希望在这里找到你合适的。
☉本站提供的整站织梦程序,均带数据及演示地址。可以在任一源码详情页查看演示地址
☉本站所有资源(包括源码、模板、素材、特效等)仅供学习与参考,请勿用于商业用途。
☉如有其他问题,请加网站客服QQ进行交流。
相关织梦教程
QQ在线咨询