<?php

/*
 * web_search - Generic web search box
 * by Randy Smith
 * $Id: setup.php,v 1.9 2005/10/07 15:31:46 randy Exp $
 */

if (!defined ('SM_PATH')) { define ('SM_PATH','../../'); }

function squirrelmail_plugin_init_web_search () {
  global $squirrelmail_plugin_hooks;

  if (! file_exists(SM_PATH.'plugins/web_search/web_search.conf.php')) {
    return;
  }

  $squirrelmail_plugin_hooks['menuline']['web_search'] = 'ws_menuline_stub';
  $squirrelmail_plugin_hooks['left_main_before']['web_search'] = 'ws_left_main_before_stub';
  $squirrelmail_plugin_hooks['left_main_after']['web_search'] = 'ws_left_main_after_stub';
}

function ws_menuline_stub () {
  include_once (SM_PATH.'plugins/web_search/hooks.php');
  ws_menuline();
}

function ws_left_main_before_stub () {
  include_once (SM_PATH.'plugins/web_search/hooks.php');
  ws_left_main_before();
}

function ws_left_main_after_stub () {
  include_once (SM_PATH.'plugins/web_search/hooks.php');
  ws_left_main_after();
}

function web_search_version () { return '0.1.6'; }

?>