post;
$excerpt = $post->post_excerpt;
if ($excerpt == "") {
$excerpt = urlencode(substr(strip_tags($post->post_content),0,250));
}
$excerpt = str_replace('+','%20',$excerpt);
$permalink = urlencode(get_permalink($post->ID));
$title = urlencode($post->post_title);
$title = str_replace('+','%20',$title);
$rss = urlencode(get_bloginfo('ref_url'));
$html .= "\n\n";
$html .= "\n";
foreach($display as $sitename) {
// if they specify an unknown or inactive site, ignore it
if (!in_array($sitename, $active_sites))
continue;
$site = $sociable_known_sites[$sitename];
$url = $site['url'];
$url = str_replace('PERMALINK', $permalink, $url);
$url = str_replace('TITLE', $title, $url);
$url = str_replace('RSS', $rss, $url);
$url = str_replace('BLOGNAME', $blogname, $url);
$url = str_replace('EXCERPT', $excerpt, $url);
if (isset($site['description']) && $site['description'] != "") {
$description = $site['description'];
} else {
$description = $sitename;
}
$link = "- ";
$link .= "";
$link .= "
";
$link .= " ";
$html .= "\t".apply_filters('sociable_link',$link)."\n";
}
$html .= "
\n\n";
return $html;
}
?>