function add_embed_search()
 {
     global $wgOut;
     //grab a de-encapsulated search
     $mvSearch = new MV_SpecialMediaSearch();
     $mvSearch->setUpFilters();
     //do the search
     $mvSearch->doSearch();
     $wgOut->addHTML($mvSearch->dynamicSearchControl());
     $wgOut->addHTML($mvSearch->getResultsHTML());
 }
	function get_search_feed() {
		global $wgSitename, $wgOut;
		// set up search obj:
		$sms = new MV_SpecialMediaSearch();
		// setup filters:
		$sms->setUpFilters();
		// do the search:
		$sms->doSearch();
		// get the search page title:
		$msTitle = Title::MakeTitle( NS_SPECIAL, 'MediaSearch' );

		$this->feed = new mvRSSFeed(
		$wgSitename . ' - ' . wfMsg( 'mediasearch' ) . ' : ' . strip_tags( $sms->getFilterDesc() ), // title
		strip_tags( $sms->getFilterDesc() ), // description
		$msTitle->getFullUrl() . '?' . $sms->get_httpd_filters_query() // link
		);

		$this->feed->outHeader( $this->output_xml_header );
		$MV_Overlay = new MV_Overlay();
		// for each search result:
		foreach ( $sms->results as $inx => & $mvd ) {
			// get Stream title for mvd match:
			$mvTitle = new MV_Title( $mvd->wiki_title );
			$stremTitle = Title::MakeTitle( MV_NS_STREAM, $mvTitle->getStreamName() . '/' . $mvTitle->getTimeRequest() );
			$this->feed->outPutItem( $mvTitle, $MV_Overlay->getMVDhtml( $mvd, $absolute_links = true ) );
		}
		$this->feed->outFooter();
	}