如何在ThinkPHP上使用多说评论插件
先前访问网友的一些网站,他们好些的局部都发生了变化,如文章的评论模块设计得和谐美观,集表情和分享工具于一体,而且可以盖楼式评论,当时我真是称赞不已,真牛啊,能开发出这样的评论模块!后来聊天我才知道,原来他们是使用了多说评论插件。
什么是多说?
多说是一款追求极致体验的社会化评论框,可以用微博、QQ、人人、豆瓣等帐号登录并评论,用社交账号登录,进行评论,同时转发到社交平台(可选),进行回复、标记喜欢、转发操作。跨平台的评论聚合效应,有利于有效提高回访流量。多说具备优质用户体验、速度和稳定性、社会化推荐和建站程序深度整合、垃圾评论过滤等特性。
在ThinkPHP中体验一下多说
正值我博客的评论模块在开发过程中遇到了瓶颈,多说的出现无疑是在山穷水尽处突然柳暗花明又一村的惊喜。
我的网志博客是基于ThinkPHP开发的,想百度一下看看别人是如何在ThinkPHP上使用多说评论的,但后来有点失望了--看来捷径走不通,那只有自己摸索了。
我还以为使用多说是如何的复杂,看来是我多虑了,研究了一两个小时,成果出来了,现在把经验分享一下。
一、注册帐号
到多说官网(http://duoshuo.com)去注册一个帐号。去注册一个帐号。
二、创建站点
登陆多说帐号,然后创建站点,如图所示:
很简单,你只需填写好:
1、站点名称
2、站点地址
3、多说域名(即多说分配的一个二级域名,自定义的。)
至于其它选项,想留空的就留空,自己选择吧。这一步的最后,点击创建就OK了。
三、获取代码
在前面创建好站点的基础上,点击后台管理,在下拉菜单中会出现刚才创建的站点的名称,如图
点击前面创建的站点,这里我创建的是“网志博客“。打开页面后,点击工具,然后获取代码,注意,要选择通用代码,如图
看看上图,很多网站系统都有专用的代码了,唯独没有ThinkPHP的。
下面是我的网志博客对应的创建代码:
<!-- 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';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 -->
复制站点创建对应的通用代码,并粘帖到您网页代码
与间的任意位置。如果您的网站使用模板,请粘帖到模板代码中。如果还不理解,那你就把通用代码粘帖到文章模板页,然后浏文章并刷新,你就会看到效果了,这时适当的调整css布局就可以了。使用上面的方法,你可以把你的网站的评论模块去掉了,当然,多说评论插件的功能决不止于此,剩下的留作以后慢慢讨论吧。
末了,再上一张做好后的效果图:

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

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



Screen brightness is an integral part of using modern computing devices, especially when you look at the screen for long periods of time. It helps you reduce eye strain, improve legibility, and view content easily and efficiently. However, depending on your settings, it can sometimes be difficult to manage brightness, especially on Windows 11 with the new UI changes. If you're having trouble adjusting brightness, here are all the ways to manage brightness on Windows 11. How to Change Brightness on Windows 11 [10 Ways Explained] Single monitor users can use the following methods to adjust brightness on Windows 11. This includes desktop systems using a single monitor as well as laptops. let's start. Method 1: Use the Action Center The Action Center is accessible

In iOS 17, Apple introduced several new privacy and security features to its mobile operating system, one of which is the ability to require two-step authentication for private browsing tabs in Safari. Here's how it works and how to turn it off. On an iPhone or iPad running iOS 17 or iPadOS 17, Apple's browser now requires Face ID/Touch ID authentication or a passcode if you have any Private Browsing tab open in Safari and then exit the session or app to access them again. In other words, if someone gets their hands on your iPhone or iPad while it's unlocked, they still won't be able to view your privacy without knowing your passcode

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.

The famous activation script MAS2.2 version supports digital activation again. The method originated from @asdcorp and the team. The MAS author calls it HWID2. Download gatherosstate.exe (not original, modified) from https://github.com/massgravel/Microsoft-Activation-Scripts, run it with parameters, and generate GenuineTicket.xml. First take a look at the original method: gatherosstate.exePfn=xxxxxxx;DownlevelGenuineState=1 and then compare with the latest method: gatheros

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.

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.

"Development Suggestions: How to Use the ThinkPHP Framework to Implement Asynchronous Tasks" With the rapid development of Internet technology, Web applications have increasingly higher requirements for handling a large number of concurrent requests and complex business logic. In order to improve system performance and user experience, developers often consider using asynchronous tasks to perform some time-consuming operations, such as sending emails, processing file uploads, generating reports, etc. In the field of PHP, the ThinkPHP framework, as a popular development framework, provides some convenient ways to implement asynchronous tasks.
