我有比赛的细节。我想打分和审查每一个比赛的细节。在这里,我显示了比赛的所有细节,我已经安装了投票和五星评分模块。但我无法联系到比赛的细节。如何使它使当点击“比赛细节”,它将移动到一个新的页面与比率和审查选项?
我使用自定义模块来显示比赛细节。
发布于 2013-11-11 22:43:44
如果要在单独的页中显示注释,则需要在新页中配置“注释表单”显示。
内容类型的注释设置:
现在,您可以在代码中添加www.example.com/comment/reply/[nid]#comment-form
链接,以便将注释链接到单独的页面中。
请确保[nid]
是您的节点id。
如果您在评论中添加了“评级”,那么它也将显示在相同的页面中。
添加评等(五星级)字段到评论部分:
Administration -> Structure -> Content types
Manage fields
链接,它将为您的内容类型重定向到fields
设置页面。comments fields
链接,您可以管理“评论”部分的字段。fivestar rating
字段类型的新字段。Voting target
在您的fivestar rating
字段的字段配置中应该是parent node
。发布于 2014-12-29 02:25:50
设置内容类型(节点类型)
Go to the admin/config/content/fivestar
Create a new Tag called "Rating" (e.g. vote, Rating).
Go to your content type.
Add a new Fivestar Field, called "Rating".
Select Widget type: Stars (rated while viewing).
Save Field.
Select Tag: Rating.
Save field Settings
Select 'Number of stars' (Make sure it will be the same on both the content type and the comments
Be sure to check "Allow users to vote on their own content" otherwise you won't be able to test it working on your own content
Make any other customizations
Save Settings
Go to your content type's display settings.
Click the settings button (gear icon on the right side) for the "Rating" field.
Make sure Value to display as stars is set to 'Average Vote'
Make any other customizations.
Click 'update'
Save your content type
设置评论/评分
Go to the comment field settings for the content type we just added our field to.
Use 'Add existing field' and add the same 'Rating' field you used on the content type.
Widget: "Stars (rated while editing)".
Save Field.
Select 'Number of stars' (Make sure it is the same as the content type you created above.).
Select Voting Tag: Rating.
Voting target: **Parent Node**.
Voting Target
Make any other customizations.
Save settings.
Go to the comment display settings.
Click the settings button (gear icon on the right side) for the "Rating" field.
Change Value to display as stars: User's Vote.
Change Text to display under the stars: User's vote
Make any other customizations.
Click update.
Click save.
Voila!
P.S. If you use 7x-2.x version of fivestar module, please, first check out this issue to make it work according to new voting api changes. NOTE: The whole setup works just fine with Fivestar 7.x-2.x-dev from 2014-Mar-24 and Voting API 7.x-2.12
https://drupal.stackexchange.com/questions/93934
复制