Update perldocs in general plugins to point to current website/mailing list.
[blosxom-plugins.git] / general / google_sitesearch
blob91639a2918271cc83218838e2ac9844a6ce0ccee
1 # Blosxom Plugin: google_sitesearch
2 # Author(s): Rael Dornfest <rael@oreilly.com> 
3 # Version: 2.0b4
4 # Documentation: See the bottom of this file or type: perldoc google_sitesearch
6 package google_sitesearch;
8 # --- Configurable variables -----
10 # What text should appear on your Search button?
12 # To which domain(s) would you like to restrict your Google SiteSearch?
13 # (Defaults to what you set as your Blosxom $url)
15 my $domains = "";
17 # What customization bits were included in the "cof" field when 
18 # you signed up for your free Google SiteSearch?
20 my $cof = "";
22 # --------------------------------
24 $searchbox; # use as $google_sitesearch::searchbox in flavour templates
26 sub start {
28   $domains ||= $blosxom::url;
29   $domains =~ s!^\w+?://!!; # get rid of the http:// bit
31   $searchbox = <<"SEARCHBOX";
32 <!-- Search Google -->
33 <form method="GET" action="http://www.google.com/custom">
34 <a href="http://www.google.com/"><img src="http://www.google.com/logos/Logo_40wht.gif" border="0" alt="Google"></a>
35 <br />
36 <input name="q" type="text" size="25" maxlength="255" />
37 <br />
38 <input type="submit" name="sa" value="Google Search" />
39 <input type="hidden" name="domains" value="$domains">
40 <input type="hidden" name="cof" VALUE="$cof">
41 <br>
42 <font face=arial,sans-serif size=-1>
43 <input type="radio" name="sitesearch" value="" checked />Search WWW 
44 <input type="radio" name="sitesearch" value="$domains" />Search $blosxom::blog_title
45 </font>
46 </form>
47 <!-- Search Google -->
48 SEARCHBOX
49   
50   0; # No need to continue; we're done.
56 __END__
58 =head1 NAME
60 Blosxom Plug-in: google_sitesearch
62 =head1 SYNOPSIS
64 Provides Google Free SiteSearch [http://www.google.com/services/free.html]
65 for your weblog.
67 =head1 INSTALLATION
69 Drop the google_sitesearch plug-in into your plugins directory.
71 Use $google_sitesearch::searchbox anywhere in your flavour templates you wish.
73 =head1 CONFIGURATION
75 The google_sitesearch plug-in assumes you've signed up for Google's Free
76 SiteSearch [http://www.google.com/services/free.html] for your site.
78 The plug-in will just work out of the box without any configuration.
79 That said, it's probably best to apply any configuration settings you
80 made when you signed up for Google SiteSearch in the Configurable
81 Variables section.
83 While $domains defaults to something intelligent -- your Blosxom $url
84 sans the http:// bit -- you might fill in whatever values appear in 
85 the domains field of the form Google created for you when you signed
86 up.
88 e.g. <INPUT type=hidden name=domains value="example">
90 Simply paste everything between the "" between the "" of $domains in the 
91 Configurable Variables section.
93 Also, Google Free SiteSearch allows you to customize the look-and-feel
94 of your results pages.  If you'd like, you can set $cof to the value
95 appearing in the cof field of the form Google created for you when
96 you signed up.
98 e.g.  <INPUT type=hidden name=cof VALUE="GIMP:#666666;T:#666666;ALC:#666666;L:http://www.example/images/example.gif;GFNT:#666666;LC:#666666;BGC:#dddddd;AH:center;VLC:#666666;GL:1;S:http://www.example/;GALT:#666666;AWFID:2498b45f59b093e3;">
100 Simply paste everything between the "" between the "" of $cof in the 
101 Configurable Variables section.
103 =head1 VERSION
105 2.0b4-5
107 Version number coincides with the version of Blosxom with which the 
108 current version was first bundled.
110 =head1 AUTHOR
112 Rael Dornfest  <rael@oreilly.com>, http://www.raelity.org/
114 This plugin is now maintained by the Blosxom Sourceforge Team,
115 <blosxom-devel@lists.sourceforge.net>.
117 =head1 SEE ALSO
119 Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/
121 Blosxom Plugin Docs: http://blosxom.sourceforge.net/documentation/users/plugins.html
123 =head1 BUGS
125 None known; please send bug reports and feedback to the Blosxom
126 development mailing list <blosxom-devel@lists.sourceforge.net>.
128 =head1 LICENSE
130 Blosxom and this Blosxom Plug-in
131 Copyright 2003, Rael Dornfest 
133 Permission is hereby granted, free of charge, to any person obtaining a
134 copy of this software and associated documentation files (the "Software"),
135 to deal in the Software without restriction, including without limitation
136 the rights to use, copy, modify, merge, publish, distribute, sublicense,
137 and/or sell copies of the Software, and to permit persons to whom the
138 Software is furnished to do so, subject to the following conditions:
140 The above copyright notice and this permission notice shall be included
141 in all copies or substantial portions of the Software.
143 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
144 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
145 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
146 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
147 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
148 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
149 OTHER DEALINGS IN THE SOFTWARE.