View Single Post
  #1  
Old 12-21-2004, 05:19 PM
dpkm dpkm is offline
 
Join Date: Mar 2003
Location: Canada
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default RSS Feed of Search Results

I'm interested in creating an RSS feed of search results from vBulletin, so that I can stream links to relevant results dynamically to external search results pages (e.g., if I have a non-vB database on cars, and someone searches for Toyota, I can return both the result set from my non-vB database and (say) a set of links to the five highest-ranking search results from vBulletin). This is opposed to the standard way of doing things such as dynamically-generating a hyperlink "click here to search our forums for Toyota!" which sends the searcher "off-page".

(I particularly want to do this to stream result sets from vbAdvanced Image Gallery)

I'm looking for advice on the best approach to do this.

I've installed commercial versions of both CaRP and Grouper from RSS Tools. This gives me the option for two different approaches (or more if someone can suggest differently!):

1) hack search.php to generate a hidden and temporary XML file at the same time it outputs the search results. CaRP can then be used to snag the XML file, cache it (so the original file is no longer necessary) and display the feed (the same could also be done with something like the open source Magpie RSS parser, and would have more benefit to the community, I suppose)

2) create a new version of search.php, say, rss_search.php which is used only from the external query (protected by htaccess perhaps), and simplify it so that Grouper can scrape the web page (and convert through regular expressions the search results to RSS), cache its search results, which are then read by CaRP (and cached again).

Thoughts or suggestions? I admittedly hoped it wouldn't be this difficult to do this, but the way search results are handled natively in vBulletin seems to preclude scraping the result set directly with Grouper.

Thanks.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01156 seconds
  • Memory Usage 1,764KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete