Allows other modules to insert autodiscovery code (e.g. FOAF, ATOM, RSD) on main page

modules which wants to insert autodiscovery code will have to provide module_default_node() that does drupal_set_html_head.

e.g. blogapi.module can have the the following function to provide autodiscovery of its xmlrpc engine vis RSD

function blogapi_default_node() {
  drupal_set_html_head('<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . url('blogapi/rsd',NULL,NULL,TRUE) . '" />');
}
CommentFileSizeAuthor
node.autodiscovery.diff832 bytesjseng

Comments

jseng’s picture

Oh yea. This also fix the bug where the RSS autodiscovery does not return absolute URL.

This is the reason why some blog/search engine is unable to crawl site RSS properly.

dries’s picture

According to http://diveintomark.org/archives/2002/06/02/important_change_to_the_link..., the link tag should not be fully qualified (absolute). I committed the patch nonetheless to both HEAD and DRUPAL-4-4.

Anonymous’s picture