related article module in drupal
<?print "<h1><b><a href='".$node_url."'>".$title."</a></b></h1>" ?>
<?print $content ?>
<?php
$rr=array_keys($taxonomy);
$arr=array();
foreach( $rr as $val)
{array_push($arr,$val[14]);}
print "<h6>Related article<h6><br><ol>";
$res=taxonomy_select_nodes($arr, $operator = 'or', $depth = "all"
, $pager = TRUE, $order = 'n.sticky DESC, n.created DESC');
while( $ans=$res->fetch_array())
{
print("<li><a href='http://localhost/~space/drupal/?q=en/node/ ".$ans[nid]."'>".$ans[title]."</a></li>");
}
print "</ol>" ;
?>
No comments:
Post a Comment