Quantcast
Channel: Recent posts across whole site
Viewing all articles
Browse latest Browse all 49206

how to show all the node props in a block view

$
0
0

Hi,

I´m doing a module that attempt to show a bunch of nodes created programatically

All the node types have integrated fivestar rating

code is:

function pepe_block($op, $delta, $edit)  {
  case 'view':
    $qry = "SELECT n.nid, n.title, a.link FROM {node} n INNER JOIN {mytable} a ON n.nid=a.nid WHERE a.type = ......";
    $res = db_query($qry, $a, $b, $c);
    while ($algo = db_fetch_object($res)) {
      $node_load($algo->nid);
      $block_content .= l($algo->title, $algo->link, $options) . '<br>'. $node->body
    }
  return $block
}

Up to here everything works fine, But I'd like to programatically obtain the same results as the target of

l($algo->title, 'node/'. $algo->nid)

How to retrieve the fivestar rating? or the rest of the information shown by node-mytype.tpl.php?

Doing dpr($node) does not show any clue (for me at least)

regards
lr


Viewing all articles
Browse latest Browse all 49206

Trending Articles