Monday, November 08, 2010 at 12:05 AM.

system.verbs.builtins.radio.weblog.isPostOnHomePage

on isPostOnHomePage (adrpost, catname=nil) {
	<<Changes
		<<2/12/02; 12:57:18 PM by JES
			<<If catname is not nil, ignore adrpost^.flNotOnHomePage.
		<<1/26/02; 5:13:18 PM by JES
			<<If adrpost^.flNotOnHomePage is true, return false.
		<<11/13/01; 10:11:22 PM by JES
			<<New optional parameter: catname. If specified, then the script will return true if the post is on the index page for the given category.
		<<9/3/01; 11:26:37 PM by JES
			<<Created. Return true if a post is on the home page, given present prefs, or false if not.
	radio.weblog.initPost (adrpost);
	if adrpost^.flNotOnHomePage {
		if catname == nil {
			return (false)}};
	local (adrposts = parentOf (adrpost^));
	local (adrblog = parentOf (adrposts^));
	return (radio.weblog.isDateOnHomePage (adrpost^.when, adrblog, catname))}
<<bundle //testing
	<<local (adrblog = radio.weblog.init ())
	<<local (adrpost = @adrblog^.posts[sizeOf (adrblog^.posts)])
	<<local (adrpost = @adrblog^.posts[1])
	<<dialog.notify (isPostOnHomePage (adrpost))



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.