File: ExternalSearchEngine.class.php

package info (click to toggle)
fusionforge 5.3.2%2B20141104-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 60,472 kB
  • sloc: php: 271,846; sql: 36,817; python: 14,575; perl: 6,406; sh: 5,980; xml: 4,294; pascal: 1,411; makefile: 911; cpp: 52; awk: 27
file content (45 lines) | stat: -rw-r--r-- 884 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
 * External search plugin
 *
 * Copyright 2004 (c) Guillaume Smet
 *
 * http://gforge.org
 *
 */

require_once $gfwww.'search/include/engines/GroupSearchEngine.class.php';

class ExternalSearchEngine extends GroupSearchEngine {

	/**
	* name of the external site
	*
	* @var string $name
	*/
	var $name;

	/**
	* url of the external site
	*
	* @var string $url
	*/
	var $url;

	function ExternalSearchEngine($type, $name, $url) {
		$this->name = $name;
		$this->url = $url;

		$this->GroupSearchEngine($type, 'ExternalHtmlSearchRenderer', $name);
	}

	function isAvailable($parameters) {
		return true;
	}

	function getSearchRenderer($words, $offset, $exact, $parameters) {
		require_once $gfplugins.'externalsearch/include/ExternalHtmlSearchRenderer.class.php';
		$renderer = new ExternalHtmlSearchRenderer($type, $this->name, $this->url, $words);
		return $renderer;
	}
}