Final touches

The whole thing looks like this:

<style>#breadcrumb, fieldset {display: none}</style>
<?php  $result1 = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n INNER JOIN term_node ON n.nid = term_node.nid WHERE n.type = 'story' AND n.status = 1 AND n.sticky = 1 ORDER BY n.created DESC"), 1);
  while ($node = db_fetch_object($result1)) {
    $output .= node_view(node_load(array('nid' => $node->nid)), 1);
  }
print $output;
?>
<?php unset ($output); ?>
<div id="front_wrap">
<div id="front_left1" class="front_half">
<h3>Itthon</h3>
<?php
  $result1 = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n INNER JOIN term_node ON n.nid = term_node.nid WHERE n.type = 'story' AND term_node.tid = 2 AND n.status = 1 AND n.sticky = 0 ORDER BY n.created DESC"), 2);
  while ($node = db_fetch_object($result1)) {
    $output .= node_view(node_load(array('nid' => $node->nid)), 1);
$output .= '<a class="front_more" href="node/'.($node->nid).'">tovább...»</a>';
$output .= '<br class="front_hr" />';
  }
print $output;
?>
</div>
<?php unset ($output); ?>
<div id="front_right1" class="front_half">
<h3>Nagyvilág</h3>
<?php
  $result1 = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n INNER JOIN term_node ON n.nid = term_node.nid WHERE n.type = 'story' AND term_node.tid = 3 AND n.status = 1 AND n.sticky = 0 ORDER BY n.created DESC"), 2);
  while ($node = db_fetch_object($result1)) {
    $output .= node_view(node_load(array('nid' => $node->nid)), 1);
$output .= '<a class="front_more" href="node/'.($node->nid).'">tovább...»</a>';
$output .= '<br class="front_hr" />';
  }
print $output;
?>
</div>
<?php unset ($output); ?>
<div id="front_middle3" class="front_middle">
<h3>Szubjektív</h3>
<?php
  $result1 = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n INNER JOIN term_node ON n.nid = term_node.nid WHERE n.type = 'story' AND term_node.tid = 6 AND n.status = 1 AND n.sticky = 0 ORDER BY n.created DESC"), 2);
  while ($node = db_fetch_object($result1)) {
    $output .= node_view(node_load(array('nid' => $node->nid)), 1);
$output .= '<a class="front_more" href="node/'.($node->nid).'">tovább...»</a>';
$output .= '<br class="front_hr" />';
  }
print $output;
?>
</div>
<?php unset ($output); ?>
</div>


Please don't forget the following little code:

<?php unset ($output); ?>

This prevents the accumulative node presentation.


The whole code must be copied for anonymous and authenticated users under administer -> settings -> front_page.


Enjoy :)

hozzászólás | Hungarian Hungarian | 1266 olvasás

Válasz

A mező tartalma nem nyilvános.