Monday, April 04, 2011 at 1:08 AM.

radio2Suite.viewPost

on viewPost (adrpost) {
	<<Changes
		<<3/15/11; 6:32:27 PM by DW
			<<Factored from radio2suite.viewHistory.
	local (title = string.trimwhitespace (adrpost^.title), s = "");
	local (link = string.trimwhitespace (adrpost^.link));
	local (description = string.trimwhitespace (adrpost^.description));
	if sizeof (title) > 0 {
		if sizeof (link) > 0 {
			s = "<a href=\"" + link + "\">" + title + "</a>"}
		else {
			s = title};
		if sizeof (description) > 0 {
			s = s + ". " + description}}
	else { //title is empty
		if sizeof (description) > 0 {
			if sizeof (link) > 0 {
				s = "<a href=\"" + link + "\">" + description + "</a>"}
				<<s = twitter.hotUpText (description) + " <a href=\"" + link + "\">#</a>"
			else {
				s = description}}
		else { //title and description are empty
			if sizeof (link) > 0 { //just plop down the link
				s = "<a href=\"" + link + "\">" + link + "</a>"}}};
	return (s)}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.