All pastes #610655 Raw Edit

Mine

public text v1 · immutable
·published 2007-07-09 15:58 UTC
rendered paste body
function jewcy06_views_view_list_homeblogs($view, $nodes, $type) {
  foreach ($nodes as $node) {
    $posted = $node->node_created;
    if (time() - $posted > 86400) {
		$posted = date("M d",$posted);
	}
	else {
		$posted = date("g:i a",$posted);
	}
	$contenttype = $node->node_type;
	if ($contenttype == "content_daily_schvitz") {
		$contenttype = "Daily Shvitz";
	}
	else if ($contenttype == "content_faithhacker") {
		$contenttype = "Faithhacker";
	}
	$nodetitle = format_truncate($node->node_title, 40);
	if ($nodetitle != $node->node_title) {
		$nodetitle .= "...";
	}
	$authorname = format_truncate($node->users_name, 20);
	if ($authorname != $node->users_name) {
		$authorname .= "..";
	}
    $output .= "<li class='leaf'>" . l($nodetitle, "node/$node->nid") . "<br /><strong>" . $contenttype . "</strong>: " . $authorname . ", " . $posted . "</li>\n";
  }
  if ($output) {
    return "<div class='menu'>\n<ul>\n" . $output . '</ul></div>';
  }
}