DEDECMS 5.3 Custom node container template fixes

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

have been using DEDECMS, the feeling is a very good open source free CMS system, very easy to use. Recently in the use of DEDECMS feature, found a problem, that the Custom node container template does not work, and then looked at the relevant files, found that this feature is not useful. Luckily Dede was open source, so he started it. Do you also want to use your own thematic features to improve it? Here, follow me to operate, very simple.

1. Modify template files for adding/editing topics
The file is located in the spec_edit.htm file under Dede\templets, opens the file and finds "a single record template:" and adds the following code after </tr>


<tr>
            <td> node container template: </ TD
            <TD colspan= "2" ><input name = "notetemplet<?php echo $i?>" type= "text" id= "notetemplet<?php echo $i?>" value= "system/channel_spec_ Note.htm "style=" width:300 "
               <input type= "button" Name= "selno<?php echo $i?>" value= "Browse ..." style= "width:70" onclick= " Selecttemplets (' form1.notetemplet<?php echo $i?> '); ></td>
          </tr>
Note that there are two places to add, following the teaching lookup " Template for a single record: "Add the same code below </tr>. OK, the template file is done.

2. Modify the spec_add.php, spec_edit.php file
(1) below the Dede directory to find $listtmp = Trim (${' listtmp '. $i}); add $notetemplet below = Trim ($ {' Notetemplet '. $i});
(2) to find the $notelist. = Add notetemplet=\\ ' $notetemplet \ '
to the tag to modify it, you can select the Custom node container template when you add/edit the topic, and then look at the 3rd.

3. Modify the \include\taglib\channel\specialtopic.lib.php file
Find $rownum = Trim ($ctag->getatt (' Pseudocolumn ')); Add the following code below
Read the Custom System Node container template, the template must be located under Templets/system. by HHJ
$notetemplet = Trim ($ctag->getatt (' Notetemplet '));
if ($notetemplet)
{
$notetemplet = substr ($notetemplet, Strpos ($notetemplet, '/') +1);
$TEMPSTR = Getsystemplets ($notetemplet);
}
Else
{
$TEMPSTR = Getsystemplets ("channel_spec_note.htm");
}

All the changes are done, and make sure to back up when you modify the file. Effects can be seen: http://www.zyao.net/zhuanti/zhongyaozhongzhi.html if not modified can be: http://hhj.gx.cn/post/316/to download the modified file.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.