This is what we do on a Drupal 5 site. Should work more or less the same on D6 as well.<br><br>In template.php, we include an inc file that handles the XML from the external site, and then we add "sponsored results". Like so:<br>
<br><br><font size="1"><span style="font-family: courier new,monospace;">function phptemplate_search_page($results, $type) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $enable_external = FALSE;</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $external = path_to_theme() . '/something_search.inc';</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> if (file_exists($external)) {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> include_once($external);</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> if (function_exists('external_search')) {</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> $enable_external = TRUE;</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> // This is the search term. Remove + in case it is a multiword search</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> //$key = trim(preg_replace('/\+/i', ' ', arg(2)));</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $key = arg(2);</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> // run the function to get results</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $external_results = external_search($key);</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> list($jr_top, $jr_bottom, $jr_sidebar) = $external_results;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $output = '<dl class="search-results">';</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> if ($enable_external) $output .= '<div class="sponsored">' . $jr_top . '</div>';</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> foreach ($results as $entry) {</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $output .= theme('search_item', $entry, $type);</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> }</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> if ($enable_external) $output .= '<div class="sponsored">' . $jr_bottom . '</div>';</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $output .= '</dl>';</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> $output .= theme('pager', NULL, 10, 0);</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> return $output;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span></font><br>
<br><br><div class="gmail_quote">2009/3/25 Ámon Tamás <span dir="ltr"><<a href="mailto:amont@5net.hu">amont@5net.hu</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
I like to add some search result from a different site to drupal. I like to show the search results mixed in the other and drupal site. I try to use mnogosearch to index the other site, but I can not insert the results to the drupal results. How can I make it?<br>
<br>
<br>
<br>
Ámon Tamás<br>
<br>
Sitefejlesztő és programozó<br><font color="#888888">
-- <br>
5NET Informatikai Kft.<br>
1062 Budapest, Aradi utca 38. A 3/11<br>
telefon: (1) 461-0205 | fax: (1) 461-0206<br>
e-mail: <a href="mailto:amont@5net.hu" target="_blank">amont@5net.hu</a> | web: <a href="http://www.5net.hu" target="_blank">http://www.5net.hu</a><br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.<br>
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra<br>Simplicity is the ultimate sophistication. -- Leonardo da Vinci<br>