Phpcms Content--Add the ability to open an article link in comment management

Source: Internet
Author: User

What you need to do: Add the ability to open article links in the admin system under content -- Comment management

1. The database tables are v9_comment and v9_comment_data_1.

V9_comment is the message of the article being commented on. Id,title,url and so on. The main URL is the link to the article

Phpcms the link to the article is recorded in the database, the direct call under the good, otherwise you will have a busy. This link can be opened directly in the background, opening a shortcut.

2. Open/phpcms/modules/comment/templates/comment_listinfo.tpl.php


The comment_listinfo.tpl.php file is the background of the comment management page, such as.

Search this page for "<tr id=" tbody_<?php echo $v [' id ']?> ' > '

The modified code is:

Table Header Modification:

<thead>            <tr>             <th width= "><input type=" checkbox "value=" "id=" Check_box "onclick=" SelectAll (' ids[] '); " ></th>            Echo L (' author ')?></th>            echo L (' comment ')?></th>            Echo L (' original '). L (' title '); ></th>                     <!----modified code----->            <th width= > Action </th>                     <!-- --Modified Code----->            echo L (' operations_manage ');? ></th>            </tr>        </thead>    

Table Data modification:

<tr id= "tbody_<?php Echo$v[' id ']?> ' > <td align= ' center ' width= ' + ' ><inputclass= "Inputcheckbox" name= "ids[" "value=" <?php Echo$v[' id '];? > "type=" checkbox "></td> <td width=" "><?phpEcho $v[' username ']?><br/><?phpEcho $v[' IP ']?></td> <td><font color= ' #888888 ' ><?phpEchoL (' chez ')?> <?phpEchoFormat::Date($v[' Creat_at '], 1)?> <?phpEchoL (' release ')? ></font><br/><?phpEcho $v[' content ']?></td> <td width= ' ><a href= '?m=comment&c=comment_admin&a=listinfo& search=1&searchtype=0&keyword=<?php Echo UrlEncode ($comment _info[' title '])? >&pc_hash=<?php Echo$_session[' Pc_hash ']?>&tableid=<?php Echo$tableid?> "><?phpEcho $comment _info[' title ']?></td><!--modified code-------><td><a href= "<?php Echo$comment _info[url]?> "target=" _blank "> Open </a></td><!--modified code------->&LT;TD align= ' center ' width= "><a href="? m=comment&c=comment_admin&a=del&ids=<?php Echo$v[' ID ']?>&tableid=<?php echo$tableid? >&dosubmit=1 "onclick=" return check (<?php Echo$v[' id ']?>,-1, ' <?php echo new_html_special_chars ($v[' Commentid ']);? > ') "><?phpEchoL (' delete '); ></a> </td> </tr>

That's all you can do.

Phpcms Content--Add the ability to open an article link in comment management

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.