The BilliardSearch.net WordPress Plugin

The BilliardSearch.net WordPress plugin offers the following functionality:

  • Add a searchbox to your post content, or the sidebar (via a 'widget')
  • (more functionality coming soon)

Install and then refer to the Quick Start section to have a search box on your site within seconds.

  1. Download
  2. Installation
  3. Quick Start
  4. Manual

NB - instructions given here were written for WordPress version 2.8.


Downloads


Installation

You may be able to install the plugin via the WordPress admin system (look for 'Install Plugin' page), but depending on your particular system you may need to install it manually:

  1. Download the zip file to your hard drive, and unzip it. You should then have a new folder with a name something like 'billiardsearch_wordpress_plugin-1.0'.
  2. Using your favourite FTP client (we recommend Filezilla), copy that folder to your WordPress 'plugins' directory (in WordPress 2.8, that would be 'wp-content/plugins/').
  3. Activate the plugin by going to the 'Plugins' page in your WordPress admin system, look for the 'BilliardSearch' entry, and click 'Activate'.

Quick Start

Add a search box to the sidebar

  1. Navigate to the 'Widgets' section of your WordPress admin: click 'Appearance' in the left hand column, and then click 'Widgets' in the box that pops up.
  2. Drag the BilliardSearch widget into the right hand area labelled 'Sidebar 1' and open the widget.
  3. In the 'Commands:' input box, enter the following to get a 190x42 pixel search box: searchbox type="190x42";

For different sizes of search box, change the 'type' value to any of the following: '190x42', '210x47', '225x55', '468x60'

Add a search box to post content

  1. At the point where you want the search box to appear, copy the following into your post content to get a 225x55 pixel search box: {billiardsearch searchbox type="225x55"}

For different sizes of search box, change the 'type' value to any of the following: '190x42', '210x47', '225x55', '468x60'


Manual

Command Format

The BilliardSearch.net WordPress plugin works by processing commands it receives. Commands can be followed by one or more options, separated by whitespace, in the format: option="value".

In the sidebar (via the widget), commands are given one per line, with a semi-colon denoting the end of a command, eg:

enable;
searchbox type="468x60";
searchbox type="190x42" focus="yes" new_window="no";

In post content, the commands must be embedded in curly braces like this:

{billiardsearch enable}
{billiardsearch searchbox type="468x60"}
{billiardsearch searchbox type="225x55" focus="yes" new_window="no"}

Comments

Anything following a hash symbol ('#') is treated as a comment and ignored, eg in the sidebar widget:

# This is a comment, and the next line is a commented-out command
#searchbox type="225x55";

and for commands embedded in post content:

{billiardsearch # This is a comment, and the next line is a commented-out command}
{billiardsearch #searchbox type="225x55"}

Command Reference

disable

Disables command processing (until the next enable command).


enable

Enables command processing (until the next disable command).


searchbox

Adds a BilliardSearch.net search box.

Option Description Default value
type

This option is required.

Specify the type of search box required. Possible values for regular javascript-based search boxes (with a static image fallback if javascript is not available):

190x42 | 210x47 | 225x55 | 468x60

The width and height are specified in the option value, eg 190x42 denotes a 190 pixel wide by 42 pixel high search box.

190x42
new_window

Whether or not to open BilliardSearch.net in a new browser window:

yes | true | 1 - open in new window

no | false | 0 - open in same window

no
focus

Whether or not to give keyboard focus to the search query input immediately upon showing the search box:

yes | true | 1 - give keyboard focus

no | false | 0 - don't give keyboard focus

yes
query

Default query to show in the query text input box.

id

A DOM id to assign to the div containing the search box. Interior elements have IDs using this ID as a prefix. This option should be used if you have more than one search box on a web page, to give each box its own unique ID. This will be needed if you use the query option on more than one search box on the same web page, or if you need your web page to validate.


Snooker Cues, Case And Accessories At The Right Price

© 2008 - 2012 Advanced Web Construction Ltdl

more AWCsearch sites: Drums.tinternet.info - information and search site for drummers / drumming | Pratchett.tinternet.info - Discworld / Terry Pratchett search engine, news and videos