您现在的位置是:首页 > cms教程 > DedeCMS教程DedeCMS教程
dedecms织梦会员空间更换模板教程
王封安2024-06-07DedeCMS教程已有人查阅
导读dedecms会员空间更换模板教程:1、数据库member表spacename后增加字段spacetemplets字段2、在member/templets/space/目录增加几个自选模板文件夹
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, ,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行后增加
6、member/index_do.php
327行
此行数为修改过后的行数,所给出的代码为修改后的代码,只作参考。
由于时间不多,所以没有太多的图片,只是比较简单容易实现个人会员自选空间模板。此次改动,并没有做后台管理员设置的选项,也没有做企业会员的自选模板,等有时间,我可能会写出相关的教程,由于我也没有用过DEDECMS,只看着代码去修改,难免有错漏的,如果错误,请指出,别丢骂就OK了。
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, ,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了。
本文标签:
很赞哦! ()
相关教程
图文教程
织梦模板修改{dede:list}标签后可支持权重排序
织梦模板修改{dede:list}标签后,可支持权重排序、flag标签功能在开发过程中客户需要在列表中支持权重排序,和推荐功能。经过不断的摸索,终于将{dede:list}标签修改成功。
dedecms入门教程dedecms5.7系统基本设置教程
前面一章我们讲到了dedecms的安装,那么程序安装完成后接下来要做的工作就是对网站做一些基本的设置了,这一章我们就来讲讲dedecms系统本设置的问题。
织梦dedecms5.6游客匿名投稿功能实现方法
织梦DeDECms5.6 游客匿名投稿功能实现方法,需要的朋友可以参考下。1.进入dede后台:核心–内容模型管理–普通文章
dedecms5.7后台首页很卡怎么办
Dedecms5.7上传到服务器后感觉进入后台首页很卡,而且服务器占用CPU会飚升,服务器和浏览器都会卡到。后来在论坛找到解决办法,如下:
相关源码
-
(自适应响应式)HTML5幕墙装饰工程建筑装修公司pbootcms模板下载基于PbootCMS开发的响应式模板,为幕墙工程、建筑装饰企业设计,通过数字化展示提升企业专业形象与项目展示能力。结构化数据标记增强项目案例收录,智能URL路由优化,支持每个工程案例独立设置关键词与描述查看源码 -
(自适应)大气办公用品耗材供应打印机产品维修网站模板下载基于PbootCMS系统开发的响应式网站模板,为营销技术博主、数字产品评测者设计。采用前沿的响应式技术,确保内容在手机端和桌面端都能获得较佳阅读体验,帮助用户高效展示技术文章和产品分析。查看源码 -
(PC+WAP)红色驾校培训学车在线预约源码下载基于PbootCMS内核开发的驾校培训专用网站模板,深度适配驾驶培训行业展示需求。采用PC与移动端同步响应设计,单一后台统一管理内容数据,更换图文素材后可快速转变为其他行业网站。查看源码 -
自适应营销型IT网络工作室互联网建站公司pbootcms网站模板为IT网络服务商、建站企业打造的高性能营销门户,基于PbootCMS开源内核深度开发采用HTML5自适应架构,实现PC与手机端数据实时同步交互。查看源码 -
HTML5响应式健身俱乐部pbootcms网站模板下载为健身俱乐部、瑜伽中心及运动场馆设计的响应式网站模板,采用PbootCMS内核开发,支持一键替换图文适配健身器材销售、瑜伽工作室等多类型运动健康产业。查看源码 -
响应式WordPress简约博客主题Alt_BlogAlt_Blog主题该模板为博客内容展示设计,采用简约现代的风格理念,打造清晰的内容呈现平台。响应式布局确保在不同设备上都能获得良好的浏览体验,帮助博主更好地展示和分享内容。查看源码
| 分享笔记 (共有 篇笔记) |
