本文介绍了K2_content 模块评分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<li><a href="#" rel="<?

<?

使用此代码:

params->get('catItemRating')): ?><div id="catItemRatingBlock"><div class="itemRatingForm"><?item->id;$db->setQuery($query);$votes=$db->loadObject();$rating_sum = intval($votes-> rating_sum);$rating_count = intval($votes-> rating_count);$evaluate = ($rating_count==0) ?"0" : number_format($rating_sum/$rating_count,1);$evaluate = str_replace('.0', '', $evaluate);$output=" 评分:".$评估."/5";回声$输出;?>

<?

我想要的是它也能在 K2 模块上运行.我尝试使用我在上面写的相同代码在 k2 内容模块中实现它,但这根本不起作用.

有人知道怎么把它拉下来吗?

解决方案

替换

params->get('catItemRating')): ?>

与:

I've been reconstructing the standard K2 rating in the category_item.

What I did was, I replaced this code:

<?

with this code:

<?

And what I want is for it to work on the K2 module as well. I tried to use the same code that I wrote above here to achieve it in k2 content module but that doesn't work at all.

Anyone know how to pull it off?

解决方案

Replace

<?

with:

<?

这篇关于K2_content 模块评分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-14 03:21