MEET Kaiju’s FRIENDS! Part II
Add New Link Edit Links‘; } ?>
‘)));
// Cut the string to the requested length, and strip any extraneous spaces from the beginning and end.
$desc = trim(substr($short_desc, 0, $length));
// Find out what the last displayed character is in the shortened string
$lastchar = substr($desc, -1, 1);
// If the last character is a period, an exclamation point, or a question mark, clear out the appended text.
if ($lastchar == ‘.’ || $lastchar == ‘!’ || $lastchar == ‘?’) $suffix=”;
// Append the text.
$desc .= $suffix;
// Send the new description back to the page.
return $desc; }
//grab bookmark link array
$bookmarks = array();
$bookmarks = get_bookmarks(‘category=50&orderby=rand’); //can i order by the $rss_item_date ?
//assign names to variables
if (function_exists(‘postbar’))
postbar();
foreach ($bookmarks as $bookmark) {
$bm_descr = $bookmark->link_description;
$bm_name = $bookmark->link_name;
$bm_url = $bookmark->link_url;
$bm_rss = $bookmark->link_rss;
$bm_id=$bookmark->link_id;
$bm_notes=$bookmark->link_notes;
if ($bm_rss == “” && $bm_notes == “”) echo ‘
‘;
elseif($bm_rss ==”” && $bm_notes != “”) echo ‘
‘;
else {
//grab a simplepie object from the given RSS feed
$bm_ff_rss = fetch_feed($bm_rss);
// check that the object is created correctly
if (!is_wp_error( $bm_ff_rss ) ) {
$rss_favicon = $bm_ff_rss->get_favicon(); //return the url of the favicon image
$rss_title = $bm_ff_rss->get_title();
// Figure out how many total items there are, but limit it to 1.
$maxitems = $bm_ff_rss->get_item_quantity(1);
// Build an array of items, starting with the first element, and get 1 item
$rss_items = array();
$rss_items = $bm_ff_rss->get_items(0, $maxitems);
// assign names to variables.
foreach ( $rss_items as $rss_item ){
$rss_item_date = $rss_item->get_date(‘| M j, Y ‘);
$rss_item_permalink = $rss_item->get_permalink();
$rss_item_title = $rss_item->get_title();
$rss_item_content = $rss_item->get_content(); //full contents
$rss_item_descr = $rss_item->get_description(); //full contents if summary is not available
$rss_item_excerpt = shorten($rss_item_content, 200); //200 words excerpt of the contents, tags completely stripped off
}
?>
- Categories
- Selected Tweets
- bark!
- bumps & jumps
- found
- Photos
- tweets
- videos
- Past posts
- May 2022
- July 2017
- October 2016
- March 2015
- February 2015
- December 2014
- November 2013
- October 2013
- July 2013
- January 2013
- December 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- April 2008
- Also Visit