


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.

thinkphp是国产框架。ThinkPHP是一个快速、兼容而且简单的轻量级国产PHP开发框架,是为了简化企业级应用开发和敏捷WEB应用开发而诞生的。ThinkPHP从诞生以来一直秉承简洁实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。

本篇文章给大家带来了关于thinkphp的相关知识,其中主要介绍了关于使用think-queue来实现普通队列和延迟队列的相关内容,think-queue是thinkphp官方提供的一个消息队列服务,下面一起来看一下,希望对大家有帮助。

thinkphp基于的mvc分别是指:1、m是model的缩写,表示模型,用于数据处理;2、v是view的缩写,表示视图,由View类和模板文件组成;3、c是controller的缩写,表示控制器,用于逻辑处理。mvc设计模式是一种编程思想,是一种将应用程序的逻辑层和表现层进行分离的方法。

thinkphp扩展有:1、think-migration,是一种数据库迁移工具;2、think-orm,是一种ORM类库扩展;3、think-oracle,是一种Oracle驱动扩展;4、think-mongo,一种MongoDb扩展;5、think-soar,一种SQL语句优化扩展;6、porter,一种数据库管理工具;7、tp-jwt-auth,一个jwt身份验证扩展包。

本篇文章给大家带来了关于thinkphp的相关知识,其中主要介绍了使用jwt认证的问题,下面一起来看一下,希望对大家有帮助。

本篇文章给大家带来了关于ThinkPHP的相关知识,其中主要整理了使用think-queue实现redis消息队列的相关问题,下面一起来看一下,希望对大家有帮助。

thinkphp查询库是否存在的方法:1、打开相应的tp文件;2、通过“ $isTable=db()->query('SHOW TABLES LIKE '."'".$data['table_name']."'");if($isTable){...}else{...}”方式验证表是否存在即可。

在thinkphp3.2中,可以利用define关闭调试模式,该标签用于变量和常量的定义,将入口文件中定义调试模式设为FALSE即可,语法为“define('APP_DEBUG', false);”;开启调试模式将参数值设置为true即可。


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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

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

Atom editor mac version download
The most popular open source editor

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
