logo

This is an old version of this answer!

Return to the current answer
I did this via meta-data. http://then2s.com/93VHUh

really simple to implement..


<table width="608" border="0" cellspacing="0" cellpadding="0">
<?php
$cat = get_query_var('cat');
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
//The Query
query_posts('showposts=9&orderby=meta_value&meta_key=event_date&cat=' .$cat. '&paged='.$paged);
//The Loop
$count = 0;
while ( have_posts() ) : the_post(); $count++;
//The Title
$title = $post->post_title;
// $title = str_replace('EXCLUSIVE Interview: ','', $title);
// $title = str_replace('Interview: ','', $title);
// $splitit = explode(': ', $title);
// $useless = $splitit[1];
// $exclusiveinterview = $splitit[0];
$event_datee = get_post_meta($post->ID, 'event_date', true);
?>
<tr class="chns<?php if(($count % 2) == 0) { ?> chevn<?php } ?>">
<td class="hoveraspect"></td>
<td class="chnb">
<?php $dtes = get('event_date'); $timestamp = strtotime($dtes); echo date('M j', $timestamp); ?>
<center><div class="clear lineme"></div></center>
<?php $dtes = get('event_date'); $timestamp = strtotime($dtes); echo date('Y', $timestamp); ?></td>
<td class="cvimg">
<div class="choi">
<?php
$imds = catch_that_image();
$blah = getimagesize("$imds");
$type = $blah['mime'];
$width = $blah[0];
$height = $blah[1];
if ($width / $height == "1") {
?>
<a href="<?php the_permalink(); ?>" alt="<?php echo $title; ?>" title="<?php echo $title; ?>"><img src="<?php echo catch_that_image(); ?>" alt="<?php echo $title; ?>" title="<?php echo $title; ?>" width="55" height="55" /></a>
<?php } else { ?>
<a href="<?php the_permalink(); ?>" alt="<?php echo $title; ?>" title="<?php echo $title; ?>"><img src="<?php if(($count % 2) == 0) { ?><?php include('x.php'); ?><?php } else { ?><?php include('xx.php'); ?><?php } ?>/phpThumb.php?src=<?php echo catch_that_image(); ?>&h=45&w=45&q=90&f=jpg&zc=1" alt="<?php echo $title; ?>" title="<?php echo $title; ?>" width="55" height="55" /></a>
<?php } ?>
<div class="chss">
<h2>
<a href="<?php the_permalink(); ?>" alt="<?php echo $title; ?>" title="<?php echo $title; ?>"><img src="http://i40.tinypic.com/91aqa8.jpg" alt="<?php echo $title; ?>" title="<?php echo $title; ?>" width="55" height="55"/></a>
</h2>
</div>
</div>
</td>
<td class="chinf"><a href="<?php the_permalink(); ?>" alt="<?php echo $title; ?>" title="<?php echo $title; ?>" class="ttz">
<span class="arsch">
<?php
$event_dz = get_post_meta($post->ID, 'event_date', true);
$timestamp = strtotime($event_dz);
$eventyr = date('y', $timestamp); // get the year
$eventmn = date('m', $timestamp); // get the month
$eventdy = date('d', $timestamp); // get the month

$todayyr = date('y');
$todaymn = date('m');
$todaydy = date('d');

if ($eventyr > $todayyr || $eventyr == $todayyr) { // event > year OR event = year
if ($eventmn > $todaymn || $eventmn == $todaymn) { // event > month OR event = month
if ($eventmn > $todaymn) { $eventdy = 99; } // if event is next month increase day
if ($eventdy > $todaydy || $eventdy == $todaydy) {
if ($eventdy == $todaydy) { ?><span class="chty">TODAY!: </span><?php } else { ?><span class="chum" style="color:#2697de">UPCOMING: </span><?php }
}
}
}
?>
<?php echo $title; ?></span>
</a></td>
<td class="chply"><center><a href="http://facebook.com/share.php?u=<?php the_permalink(); ?>&amp;t=<?php echo $title; ?>" title="Bookmark this page at Facebook" target="external nofollow" onClick="javascript: pageTracker._trackPageview('clicky/single/share/facebook');"><img src="<?php bloginfo('template_url'); ?>/images/facebook_16.png" alt="Share on Facebook" /></a> <a href="#" title="Bookmark this page at Twitter" onclick="return TweetAndTrack.open(this, '<?php the_permalink() ?>');" target="external nofollow"><span style="display:none;">Music Event: <?php echo $title; ?> @TheNext2Shine</span><img src="<?php bloginfo('template_url'); ?>/images/twitter_16.png" alt="Tweet This!" /></a></center></td>
</tr>
<?php endwhile; ?>
</table>

Andrew C | 08/13/10 at 8:00pm

This is an old version of this answer!

Return to the current answer