$s .= '  |  ';
    }
    $s .= '<a href="/profile/' . $slug . '/go/w" target="_blank">Website</a>';
}
if ($a['burl']) {
    if ($s) {
        $s .= '&nbsp;&nbsp;|&nbsp;&nbsp;';
    }
    $s .= '<a href="/profile/' . $slug . '/go/b" target="_blank">Blog</a>';
}
echo $s;
echo '</div>';
echo '</div>';
$tweet_title = 'Check out ' . $a['name'] . ' on OccasionsOnline.com';
if (strlen($tweet_title) > 100) {
    $tweet_title = ao_trim_to_length($tweet_title, 97, ' ', '...');
}
?>
	<div class="post-social-buttons clearme">
		<div class="post-social-twitter"><a href="http://twitter.com/share" class="twitter-share-button" data-text="<?php 
echo $tweet_title;
?>
" data-count="horizontal" data-via="OccasionsMag">Tweet This</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
		<div class="post-social-stumble"><script src="http://www.stumbleupon.com/hostedbadge.php?s=1&r=<?php 
echo $plain_url;
?>
"></script></div>
		<div class="post-social-facebook"><iframe src="http://www.facebook.com/plugins/like.php?href=<?php 
echo $plain_url;
?>
&amp;layout=standard&amp;show_faces=false&amp;width=400&amp;action=like&amp;colorscheme=light&amp;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:400px; height:35px;" allowTransparency="true"></iframe></div>
function get_eventfields(&$epod)
{
    // set our variables
    return array("id" => $epod->get_field('id'), "name" => $epod->get_field('name'), "mapname" => str_replace("'", "&#039;", $epod->get_field('name')), "mapaddr" => $epod->get_field('address') . '<br />', "slug" => $epod->get_field('slug'), "vend" => $epod->get_field('vendor'), "dsta" => $epod->get_field('date_start'), "dend" => $epod->get_field('date_end'), "hour" => $epod->get_field('hours'), "loca" => $epod->get_field('location'), "addr" => $epod->get_field('address'), "city" => $epod->get_field('city'), "stat" => $epod->get_field('state'), "zipc" => $epod->get_field('zipcode'), "coun" => $epod->get_field('county'), "wurl" => $epod->get_field('web_url'), "cost" => $epod->get_field('cost'), "desc" => htmlspecialchars_decode($epod->get_field('description')), "summ" => ao_trim_to_length(preg_replace('/\\s\\s+/', ' ', str_replace('&nbsp;', ' ', strip_tags($epod->get_field('description')))), 250), "keyw" => $epod->get_field('keywords'), "phon" => $epod->get_field('phone'), "type" => $epod->get_field('event_type'), "appr" => $epod->get_field('approved'), "v2id" => $epod->get_field('ao2_companyguid'), "lati" => $epod->get_field('latitude'), "long" => $epod->get_field('longitude'), "vendor" => $epod->get_field('vendor'), "date_start" => $epod->get_field('date_start'), "date_end" => $epod->get_field('date_end'), "hours" => $epod->get_field('hours'), "location" => $epod->get_field('location'), "address" => $epod->get_field('address'), "city" => $epod->get_field('city'), "state" => $epod->get_field('state'), "zipcode" => $epod->get_field('zipcode'), "county" => $epod->get_field('county'), "web_url" => $epod->get_field('web_url'), "cost" => $epod->get_field('cost'), "description" => htmlspecialchars_decode($epod->get_field('description')), "summary" => ao_trim_to_length(preg_replace('/\\s\\s+/', ' ', str_replace('&nbsp;', ' ', strip_tags($epod->get_field('description')))), 250), "keywords" => $epod->get_field('keywords'), "phone" => $epod->get_field('phone'), "event_type" => $epod->get_field('event_type'), "approved" => $epod->get_field('approved'), "ao2_companyguid" => $epod->get_field('ao2_companyguid'), "latitude" => $epod->get_field('latitude'), "longitude" => $epod->get_field('longitude'));
}
			<table id="oo-page-content" cellspacing="0" cellpadding="0" border="0">
				<tr>
					<td id="oo-page-center">
<?php 
return;
?>













							<li><a href="#">Recent Posts</a>
								<ul>
<?php 
$recent_posts = wp_get_recent_posts();
foreach ($recent_posts as $post) {
    echo '<li><a href="' . get_permalink($post["ID"]) . '" title="' . htmlspecialchars($post["post_title"], ENT_QUOTES) . '" >' . ao_trim_to_length($post["post_title"], 50, " ", " . . .") . '</a></li> ';
}
?>
      
								</ul>
							</li>
"><?php 
        the_title();
        ?>
</a></h2>
			<small><?php 
        the_time('l, F jS, Y');
        ?>
</small>
	
			<div class="entry">
			<p>
				<?php 
        $content = apply_filters('the_content', get_the_content('...', 0));
        $content = str_replace(']]>', ']]&gt;', $content);
        $content = strip_tags($content);
        $partial = ao_trim_to_length($content, 300, ' ', '');
        include 'block-thumb125.php';
        echo $partial;
        ?>
			</p>
			</div>
		</div>
		<div class="clear"></div>
	<?php 
    }
    ?>


	<div class="pagination clearfix"><?php 
    get_pagination();
    ?>
function popular_posts($num, $trim_to_length = 0)
{
    global $wpdb;
    $posts = $wpdb->get_results("SELECT comment_count, ID, post_title FROM {$wpdb->posts} ORDER BY comment_count DESC LIMIT 0 , {$num}");
    $apopular = array();
    foreach ($posts as $post) {
        setup_postdata($post);
        $id = $post->ID;
        $title = $post->post_title;
        $count = $post->comment_count;
        if ($count != 0) {
            $s = '<a href="' . get_permalink($id) . '" title="' . $title . '">' . iif($trim_to_length > 0, ao_trim_to_length($title, $trim_to_length, ' ', '...'), $title) . '</a> ';
            $apopular[] = $s;
        }
    }
    $popular = implode(', ', $apopular);
    return $popular;
}
// if the gallery ID wasn't in a custom field, look for it in $content
if (!$gallery_id) {
    $amatches = array();
    if (preg_match('/\\[monoslideshow id=\\"*(\\d+)\\"*\\]/i', $content, $amatches) == 1) {
        $gallery_id = $amatches[1];
    }
}
if ($gallery_id) {
    $plum_gallery = do_shortcode('[plumgallery id="' . $gallery_id . '" hide_controls="true" hide_nav="true" width="240" height="240" fill_stage="true" animation_speed="600" slideshow_speed="4000" num_images="5"]');
}
$title = get_the_title();
$link = get_permalink();
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]&gt;', $content);
$content = strip_tags($content);
$partial = ao_trim_to_length($content, 400, ' ', '...');
if (!$etitle) {
    $etitle = 'Occasions Event';
}
if (!$elocation) {
    $elocation = 'USA';
}
echo <<<HEREDOC
\t\t\t\t\t\t\t\t<div id="oo-real-featured-section" class="clearme">
\t\t\t\t\t\t\t\t\t<div id="oo-real-featured-slideshow" class="shadow-up">
\t\t\t\t\t\t\t\t\t\t{$plum_gallery}
\t\t\t\t\t\t\t\t\t</div>
\t\t\t\t\t\t\t\t\t<div id="oo-real-featured-article">
\t\t\t\t\t\t\t\t\t\t<h2 id="oo-real-featured-article-title"><a href="{$link}">{$title}</a></h2>
\t\t\t\t\t\t\t\t\t\t<p id="oo-real-featured-article-story">{$partial}</p>
\t\t\t\t\t\t\t\t\t\t<div id="oo-real-featured-article-more"><a href="{$link}">Read More &gt;&gt;&gt;</a></div>
     while ($vp->fetchRecord()) {
         // get our fields from the POD
         $avp[$vp->get_field('id')] = get_vendorfields($vp);
     }
 }
 echo '<div class="clear" style="height: 0;"></div>';
 show_googlemap($avp, -1, 9, true, false);
 echo '<div class="clear"></div>';
 echo '<div class="guide-featuredcolumn">';
 echo '<div class="guide-featuredcolumninner">';
 echo '<div class="guide-featuredtitle">Recent Real Events</div>';
 $recent = new WP_Query();
 $recent->query('cat=11&showposts=10');
 while ($recent->have_posts()) {
     $recent->the_post();
     echo '<div class="guide-featuredname">&bull;&nbsp;&nbsp;<a title="', the_title('', '', false), '" href="', the_permalink(), '">', ao_trim_to_length(the_title('', '', false), 40, ' ', '...'), '</a></div>';
 }
 echo '</div>';
 echo '</div>';
 echo '<div id="guide-featuredcolumn-right" class="guide-featuredcolumn">';
 echo '<div class="guide-featuredcolumninner">';
 echo '<div class="guide-featuredtitle">Popular Vendors</div>';
 $pops = new Pod('vendor_profiles');
 // this is a list of the most popular ACTIVE vendors as determined by summing their total profile views
 //	and their total click-thru counts over the last 60 days. Note that these figures are NOT taken
 //	from the profile counts (which are cummulative from the beginning of time) but from the logs
 //	table, ao_logs (which can be summed over any arbitrary range of time).
 $pops_sql = "SELECT wp_pod_tbl_vendor_profiles.id, wp_pod_tbl_vendor_profiles.name, slug, COUNT( * ) " . "FROM  ao_logs  " . "JOIN wp_pod_tbl_vendor_profiles ON wp_pod_tbl_vendor_profiles.id = ao_logs.item_id " . "WHERE action IN ('profile_view','click_ad','click_web','click_blog','click_facebook','click_twitter','click_linkedin') " . "  AND profile_type = 'Platinum' " . "  AND stamp > DATE_ADD(NOW(), INTERVAL -60 DAY) " . "GROUP BY wp_pod_tbl_vendor_profiles.name " . "ORDER BY COUNT( * ) DESC LIMIT 0, 10";
 //$pops_sql = 'SELECT name, slug FROM wp_pod_tbl_vendor_profiles WHERE profile_type = \'platinum\' ORDER BY profile_views DESC LIMIT 0, 10';
 $pops->findRecords('', 0, '', $pops_sql);
 $total_pops = $pops->getTotalRows();