Monday, November 08, 2010 at 12:05 AM.
system.verbs.builtins.radio.weblog.getTrackbackLink
on getTrackbackLink (postnum, adrblog=radio.weblog.init ()) {
<<Changes
<<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=" + user.radio.prefs.usernum + "&p=" + postnum + linkarg)}
<<bundle //test code
<<radio.weblog.getTrackbackLink (1)
<<"http://63.200.130.123/rcsComments/newsItems/trackback/radioHosting?u=2&p=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.