【文件属性】:
文件名称:ajax无刷新评级插件 for 帝国CMS
文件大小:19KB
文件格式:RAR
更新时间:2021-04-23 03:34:43
程序插件 ecms插件
各版本通用.
安装帮助
=======================================================
1. 执行以下SQL语句,建立ratings表
CREATE TABLE `ratings` (
`id` varchar(11) NOT NULL,
`total_votes` int(11) NOT NULL default 0,
`total_value` int(11) NOT NULL default 0,
`used_ips` longtext,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=3;
=======================================================
2. 修改 _config-rating.php
=======================================================
$dbhost = 'localhost';
$dbuser = '###';
$dbpass = '###';
$dbname = '###';
$tableName = 'ratings';
$rating_unitwidth = 30;
=======================================================
3. 在你需要显示评级的页面顶部加入以下内容
=======================================================
<!--code.start-->?php require('_drawrating.php'); ?<!--code.end-->
=======================================================
4. 将以下内容添加到需要显示评级的页面
=======================================================
[removed][removed]
[removed][removed]
<link rel="stylesheet" type="text/css" href="css/rating.css" />
PS:自行修改路径
=======================================================
5. 用以下代码调用评级显示部分
=======================================================
<!--code.start-->?php echo rating_bar('[!--id--]'); ?<!--code.end--> - 默认显示10级
如果只想显示5级或别的级,只需要按以下方式调用:
<!--code.start-->?php echo rating_bar('[!--id--]','5'); ?<!--code.end-->