When you use the attach audio or audio playlist indirectly to attach audio nodes to another content type, would you have any idea how to insert the little fivestar module widget along with EACH audio file/attachment.

That way a user could listen to a song and then click and vote on each song separately while maintaing visual context between the vote and the song.

I know it would require theming, so if you can point me to the right theme function that'd be great.

And if you have any idea how to insert the widget that'd be great too.. But if you don't know that, then i can try and figure that out. I need the theme function for placement though..

thanks

Comments

zirafa’s picture

Assigned: Unassigned » zirafa
Status: Active » Closed (duplicate)

This can be done by overriding the theme_audio_attach_list function, similar to as described here:

http://drupal.org/node/139581

newdru’s picture

thanks for the post...

I can see how i can use that function to "place" the fivestar in the "right spot"..

the question is, since fivestar is a separate module from audio, which fivestar module function[s] / hooks are needed to actually insert / theme the code (and probably a form too to actually record the results)?

thanks

zirafa’s picture

Project: Audio » Fivestar
Version: 5.x-1.x-dev » 5.x-1.0
Component: contrib » Code
Assigned: zirafa » Unassigned
Status: Closed (duplicate) » Active

I'm moving this to the fivestar module issue queue...

quicksketch’s picture

This currently isn't possible. You'd need to actually code a custom module which ties a fivestar rating to each audio file attachement. The simpler route would be to make each attachment it's own node, then add a CCK field to the node type with the fivestar widget. You can include the fivestar widget in any form by using this simple code:

$form = array(
  '#type' => 'fivestar',
  '#stars' => 5,
);
print drupal_render($form);

See the fivestar_form() function in fivestar.module for more info.

quicksketch’s picture

Status: Active » Closed (fixed)

I'm going to go ahead and close since this issue is so old. Reopen if necessary.