Thinkphp on the use of multiple-comment plugin method _php instance

Source: Internet
Author: User

This article gives an example of how to use the thinkphp comment plugin on the system. Share to everyone for your reference. The implementation methods are as follows:

Previous visits to some of the Web site, they are better parts have changed, such as the article's comments module designed to be harmonious and beautiful, set expression and sharing tools in one, and can cover the floor-style comments, I really praise unceasingly, true cow Ah, can be issued such a comment module! Later chat I know, originally they are used to say a lot of comments plug-ins.

What is more to say?

More said is a pursuit of the ultimate experience of the social review box, you can use micro-bo, QQ, everyone, watercress and other accounts log in and comments, with social account login, comment, and forward to the social platform (optional), to reply, mark like, forwarding operation. The cross platform comment aggregation effect is helpful to improve the return visit flow effectively. Many said that has the quality user experience, the speed and the stability, the socialization recommendation and the construction station procedure depth conformity, the rubbish comment filter and so on the characteristic.

Experience a little more in thinkphp.

When I blog comment module in the development process encountered bottlenecks, more said the appearance is undoubtedly at the end of the sudden Vista surprise.
My blog is based on thinkphp development, Baidu to see how others in the thinkphp used to say comments, but later a little disappointed-it seems that the shortest way, that only their own groping.

I thought the use of more said is how complex, it seems that I worry about, research for one or two hours, the results came out, now share experience.

First, registered account

To say more about the official website (http://duoshuo.com) to register an account. To register an account.

Second, create a site

Login to say account number, and then create a site, as shown in the figure:

It's simple, you just fill in the right:
1, Site name
2, Site Address
3, more said the domain name (that is, more said the allocation of a level two domain name, custom. )
As for the other options, you want to leave blank, you choose. At the end of this step, click Create to OK.

Third, get the code

In front of the creation of a good site, click the background management, in the Drop-down menu will appear just created the name of the site, as shown

Click on the site created earlier, here I created is "weblog blog." When you open the page, click the tool, and then get the code, notice, to select the generic code, as shown in the figure:

Look at the above picture, a lot of web systems have dedicated code, but there is no thinkphp.

The following is the corresponding creation code for my weblog blog:

Copy Code code as follows:
<!--Duoshuo Comment BEGIN-->
<div class= "Ds-thread" ></div>
<script type= "Text/javascript" >
var duoshuoquery = {short_name: "W3note"};
(function () {
var ds = document.createelement (' script ');
Ds.type = ' Text/javascript ';d s.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>
<!--Duoshuo Comment end-->

The copy site creates the corresponding generic code and sticks to any location between your page code <body> and </body>. If your site uses a template, paste it into the template code. If you do not understand, then you paste the generic code to the article template page, and then read the article and refresh, you will see the effect, then the appropriate adjustment of the CSS layout can be.

Using the above method, you can take your site's comments module removed, of course, more comments on the function of the plugin will not stop here, the rest of the remaining to be discussed slowly later.

Finally, a good picture of the following:

I hope this article will be helpful to everyone's thinkphp framework program design.

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.