Thinkphp on the use of multi-comment plugin method, thinkphp plugin _php tutorial

Source: Internet
Author: User

Thinkphp on the use of multi-comment plugin method, thinkphp plugin

The examples in this paper describe how to use the thinkphp comment plugin. Share to everyone for your reference. The implementation method is as follows:

Previous visits to some of the Web sites, their better parts have undergone changes, such as the article's Review module design harmonious aesthetics, set expression and sharing tools in one, and can be built-in comments, then I really praised, really cow ah, can open such a comment module! Later chat I only know, originally they are used to say comment plugin.

What is more to say?

More say is a pursuit of the ultimate experience of the social comment box, you can use Weibo, QQ, everyone, watercress and other accounts login and comment, with social account login, comment, and forward to the social platform (optional), to reply, Mark like, forward action. The cross-platform review aggregation effect is helpful to improve the return traffic. Say that you have high-quality user experience, speed and stability, social recommendations and built-in program depth integration, spam review filtering and other features.

Experience a little more in thinkphp.

The comment module of my blog in the development process encountered a bottleneck, more said the appearance is undoubtedly at the vista suddenly surprise.
My blog is based on the thinkphp development, want to see how others on the Baidu thinkphp on the use of more comments, but later a bit disappointed--it seems that the shortest way to go, that only their own groping.

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

First, registered account

Go to http://duoshuo.com to register an account. To register an account.

Second, create a site

Login to say the account number, and then create a site:

Very simple, you just fill in the good:
1. Site name
2. Site Address
3, more say the domain name (that is, more say the allocation of a two-level domain name, custom. )
As for the other options, leave it blank and choose it yourself. At the end of this step, click Create to OK.

Third, get the code

Based on the previous creation of a good site, click on the background management, in the drop-down menu will appear the name of the site just created,

Click on the site you created earlier, where I created the blog. After opening the page, click on the tool, then get the code, note, to select the common code:

Look, many web systems have dedicated code, but there is no thinkphp.

Here is the creation code for my weblog blog:

Copy the Code code as follows:

<!--Duoshuo Comment BEGIN--><p class= "Ds-thread" ></p><script type= "Text/javascript" >var Duoshuoquery = {short_name: "w3note"};(function () {var ds = document.createelement (' script ');d s.type = ' text/ JavaScript ';d s.async = true;ds.src = ' http://static.duoshuo.com/embed.js ';d s.charset = ' UTF-8 ';( document.getElementsByTagName (' head ') [0]| | document.getElementsByTagName (' body ') [0]). appendchild (DS);}) ();</script><!--Duoshuo Comment END----

Copy the site to create the corresponding generic code, and paste it to your page code <body> and </body> anywhere between. If your site uses a template, paste it into the template code. If you do not understand, then you will paste the generic code to the article template page, and then 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 put the comment module of your website removed, of course, commenting on the function of the plug-in never stop here, the rest of the stay for a slow discussion later.

Finally, the next one is done:


It is hoped that this article will be helpful to everyone's thinkphp framework design.

PHP Report plugin that can be used in thinkphp, and how to use it ten thanks

pChart2.1.3

php I used thinkphp and I'm going to print a PDF report with Fpdf But now I don't know how to invoke the contents of Fpdf in action Thinkphp the way to call files more, third-party plug-ins or their own handwriting classification, I used to use the method is:

1. Put the file in lib/org, name it fpdf.class.php, and then use import ("@.org.fpdf") in the action file to call it.
2, the second method is to create a folder yourself, determine the address relative to the entry file, and then include in the action file.
require_once ("Path relative to the entry file");
Or
Include_once ("Path relative to the entry file");
I'm not sure how to use the fpdf, just go to see, unfortunately I can not open the page, if just a file loading will solve the problem, I suggest you use the first method, more convenient.
If it is a complete code project, I think you use the second method is more appropriate, build a plug-in folder yourself, the file contained in it can be.
PS: You can use the instructions that the call has succeeded. That is to say, the problem of your topic has been solved.
Garbled the biggest reason is the wrong way of encoding, you store the time with what kind of encoding, then write the time you need to use the same code, see where you read the data, and then see what the data is encoded format, I am not familiar with the fpdf, so can give a few suggestions, But I remember that when the call is a code parameter can be passed, write this parameter to see if there is such a situation.

  • 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.