


How to use the Duoshuo comment plug-in on ThinkPHP, thinkphp plug-in_PHP tutorial
How to use the Duoshuo comment plug-in on ThinkPHP, thinkphp plug-in
This article describes how to use the Duoshuo comment plug-in on ThinkPHP. Share it with everyone for your reference. The specific implementation method is as follows:
I visited some websites of netizens before, and many parts of them have changed. For example, the comment module of the article is designed to be harmonious and beautiful, integrating expressions and sharing tools, and can be built like a building. Comments, I was really complimented at that time. It’s so awesome that you can develop such a comment module! I found out later during the chat that they used the Duoshuo comment plug-in.
What is Duoduo?
Duoshuo is a social comment box that pursues the ultimate experience. You can log in and comment with accounts such as Weibo, QQ, Renren, Douban, etc., log in with social accounts, comment, and forward at the same time Go to social platforms (optional) to reply, mark likes, and forward. The cross-platform comment aggregation effect is conducive to effectively increasing return visit traffic. Duosuo has features such as high-quality user experience, speed and stability, deep integration of social recommendations and website building programs, and filtering of spam comments.
Experience Duoduo in ThinkPHP
Just when the comment module of my blog encountered a bottleneck in the development process, Duoduo suddenly appeared at the end of the road. There is another surprise in the village.
My blog is developed based on ThinkPHP. I wanted to use Baidu to see how others use Duoshuo Comments on ThinkPHP, but I was a little disappointed later - it seems that the shortcut will not work, so I have to explore by myself.
I thought using Duoshuo was so complicated, but it seems that I thought too much. I studied for an hour or two and the results came out. Now I will share my experience.
1. Register an account
Go to Duoshuo official website (http://duoshuo.com) to register an account. Go and register an account.
2. Create a site
Log in to Duoshuo account, and then create a site, as shown in the picture:
It’s very simple, you just need to fill in:
1. Site name
2. Site address
3. Duoshuo domain name (that is, a second-level domain name assigned by Duosuo, customized.)
As for other options, leave them blank if you want to and make your own choice. At the end of this step, click Create and it’s OK.
3. Obtain the code
After creating the site previously, click on the background management, and the name of the site just created will appear in the drop-down menu, as shown in the figure
Click on the site created earlier. What I created here is a "blog blog". After opening the page, click Tools, and then get the code. Note that you must choose the general code, as shown in the picture:
Look at the picture above. Many website systems have dedicated codes. The code is there, but there is no ThinkPHP one.
The following is the creation code corresponding to my blog:
Copy code The code is 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'); 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> <!-- Duoshuo Comment END -->
Copy site creation The corresponding universal code and paste it anywhere between the
and of your web page code. If your site uses templates, paste them into the template code. If you still don’t understand, then you can paste the general code into the article template page, then browse the article and refresh it, and you will see the effect. At this time, just adjust the CSS layout appropriately.Using the above method, you can remove the comment module of your website. Of course, the function of the Duoshuo comment plug-in is by no means limited to this, and the rest will be discussed later.
Finally, here’s the final rendering:
I hope this article will help everyone’s ThinkPHP framework programming. help.
php report plug-in that can be used in thinkphp, and how to use it. Thank you very much
pChart2.1.3
I use thinkPHP in php and then I want I used fpdf to print the pdf report, but now I don’t know how to call the content in fpdf in the action There are many ways to call files in ThinkPHP, such as third-party plug-ins or handwritten classifications. The method I am accustomed to using is:
1. Place the file in Lib/ORG, name it fpdf.class.php, and then use import ("@.ORG.fpdf") to call it in the Action file.
2. The second method is to create the folder yourself, determine the address relative to the entry file, and then include it 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 FPDF, I just checked it out , it's a pity that I can't open the web page. If just loading a file can solve the problem, I suggest you use the first method, which is more convenient.
If it is a complete code project, I think it is more appropriate for you to use the second method. Just create a plug-in folder yourself and include the files in it.
PS: It can be used to indicate that the call has been successful. In other words, the problem of your question is solved.
The biggest reason for garbled characters is that the encoding method is wrong. What kind of encoding you use when storing, then you need to use the same encoding when writing. Check where you read the data from, and then look Check what encoding format the data is in. I'm not familiar with FPDF, so I don't have many suggestions. But I remember that you can pass an encoding parameter when calling. Write this parameter and see if this happens again.

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











PyCharm is a powerful and popular Python integrated development environment (IDE) that provides a wealth of functions and tools so that developers can write code more efficiently. The plug-in mechanism of PyCharm is a powerful tool for extending its functions. By installing different plug-ins, various functions and customized features can be added to PyCharm. Therefore, it is crucial for newbies to PyCharm to understand and be proficient in installing plug-ins. This article will give you a detailed introduction to the complete installation of PyCharm plug-in.
![Error loading plugin in Illustrator [Fixed]](https://img.php.cn/upload/article/000/465/014/170831522770626.jpg?x-oss-process=image/resize,m_fill,h_207,w_330)
When launching Adobe Illustrator, does a message about an error loading the plug-in pop up? Some Illustrator users have encountered this error when opening the application. The message is followed by a list of problematic plugins. This error message indicates that there is a problem with the installed plug-in, but it may also be caused by other reasons such as a damaged Visual C++ DLL file or a damaged preference file. If you encounter this error, we will guide you in this article to fix the problem, so continue reading below. Error loading plug-in in Illustrator If you receive an "Error loading plug-in" error message when trying to launch Adobe Illustrator, you can use the following: As an administrator

To run the ThinkPHP project, you need to: install Composer; use Composer to create the project; enter the project directory and execute php bin/console serve; visit http://localhost:8000 to view the welcome page.

ThinkPHP has multiple versions designed for different PHP versions. Major versions include 3.2, 5.0, 5.1, and 6.0, while minor versions are used to fix bugs and provide new features. The latest stable version is ThinkPHP 6.0.16. When choosing a version, consider the PHP version, feature requirements, and community support. It is recommended to use the latest stable version for best performance and support.

When users use the Edge browser, they may add some plug-ins to meet more of their needs. But when adding a plug-in, it shows that this plug-in is not supported. How to solve this problem? Today, the editor will share with you three solutions. Come and try it. Method 1: Try using another browser. Method 2: The Flash Player on the browser may be out of date or missing, causing the plug-in to be unsupported. You can download the latest version from the official website. Method 3: Press the "Ctrl+Shift+Delete" keys at the same time. Click "Clear Data" and reopen the browser.

What is the Chrome plug-in extension installation directory? Under normal circumstances, the default installation directory of Chrome plug-in extensions is as follows: 1. The default installation directory location of chrome plug-ins in windowsxp: C:\DocumentsandSettings\username\LocalSettings\ApplicationData\Google\Chrome\UserData\Default\Extensions2. chrome in windows7 The default installation directory location of the plug-in: C:\Users\username\AppData\Local\Google\Chrome\User

Steps to run ThinkPHP Framework locally: Download and unzip ThinkPHP Framework to a local directory. Create a virtual host (optional) pointing to the ThinkPHP root directory. Configure database connection parameters. Start the web server. Initialize the ThinkPHP application. Access the ThinkPHP application URL and run it.

Performance comparison of Laravel and ThinkPHP frameworks: ThinkPHP generally performs better than Laravel, focusing on optimization and caching. Laravel performs well, but for complex applications, ThinkPHP may be a better fit.
