Not displaying on 'Page'

kastaway - August 4, 2005 - 20:19
Project:Voting
Version:HEAD
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I have a 'page' (in the database 'node' table, nid=11203 and type=page) on my site. I have set the option for 'Voting' to 'enabled' on the page:
http://127.0.0.1/admin/node/configure/types/page

But when displaying the above page:
http://127.0.0.1/node/11203

the node/page renders fine, but there is no voting block at the bottom. What am I doing wrong?

Thanks.

#1

kastaway - August 4, 2005 - 20:49

What I have done for the moment, is, inside 'node.module' I added one line to 'function node_show':

function node_show($node, $cid) {
  $output = node_view($node, FALSE, TRUE);
// START ADDED -- 03AUG2005
if ($node->type = 'page'){$output  .= '<div align=\'center\'>' . voting_control_generic('pagevote', $node->nid, array('prompt' => 'Do you like it?', 'confirmation' => 'Vote saved!')) . '</div'; }
// END ADDED -- 03AUG2005
  if (function_exists('comment_render') && $node->comment) {
    $output .= comment_render($node, $cid);
  }

  // Update the history table, stating that this user viewed this node.
  node_tag_new($node->nid);
  return $output;
}

#2

kastaway - August 4, 2005 - 21:14

Cancel this bug report -- I created a new page, and the voting section shows up, now. (Twice, as it should at this point.)

I'm not sure where the problem was, but it probably wasn't in the Voting module.

#3

benshell - August 8, 2005 - 20:37
Status:active» closed

I'm glad you got it figured out. The admin/node/configure/types settings are only for new nodes (and they're only the default for new nodes -- users with proper permissions can change them when they're creating a new node).

 
 

Drupal is a registered trademark of Dries Buytaert.