Use the comment extension on ThinkPHP

Source: Internet
Author: User

Some of the websites visited by netizens have changed in some parts. For example, the comment module of the article is designed to be harmonious and beautiful, integrating expressions and sharing tools, and building-based comments, at that time, I was so excited that I could develop such a comment module! Later, I learned about the chat. They used the comments plug-in.

What is more?

This is a social comment box for the ultimate experience. You can use Weibo, QQ, Renren, Douban, and other accounts to log on and comment, and use a social account to log on and comment, it is also forwarded to the social media platform (optional) for replying, marking, and forwarding. The cross-platform comment aggregation effect can effectively improve the return visit traffic. In more words, it has features such as high-quality user experience, speed and stability, social recommendation and in-depth integration of website building programs, and spam comment filtering.


Experience ThinkPHP


My blog's comment module encountered a bottleneck in the development process. The appearance of more words is undoubtedly a surprise in the endless waters.

My Wangzhi blog was developed based on ThinkPHP. I 'd like to Baidu to see how other people use ThinkPHP to comment more, but I was a little disappointed later. It seems that the shortcut cannot be implemented, that's all you need to do.

I thought it was complicated to use it. It seems that I have been thinking about it for an hour or two. Now I want to share my experience with you.

I. Register an account

Go to duoshuo.com to register an account. Register an account.


2. Create a site http://www.111cn.net

Log on to your account and create a site, as shown in the following figure:

It's easy. You just need to fill in the following information:

1. Site name

2. Site address

3. Multi-statement domain name (that is, a second-level domain name allocated in the multi-statement mode, which is customized .)

For other options, leave them blank. At the end of this step, click create.


3. Get code

Click back-end management on the basis of the previous site creation. The name of the site you just created appears in the drop-down list, as shown in the figure below.

Click the site created earlier. Here, I created "Wangzhi Blog". After opening the page, click the tool and get the code. Note that you need to select the common code, as shown in the figure

 


As shown in the figure above, many website systems have dedicated code, except ThinkPHP.


The following is the code for creating my blog:

The code is as follows: Copy code
<! -- DuoshuoCommentBEGIN -->
<Divclass = "ds-thread"> </div>
<Scripttype = "text/javascript">
VarduoshuoQuery = {short_name: "w3note "};
(Function (){
Vards = document. createElement ('script ');
Ds. type = 'text/javascript '; ds. async = true;
Ds. src = 'http: // static.duoshuo.com/embed.js ';
Ds. charset = 'utf-8 ';
(Document. getElementsByTagName ('head') [0]
| Document. getElementsByTagName ('body') [0]). appendChild (ds );
})();
</Script>
<! -- DuoshuoCommentEND -->

Copy the common code of the website and paste it to any location between your webpage code <body> and </body>. If your website uses a template, paste it into the template code. If you still don't understand it, paste the common code to the article template page, then refresh the article, and you will see the effect. Then adjust the css layout as appropriate.


By using the above method, you can remove the comment module of your website. Of course, the comment plug-in function will never stop here, and the rest will be discussed later.

 

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.