Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Combining Php snippets to display date separator in Drupal group blog


Casethejoint - 8:54 pm on Apr 11, 2006 (gmt 0)


Finally cracked it on my lonesome:


<?php
$listlength="15";
$content_type = 'blog';
unset ($output);
$prev_day = ' ';
$result1 = pager_query("SELECT n.title, n.nid, n.created FROM {node} n WHERE n.type = '$content_type' AND n.status = 1 ORDER BY n.created DESC", $listlength);
while ($node = db_fetch_object($result1)) {
$day = format_date($node->created, 'custom', 'l, j F');
if ($day!= $prev_day) {
$output .= "<h1>$day</h1>";
$prev_day = $day;
}
$output .= "<li>" . l($node->title, "node/$node->nid") . "</li>";
}
$output .= theme('pager', NULL, $listlength);
print $output;
?>

Thanks again Jatar_k


Thread source:: http://www.webmasterworld.com/php/12207.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com