<?
/**
* Copyright (C) 2004 Tony Bierman
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
phpgiggle-functions.inc.php contains giggle templates for specialized links
see README.html for complete documentation
*/
/*
template function for search.cpan.org
*/
function phpgiggle_cpan ($giggle_it)
{
return "<a ".phpgiggle_target." class=\"phpGiggle\" title=\"phpGiggle: Search CPAN for '".
$giggle_it ."' !\" href=\"phpGiggle?".
"http://search.cpan.org/search?query=". urlencode($giggle_it ) . "\">" .
$giggle_it."</a>";
}
/*
template function for google.com
*/
function phpgiggle_google ($giggle_it)
{
return "<a ".phpgiggle_target." class=\"phpGiggle\" title=\"phpGiggle: Google.com search for '".
$giggle_it ."' !\" href=\"phpGiggle?".
"http://www.google.com/search?q=".$giggle_it ."\">".
$giggle_it."</a>";
}
/*
template function for dictionary.com
*/
function phpgiggle_dictionary ($giggle_it)
{
return "<a ".phpgiggle_target." class=\"phpGiggle\" title=\"phpGiggle: Dictionary.com definition for '".
$giggle_it ."' !\" href=\"phpGiggle?".
"http://dictionary.reference.com/search?q=".$giggle_it ."\">".
$giggle_it."</a>";
}
/*
template function for freshmeat.net
*/
function phpgiggle_freshmeat ($giggle_it)
{
return "<a ".phpgiggle_target." class=\"phpGiggle\" title=\"phpGiggle: Freshmeat.net search projects for '".
$giggle_it ."' !\" href=\"phpGiggle?".
"http://freshmeat.net/search/?q=". urlencode($giggle_it ) . "\">" .
$giggle_it."</a>";
}
/*
template function for vivisimo.com
*/
function phpgiggle_vivisimo ($giggle_it)
{
return "<a ".phpgiggle_target." class=\"phpGiggle\" title=\"phpGiggle: Vivisimo.com document cluster for '".
$giggle_it ."' !\" href=\"phpGiggle?".
"http://www.vivisimo.com/search?query=". urlencode($giggle_it ) . "\">" .
$giggle_it."</a>";
}
/*
template function for webopedia.com
note: no gaurantee the webopedia page exists - better to manually check it first
*/
function phpgiggle_webopedia ($giggle_it)
{
return "<a ".phpgiggle_target." class=\"phpGiggle\" title=\"phpGiggle: Webopedia.com definition for '".
$giggle_it ."' !\" href=\"phpGiggle?".
"http://www.webopedia.com/TERM/". substr($giggle_it,0,1) . "/" . str_replace(" ","_",$giggle_it ) .".html" . "\">" .
$giggle_it."</a>";
}
?>