会员信息在个人模板info和index的调用问题
将Inc/space_action.php文件中的
- /*---------------------------------
- 个人资料
- function infos(){ }
- -------------------------------------*/
- else if($action=='infos')
- {
- include_once(DEDEDATA.'/enums/nativeplace.php');
- include_once(DEDEINC."/enums.func.php");
- $row = $dsql->GetOne("select * from `dede_member_person` where mid='{$_vars['mid']}' ");
- $dpl = new DedeTemplate();
- $dpl->LoadTemplate(DEDEMEMBER."/space/{$_vars['spacestyle']}/infos.htm");
- $dpl->display();
- }
拷贝到index.php 经过筛选后的此位置,
- /*-----------------------------
- //会员空间主页
- function space_index(){ }
- ------------------------------*/
- else
- {
- require_once(DEDEMEMBER.'/inc/config_space.php');
- if($action == '')
- {
- include_once(DEDEINC."/channelunit.func.php");
- $dpl = new DedeTemplate();
- $tplfile = DEDEMEMBER."/space/{$_vars['spacestyle']}/index.htm";
改写方式如下
- /*-----------------------------
- //会员空间主页 www.xxxx.com 网站建设
- function space_index(){ }
- ------------------------------*/
- else
- {
- require_once(DEDEMEMBER.'/inc/config_space.php');
- include_once(DEDEDATA.'/enums/nativeplace.php');/*--后添加复制过来--*/
- include_once(DEDEINC."/enums.func.php");/*--后添加复制过来--*/
- if($action == '')
- {
- include_once(DEDEINC."/channelunit.func.php");
- $row = $dsql->GetOne("select * from `dede_member_person` where mid='{$_vars['mid']}' ");/*--后添加复制过来--*/
- $dpl = new DedeTemplate();
- $tplfile = DEDEMEMBER."/space/{$_vars['spacestyle']}/index.htm";
综上所述 只要在相应的位置添加以下三条数据即可
- include_once(DEDEDATA.'/enums/nativeplace.php');/*--后添加复制过来--*/
- include_once(DEDEINC."/enums.func.php");/*--后添加复制过来--*/
- $row = $dsql->GetOne("select * from `dede_member_person` where mid='{$_vars['mid']}' ");/*--后添加复制过来--*/
备注:相应的其他页面只需要在 Inc/space_action.php 统一添加三条语句即可 。