DedeCms2007 V5_RC1个人会员自选空间模板简单教程

softyun3年前cms教程48

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`,
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字段
此行数为修改过后的行数,所给出的代码为修改后的代码,只作参考。
由于时间不多,所以没有太多的图片,只是比较简单容易实现个人会员自选空间模板。此次改动,并没有做后台管理员设置的选项,也没有做企业会员的自选模板,等有时间,我可能会写出相关的教程,由于我也没有用过DEDECMS,只看着代码去修改,难免有错漏的,如果错误,请指出,别丢骂就OK了。

官方原帖:42305

免责声明:本文内容来自用户上传并发布,站点仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。请核实广告和内容真实性,谨慎使用。

相关文章

织梦CMS单页文档应用拓展

 在百度知道里看到一个朋友说  dede织梦程序模板中iframe调用的模板不能生成网页 问题如下:原本的代码是:{dede:include filename="head.htm"/}。 我不想让百度...

织梦DEDECMS教程:去除列表页文章标题加粗标签的方法

最近在用织梦DEDECMS搭架网站的时候,我碰到这种情况:就是生成的列表模板中,列表文章标题全都加粗加黑了,这样看的特别扭。刚开始,我还以为是样式出了问题,我就把列表模板页面的样式检查了一遍,根本没有...

【Flink 标记使用实例】-DedeCMS模板制作使用实例教程(8)

Flink 标记】用于获取友情链接。  调用该标记后可以得到四种友情链接的形式。    使用思路、步骤:   一、明确使用范围     我们在使用任何标记的过程中,都必须明确其使用的范围,否则可能无法...

软件模块加入迅雷联盟代码

修改 /plus/download.php 文件查找<?php在它上面加入<script src="http://pstatic.xunlei/js/webThunderDetect.js...

织梦DedeCMS栏目二级域名绑定方法

织梦DedeCMS栏目二级域名绑定方法1.    概念如果一个域名是abc ,是由一个字符串加一个域名尾,中间用“.”号隔开。这就是一个一级域名,如果在顶级域名前在由“.”隔开加上不同的字符,比如bb...

防止织梦dedecms被挂黑链的几个要点

今天教给大家一些为防止织梦dedecms被挂黑的几个要点:,希望能给各位织梦爱好者们带来帮助,总共分四点:一、按织梦官方公布的安全目录设置一次,这些一般只适用于使用独立服务器的站长,因为在虚拟主机里很...