★ ERIC Atkins ★

ERIC Atkins / deV // sandboX
Vitality / On the go // Nothing
from ~~ Huntsville, Alabama

Eric Atkins at Sutro Tower in San Francisco, California

℮ⁿgr & ₮ech№phile.●●●●
eaRTH sui┼ ῡs3r.████
℮arly ɑd○pter▐▐▐▐

★ iPhone photography ★

•• εriç αtk¡ñ§.com || since 1999 ••
• tumbln since 2007 •

Search

Find me on...

Grouping posts by date in Drupal.

Working continues away on this blog as I’m learning more PHP and more theming for Drupal (which will definitely get use on other websites I develop). I’m experimenting with grouping all of the posts on the front of ericatkins.com under the day in which they were published. So, All posts that are made today will appear like:

DayofWeek Month Date, Year
Title
Author, date, # of comments
content

I just put this code in my node.tpl.php files. I’ve got full control of the data and how I present it via .css. The code I used:

global $current_date;
if (format_date($node->created, 'custom', 'Ymd') != $current_date) {
print "

". format_date($node->created, 'custom', 'D M j, Y') ."
\n";
$current_date = format_date($node->created, 'custom', 'Ymd');
}
?>


You can edit the PHP date variable to format the date anyway you like.

I’m on my way to writing a new tumblelog system (which is how I think people ought to blog). More later.

Loading posts...