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

on getTrackbackLink (postnum, adrblog=radio.weblog.init ()) {
		<<10/17/02; 12:02:37 AM by JES
			<<A bottleneck routine for getting the trackback link for a weblog post. Called by radio.html.trackbackLink.
	if not adrblog^.prefs.trackback.flEnabled {
		return ("")};
	local (linkarg = "");
	try { //set link
		local (url, catname = "");
		try { //it may be possible for getUrlForPost to fail. we don't want that to cause an error.
			local (pta = html.getPageTableAddress ());
			if defined (pta^.categoryName) { //set catname
				catname = pta^.categoryName}};
		if radio.weblog.getUrlForPost (@adrblog^.posts.[string.padWithZeros (postnum, 8)], @url, catname, adrblog) {
			linkarg = "&link=" + string.urlEncode (url)}};
	return (adrblog^.prefs.trackback.trackbackPageUrl + "?u=" + + "&p=" + postnum + linkarg)}
<<bundle //test code
	<<radio.weblog.getTrackbackLink (1)

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.