我需要有一些像反馈形式,可以投票而查看,我正在尝试使用五星来做到这一点。Someting like this
但问题是,一个用户应该只投票一次。我已经搜索了一些solitions,找到了一些东西。它是创建一个自定义模块,并用它隐藏fivestar字段,并使用函数中的字段。我的问题是我不能隐藏该字段。
这是隐藏旧的和打印新的代码。
hide($content['field_fivestar_rating']);// This line will hide the stars which are coming from the fivestar module.
print custom_voting_print_rating($node->nid, $content['field_fivestar_rating']);
print $user_picture;
print render($content);所以我这么做了,但它不起作用。hide($content['field_fivestar_rating'])不工作,已经尝试hide($content['field_fivestar']);了问题是,如果我尝试打印$content‘’field_fivestar_rating‘,它不会退出。
所以我想问的是,是否有人知道我应该做什么。对不起,我的英语不好。
发布于 2015-11-09 20:42:14
您可以在以下位置添加自定义访问规则:-
hook_fivestar_access($entity_type、$id、$tag、$uid)
这个钩子是由fivestar模块提供的。
https://stackoverflow.com/questions/33608277
复制相似问题