Closed (fixed)
Project:
Fivestar
Version:
5.x-1.12
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 May 2008 at 11:31 UTC
Updated:
5 Oct 2008 at 22:17 UTC
Here is the scenario: I have here the video module that upload videos, I have used the fivestar module to rate those videos uploaded. The user can only rate videos if he/she download/watch the video. If the user does not download the the videofile, the fivestar rating is disabled, where user can't put rating on it. How do I modify the code, or there is a quick solution for this? Thanks in advance.
Comments
Comment #1
chris33 commentedAnybody can advised this?
Comment #2
quicksketchSounds like you generally just need some sort of JavaScript solution. In your node.tpl.php (or node-video.tpl.php or template.php) file, add a JS file to the page that only shows the rating widget after some event. Because it's difficult to know what your situation specifically needs, here's a chunk of starter code:
In node.tpl.php:
drupal_add_js($directory .'/hide-rating.js')And in a new file called "hide-rating.js" in your theme directory:
For more information:
http://api.drupal.org/api/function/drupal_add_js/5
http://visualjquery.com
Comment #3
quicksketch