I have tournament details. I want to rate and review each of tournament details. Here I displayed all details of tournament and I have installed vote and five star rating module. But I could not connect with tournament details. How to make it so that when clicking "tournament details", it will move to a new page with rate and review option?

I am using custom module for displaying tournament details.

  • Are you adding comment as review or not? – Jayendra Kainthola Nov 12 '13 at 5:26
  • thank you for helping me.yesi am using comment as review.this is my first project and can you guide me? – Vanapandi Narayanan Nov 12 '13 at 6:23
  • Have you added rating to comment section already? – Jayendra Kainthola Nov 12 '13 at 6:44

If you want to display comment in separate page, then you need to configure comment form be display in new page.

Comment setting for the Content type:

  • Go to Administration -> Structure -> Content type
  • Edit your content type.
  • Unchecked check-box "Show reply form on the same page as comments" under "Comment settings" section and save the form.

Now, you can add www.example.com/comment/reply/[nid]#comment-form link in your code to link comment in separate page.

Kindly see that [nid] is your node id.

If you have added "Rating" to comment, then it will also display in same page.


Adding Rating(five star) field to comment section:

  • Go to Administration -> Structure -> Content types
  • Click on Manage fields link in row of your content type and it will redirect you to fields settings page for your content type.
  • Click on comments fields link in top of page and you can manage the field for comment section.
  • Add new field of fivestar rating field type in comment.
  • Voting target should be parent node in field configuration for your fivestar rating field. Rating field
  • i want after clicking anyone of the row ,i want to rate tournament and also to display previous comments. – Vanapandi Narayanan Nov 21 '13 at 10:02
  • Please update your questions with complete details and whatever you have tried for this. – Jayendra Kainthola Nov 21 '13 at 10:16
  • i have installed five star and vote api.and i got information from other site and displayed in front page as table.now i when i click a row ,that row need to open new page that must contain rating field for that row.the front page table is custom module.so i dont have any idea connect with five star rate module. – Vanapandi Narayanan Nov 21 '13 at 11:53
  • Have you added your rating field in comment section? – Jayendra Kainthola Nov 21 '13 at 11:56
  • i dont know how to add comment field programatically in drupal 7.? – Vanapandi Narayanan Nov 21 '13 at 12:11

Setting Up the Content Type (node-type)

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

Setting Up the Comments/Ratings

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.
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.