A jQueryplugin
that sets a div or span to show a Google Search Blogbar.
The current version is 2.0.0 and is available
under the MIT licence.
For more detail see the documentation reference page.
Or see a minimal page that you could
use as a basis for your own investigations.
The
Google Search Blogbar functionality can easily be added to a division.
It displays a set of blog links based on provided search terms.
The default search term is 'jquery'.
Google places some restrictions on your use of this service, including
obtaining a key
specific to a target URL providing the service, making the Web site
freely accessible, and showing included Google branding.
See the link above for more details.
You can also remove the GSBlogbar widget if it is no longer required.
You can set the blogbar up to cycle automatically through a set of search terms,
with control over the interval between cycles and the order.
Just pass an array of search terms when attaching the blogbar.
For horizontal blogbars, the cycle time is the interval between showing
individual blog entries, whereas for vertical ones it is the interval
between showing blog entries for one of the search terms.
For both orientations, the mode dictates the order of the search terms,
not the individual blog entries.
You can provide preset links or free text entry to generate new blog searches
by using the 'search' command. If there are no matching
search results, the bar defaults to results for 'Google'.
This tab highlights examples of this plugin in use "in the wild".
None as yet.
To add another example, please contact me (kbwood.au{at}gmail.com)
and provide the plugin name, the URL of your site, its title,
and a short description of its purpose and where/how the plugin is used.
Quick Reference
A full list of all possible settings is shown below. Note that not all would apply in all cases.
For more detail see the documentation reference page.
$(selector).gsblogbar({
horizontal: true, // True for horizontal display, false for vertical
verticalCompressed: false, // True for compressed layout when vertical,
// false for expanded
title: '', // Title for the bar
search: 'jquery', // Single or list of search terms
siteRestriction: '', // Specify a site to restrict searches to
order: this.orderRelevance, // Control the order of the results
manyResults: false, // True for many results, false for only a few
cycleTime: this.cycleManual, // Time between cycles of the search terms
cycleMode: this.cycleLinear, // Mode of cycling through the search terms
linkTarget: this.targetSelf, // Control where the blog links open
currentResult: '' // jQuery selector, jQuery object, or element for
// additional info for current entry when horizontal
});
$.gsblogbar.setDefaults(settings) // Change settings for all instances
$(selector).gsblogbar('option', settings) // Change the instance settings
$(selector).gsblogbar('option', name, value) // Change an instance setting
$(selector).gsblogbar('option', name) // Retrieve an instance setting
$(selector).gsblogbar('search', terms) // Perform a search
$(selector).gsblogbar('destroy') // Remove the GSBlogbar functionality
Usage
Include the jQuery library in the head section of your page.