亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        DEDECMS會(huì)員信息在個(gè)人模板info和index的調(diào)用問題

        字號(hào):


            會(huì)員信息在個(gè)人模板info和index的調(diào)用問題,好長(zhǎng)時(shí)間沒解決 論壇發(fā)帖沒人回答 看了一晚上代碼 自己解決了。
            會(huì)員個(gè)人空間 index.htm 、 listarticle.htm不能像infos.htm模板一樣使用
            <?php echo GetEnumsValue('pfirst',$row['pfirst']); ?> 語句來調(diào)用自定義聯(lián)動(dòng)數(shù)據(jù),會(huì)報(bào)錯(cuò)
            會(huì)員index.php以及變量文件index_do.php都由變量控制,首頁模板在index.php中改寫,其他文件則在會(huì)員文件夾下Inc/space_action.php中有說明。
            以下為例子,要讓index.htm同樣和infos.htm一樣調(diào)用處聯(lián)動(dòng)數(shù)據(jù),header.htm跟隨模板文件的改動(dòng)而相應(yīng),比如infos支持,這個(gè)頁面的header.htm加在調(diào)用會(huì)成功,否則失敗報(bào)錯(cuò)。
            將Inc/space_action.php文件中的
            代碼如下:
            /*---------------------------------
            個(gè)人資料
            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 經(jīng)過篩選后的此位置,
            代碼如下:
            /*-----------------------------
            //會(huì)員空間主頁
            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";
            改寫方式如下
            代碼如下:
            /*-----------------------------
            //會(huì)員空間主頁
            function space_index(){ }
            ------------------------------*/
            else
            {
            require_once(DEDEMEMBER.'/inc/config_space.php');
            include_once(DEDEDATA.'/enums/nativeplace.php');/*--后添加復(fù)制過來--*/
            include_once(DEDEINC."/enums.func.php");/*--后添加復(fù)制過來--*/
            if($action == '')
            {
            include_once(DEDEINC."/channelunit.func.php");
            $row = $dsql->GetOne("select * from `dede_member_person` where mid='{$_vars['mid']}' ");/*--后添加復(fù)制過來--*/
            $dpl = new DedeTemplate();
            $tplfile = DEDEMEMBER."/space/{$_vars['spacestyle']}/index.htm";
            綜上所述 只要在相應(yīng)的位置添加以下三條數(shù)據(jù)即可
            代碼如下:
            include_once(DEDEDATA.'/enums/nativeplace.php');/*--后添加復(fù)制過來--*/
            include_once(DEDEINC."/enums.func.php");/*--后添加復(fù)制過來--*/
            $row = $dsql->GetOne("select * from `dede_member_person` where mid='{$_vars['mid']}' ");/*--后添加復(fù)制過來--*/
            備注:相應(yīng)的其他頁面只需要在 Inc/space_action.php 統(tǒng)一添加三條語句即可