Adding a link to the OpenSearch results feed on a search results page does not follow the convention set by the module. It should be exposed as a HTML link tag in the header and not as an ugly XML image in the form. Sorry, but it's gotta go!

Comments

dave reid’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

petercasier’s picture

This is a pity, as it is no longer obvious an RSS feed is available after a search is done. Would have appreciated if it was an option to be set by the admin to either the icon (or an RSS icon) or not.

markj’s picture

Agreed. Different browsers handle this in different ways. Chrome doesn't show any indication there is a feed.

markj’s picture

Here's some code that you can put in a custom module's form_alter() function:

// Add a 'Receive updates for this search' link to the search form. Uses the OpenSearch
  // module to create the feed.
  if (($form_id == 'search_form') && module_exists('opensearch')) {
    $path = $_SERVER['REQUEST_URI'];
    global $base_url;
    $opensearch_path = $base_url . preg_replace('/^\/search\//', '/opensearch/', $path);
    $feed_link = '<img src="/path_to_your/feed.png" /> Receive updates for this search';
    $form['opensearch_feed'] = array(
      '#value' => l($feed_link, $opensearch_path, array('html' => TRUE)),
    );
  }