integration in themed nodes?

dodomeister - May 13, 2006 - 08:25
Project:Node Vote
Version:4.7.x-1.x-dev
Component:Documentation
Category:support request
Priority:normal
Assigned:scroogie
Status:closed
Description

a description of the php-code needed to put into node-flexinode-1.tpl.php to show/integrate nodevote in a themed flexinode.

#1

marcoBauli - September 21, 2006 - 10:27
Title:integration in themed flexinode» integration in themed nodes?

yes, please, i am also interested in how to output nodevote, but i am actually using CCK and Contemplate modules...

hint about the code to paste apreciated!

ty

#2

scroogie - December 20, 2006 - 16:36

The following should do the job in a contemplate template.... didnt test thoroughly though

<?php
$node
= node_load($nid);
if (
$node->nodevote->vote_display) {
  
$data = _nodevote_get_vote_data($node->nid, $page);
   print
theme('nodevote_display_vote', $data['score'], $data['votes'], $data['vote_display']);
}
if (
$node->nodevote->vote_do) {
   print
theme('nodevote_do_vote',$node);
}
?>

#3

scroogie - December 22, 2006 - 12:37
Assigned to:Anonymous» scroogie
Status:active» closed

#4

jsethi - October 22, 2007 - 20:37

I tried using that code in a tpl file i created.

When you vote it displays the #of votes as the vote rank you used

Also it only displays stars only on a rating of 2

I have no idea how the code displayed above is causing these symptoms :S

I would really like to use this module with my nodes... Please help.

 
 

Drupal is a registered trademark of Dries Buytaert.