开发者

Search syndicated/on-the-fly-imported content in Drupal 6

开发者 https://www.devze.com 2023-03-28 15:44 出处:网络
I am facing the problem, that I have am including News in a Drupal 6 content page on the fly (think of it as some proprietary form of RSS), so my content page looks like this:

I am facing the problem, that I have am including News in a Drupal 6 content page on the fly (think of it as some proprietary form of RSS), so my content page looks like this:

<?php
   require_once('foo/news.php');
   showNews(); // here we go
?>

Inside showNews() I check for $_GET('newsID'). If not set, I show a news overview page -- the headlines of the varius news, linked to the detail pages with appropriate ?newsID=123 parameter. If it is, I show that individual news entry. Complicated, but it doesn't get any deeper or more complicated/nested than that.

And generally this works like a charm (also because I have a decent propriertary caching mechanisms). Trouble: Now I want Drupal6 search to include these news in search results. How the heck would I do that?

As said, it's not bottomless: It's 1 overview page, around 30 'entries', recentnes开发者_JAVA技巧s of "daily" would suffice, so if I hooked in to cron.php, wiping and re-indexing once a day, I would be fine. But I am fairly clueless where to start to 'offer' my contents to drupal search..

Is this feasible. Or is, say, resorting to google custom search, my only option? Is there maybe some Drupal Extension that does the search indexing/spidering through the frontend? (curling itself, so to speak).

Thank you, folks ツ


You could create a custom Feeds parser for the feed from where you get the news. From that you could import the news as nodes and use a view to search that content.

To get a grip of how to create a feeds parser you could check out the Feeds: YouTube parser module.

0

精彩评论

暂无评论...
验证码 换一张
取 消