Table of Contents
ThinkPHP上使用多说评论插件的方法,thinkphp插件
可以在thinkphp中使用的php报表插件,及使用方法十万分感谢
php中我用了thinkPHP 然后我要打印pdf报表 用了fpdf 但是现在不知道在action中怎调用fpdf中的内容
Home php教程 php手册 ThinkPHP上使用多说评论插件的方法,thinkphp插件

ThinkPHP上使用多说评论插件的方法,thinkphp插件

Jun 13, 2016 am 09:22 AM
thinkphp plug-in

ThinkPHP上使用多说评论插件的方法,thinkphp插件

本文实例讲述了ThinkPHP上使用多说评论插件的方法。分享给大家供大家参考。具体实现方法如下:

先前访问网友的一些网站,他们好些的局部都发生了变化,如文章的评论模块设计得和谐美观,集表情和分享工具于一体,而且可以盖楼式评论,当时我真是称赞不已,真牛啊,能开发出这样的评论模块!后来聊天我才知道,原来他们是使用了多说评论插件。

什么是多说?

多说是一款追求极致体验的社会化评论框,可以用微博、QQ、人人、豆瓣等帐号登录并评论,用社交账号登录,进行评论,同时转发到社交平台(可选),进行回复、标记喜欢、转发操作。跨平台的评论聚合效应,有利于有效提高回访流量。多说具备优质用户体验、速度和稳定性、社会化推荐和建站程序深度整合、垃圾评论过滤等特性。

在ThinkPHP中体验一下多说

正值我博客的评论模块在开发过程中遇到了瓶颈,多说的出现无疑是在山穷水尽处突然柳暗花明又一村的惊喜。
我的网志博客是基于ThinkPHP开发的,想百度一下看看别人是如何在ThinkPHP上使用多说评论的,但后来有点失望了--看来捷径走不通,那只有自己摸索了。

我还以为使用多说是如何的复杂,看来是我多虑了,研究了一两个小时,成果出来了,现在把经验分享一下。

一、注册帐号

到多说官网(http://duoshuo.com)去注册一个帐号。去注册一个帐号。

二、创建站点

登陆多说帐号,然后创建站点,如图所示:

很简单,你只需填写好:
1、站点名称
2、站点地址
3、多说域名(即多说分配的一个二级域名,自定义的。)
至于其它选项,想留空的就留空,自己选择吧。这一步的最后,点击创建就OK了。

三、获取代码

在前面创建好站点的基础上,点击后台管理,在下拉菜单中会出现刚才创建的站点的名称,如图

点击前面创建的站点,这里我创建的是“网志博客“。打开页面后,点击工具,然后获取代码,注意,要选择通用代码,如图所示:

看看上图,很多网站系统都有专用的代码了,唯独没有ThinkPHP的。

下面是我的网志博客对应的创建代码:

复制代码 代码如下:


    




复制站点创建对应的通用代码,并粘帖到您网页代码与间的任意位置。如果您的网站使用模板,请粘帖到模板代码中。如果还不理解,那你就把通用代码粘帖到文章模板页,然后浏文章并刷新,你就会看到效果了,这时适当的调整css布局就可以了。

使用上面的方法,你可以把你的网站的评论模块去掉了,当然,多说评论插件的功能决不止于此,剩下的留作以后慢慢讨论吧。

最后,再上一张做好后的效果图:

希望本文所述对大家的ThinkPHP框架程序设计有所帮助。

可以在thinkphp中使用的php报表插件,及使用方法十万分感谢

pChart2.1.3
 

php中我用了thinkPHP 然后我要打印pdf报表 用了fpdf 但是现在不知道在action中怎调用fpdf中的内容

ThinkPHP中调用文件的方式比较多,第三方插件或是自己手写的分类,我习惯使用的方法是:
1、把文件放在Lib/ORG中,命名为fpdf.class.php,然后在Action文件中使用import("@.ORG.fpdf")调用就可以了。
2、第二种方法就是自己建立文件夹,确定相对于入口文件的地址,然后在Action文件中包含进去。
require_once("相对于入口文件的路径");
或是
include_once("相对于入口文件的路径");

我不太清楚FPDF的使用方法,刚才去查看,可惜我打不开网页,如果只是一个文件的加载就可以解决问题,我建议你使用第一种方法,更方便一些。
如果是一个完整的代码项目的话,我觉得你使用第二种方法更合适一些,自己建一个插件文件夹,把其中文件包含进去就可以了。

PS: 可以使用说明调用已经成功了。也就是说你题目的问题解决了。
乱码的最大原因就是编码的方式不对,你存储的时候用的是什么样的编码,那么写入的时候就需要用同样的编码,查看一下你是从哪读取的数据,再看看数据是什么编码格式,我不熟悉FPDF,所以能给的建议不多,但我记得调用的时候是可以传一个编码参数的,把这个参数写上,看看还是否有这样的情况。
 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PyCharm Beginner's Guide: Comprehensive understanding of plug-in installation! PyCharm Beginner's Guide: Comprehensive understanding of plug-in installation! Feb 25, 2024 pm 11:57 PM

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] Error loading plugin in Illustrator [Fixed] Feb 19, 2024 pm 12:00 PM

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

What is the Chrome plug-in extension installation directory? What is the Chrome plug-in extension installation directory? Mar 08, 2024 am 08:55 AM

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

How to run thinkphp project How to run thinkphp project Apr 09, 2024 pm 05:33 PM

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.

There are several versions of thinkphp There are several versions of thinkphp Apr 09, 2024 pm 06:09 PM

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.

Share three solutions to why Edge browser does not support this plug-in Share three solutions to why Edge browser does not support this plug-in Mar 13, 2024 pm 04:34 PM

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.

How to run thinkphp How to run thinkphp Apr 09, 2024 pm 05:39 PM

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.

Does PyCharm Community Edition support enough plugins? Does PyCharm Community Edition support enough plugins? Feb 20, 2024 pm 04:42 PM

Does PyCharm Community Edition support enough plugins? Need specific code examples As the Python language becomes more and more widely used in the field of software development, PyCharm, as a professional Python integrated development environment (IDE), is favored by developers. PyCharm is divided into two versions: professional version and community version. The community version is provided for free, but its plug-in support is limited compared to the professional version. So the question is, does PyCharm Community Edition support enough plug-ins? This article will use specific code examples to

See all articles