织梦DEDECMS个人会员自选空间模板简单方法 。
1、数据库member表spacename后增加字段spacetemplets字段添加数据库字段
2、在member/templets/space/目录增加几个自选模板文件夹如:member/templets/space/1/member/templets/space/2/member/templets/space/3/增加自选模板
3、修改member/index.php104行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("SelectID,uname,spacename,spacetemplets,spaceimage,news,sex,c1,c2,spaceshow,logintime,scores Fromdede_member where `$fieldname`=’{$fieldvalue}’; ");143行$spaceInfos = $dsql->GetOne("Select ID, userid, `type`,uname,c1,c2,spaceshow,logintime,spacename,spacetemplets,spaceimage,news,scores Fromdede_member where `$fieldname`=’{$fieldvalue}’; ");184行$spaceInfos = $dsql->GetOne("Select ID, userid, `type`, 字串8uname,c1,c2,spaceshow,logintime,spacename,spacetemplets,spaceimage,news,scores Fromdede_member where `$fieldname`=’{$fieldvalue}’; ");224行$spaceInfos = $dsql->GetOne("Select ID, userid, `type`,uname,c1,c2,spaceshow,logintime,spacename,spacetemplets,spaceimage,news,scores Fromdede_member where `$fieldname`=’{$fieldvalue}’; ");258行$spaceInfos = $dsql->GetOne("Select ID, userid, `type`,uname,c1,c2,spaceshow,logintime,spacename,spacetemplets,spaceimage,news,scores Fromdede_member where `$fieldname`=’{$fieldvalue}’; ");292行$spaceInfos = $dsql->GetOne("Select ID, userid, `type`,uname,c1,c2,spaceshow,logintime,spacename,spacetemplets,spaceimage,news,scores Fromdede_member where `$fieldname`=’{$fieldvalue}’; ");增加spacetemplets字段
4、member/space_info.php7行require_once(dirname(__FILE__)."/templets/space/".$spacetemplets."/member_infos.htm");增加spacetemplets字段
5、member/templets/space_info.htm58行后增加<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.php327行$upquery = "Update dede_member setspacename=’$spacename’,spacetemplets=’$spacetemplets’,spaceimage=’$spaceimage’,news=’$news’,mybb=’$mybb’where ID=’".$cfg_ml->M_ID."’;增加spacetemplets字段