guotao 发表于 2013-5-18 17:31:02

评论由目前的三星(1

评论由目前的三星(1-3星)增加到1-5星,怎样调整啊?谢谢

ccac1984 发表于 2013-9-9 13:10:29


我还以为你调整了呢

Spacer 发表于 2013-9-9 14:46:02



ccac1984 发表于 2013-9-9 13:10

我还以为你调整了呢
我之前做过 你可以参照修改下 不过当时是在4.0上修改的 要是有问题 你可以再改改[*]1.destoon_comment_stat 增加star4 star5两个字段
[*]
[*]
[*]2.file/setting/comment_stat.csv增加star4优评,star5,特优评,
[*]
[*]3.lang/zh-cn/lang.inc.php 增加,'优评','特优评'
[*]
[*]4.module/extend/admin/template/comment.edit.tpl.php 增加
[*]
[*]5.module/extend/common.inc.php 查找star 然后在默认的基础上增加
[*]in_array($star, array(1, 2, 3, 4, 5)) or $star = 5;
[*]
[*]$stat['pc4'] = dround($stat['star4']*100/$stat['comment'], 2, true).'%';
[*]$stat['pc5'] = dround($stat['star5']*100/$stat['comment'], 2, true).'%';
[*]
[*]$stat['star1'] = $stat['star2'] = $stat['star3'] =$stat['star4'] = $stat
[*]
[*]['star5'] =0;
[*]$stat['pc1'] = $stat['pc2'] = $stat['pc3'] = $stat['pc4'] =$stat['pc5'] = '0%';
[*]
[*]
[*]
[*]6.module/extend/common_list.inc.php 加和上面的一样
[*]
[*]7.module/extend/common.class.php
[*]in_array($post['star'], array(1, 2, 3, 4, 5)) or $post['star'] = 5;
[*]
[*]8.template/default/extend/comment.htm 加上两个等级
[*]
[*]
[*]注意:具体四级五级图片需要单独制作,这里只是复制了下 复制代码

Spacer 发表于 2013-9-9 13:10:00



ccac1984 发表于 2013-9-9 13:10

我还以为你调整了呢
我之前做过 你可以参照修改下 不过当时是在4.0上修改的 要是有问题 你可以再改改[*]1.destoon_comment_stat 增加star4 star5两个字段
[*]
[*]
[*]2.file/setting/comment_stat.csv增加star4优评,star5,特优评,
[*]
[*]3.lang/zh-cn/lang.inc.php 增加,'优评','特优评'
[*]
[*]4.module/extend/admin/template/comment.edit.tpl.php 增加
[*]
[*]5.module/extend/common.inc.php 查找star 然后在默认的基础上增加
[*]in_array($star, array(1, 2, 3, 4, 5)) or $star = 5;
[*]
[*]$stat['pc4'] = dround($stat['star4']*100/$stat['comment'], 2, true).'%';
[*]$stat['pc5'] = dround($stat['star5']*100/$stat['comment'], 2, true).'%';
[*]
[*]$stat['star1'] = $stat['star2'] = $stat['star3'] =$stat['star4'] = $stat
[*]
[*]['star5'] =0;
[*]$stat['pc1'] = $stat['pc2'] = $stat['pc3'] = $stat['pc4'] =$stat['pc5'] = '0%';
[*]
[*]
[*]
[*]6.module/extend/common_list.inc.php 加和上面的一样
[*]
[*]7.module/extend/common.class.php
[*]in_array($post['star'], array(1, 2, 3, 4, 5)) or $post['star'] = 5;
[*]
[*]8.template/default/extend/comment.htm 加上两个等级
[*]
[*]
[*]注意:具体四级五级图片需要单独制作,这里只是复制了下 复制代码

Spacer 发表于 2013-9-9 14:46:04


看三楼、

ccac1984 发表于 2013-9-9 13:10:00



Spacer 发表于 2013-9-9 14:46

我之前做过 你可以参照修改下 不过当时是在4.0上修改的 要是有问题 你可以再改改 ...
好的,谢谢。最近一直没有来看。我一会就去改改。

ThinkPHP 发表于 2013-9-9 14:46:14


可以学习下
页: [1]
查看完整版本: 评论由目前的三星(1