Yahoo! BOSS Search

Developer

Laisvunas

3rd Party (Commercial)
Current Version: 2.2.2

License Agreement

Buy Now!

$35.00
Qty:

EE Version Support

  • ExpressionEngine 1.x
  • ExpressionEngine 2

Compatibility

If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher

Requirements

  • jQuery for the Control Panel

Add-On Type(s)

Extension, Module

Tags

Allows you to create custom search engines using Yahoo! BOSS API.

INSTALLATION FOR EE 2.0+

1) upload the directory “yboss” to /system/expressionengine/third_party on the server.

2) go CP Home > Add-ons > Modules, find “Yahoo! BOSS Search” in modules list and click “Install”.
Then click the link “Yahoo! BOSS Search” and set settings.
If you don’t have Customer key and Customer secret, get them at http://developer.yahoo.com/search/boss/

INSTALLATION FOR EE 1.x+

1) upload the file ext.yboss_ext.php to /system/extensions directory on the server.

2) upload the files mod.yboss.php,  mcp.yboss.php and oauth.php to /system/modules/yboss directory on the server.

3) upload the file lang.yboss.php to /system/language/english directory on the server.

4) go CP Home >  Admin >  Utilities >  Extensions Manager, find “Yahoo! BOSS Search” in extensions list and click “Enable”.

5) go CP Home >  Modules, find “Yahoo! BOSS Search” in modules list and click “Install”. Then click the link “Yahoo! BOSS Search” and set settings.
If you don’t have Customer key and Customer secret, get them at http://developer.yahoo.com/search/boss/

SETTINGS

1) Customer key - required.

2) Customer secret - required.

These are strings you will get after registering at http://developer.yahoo.com/search/boss/
(Click My projects, then create a new project and don’t forget to enable BOSS for your project.)

THE TAG {exp:yboss:form}

I. Parameters:

1) form_id - required. Allows you to specify HTML id attribute of the search form.

2) help_button_id - optional. Allows you to specify “id” attribute
of HTML element which will be used by client-side script. Client-side
script will display simple help dialog.

3) services - optional. Pipe delimited list of BOSS services. These are:
ads, spelling, web, limitedweb, news, images, blogs.

4) limit - optional. Max number of results to return. Max number of results differs
per service: 50 for web and limitedweb, 35 for images, 20 for news and blogs. Submitting
the value higher than that is illegal according to BOSS API.

5) sites - optional. Pipe delimited list of sites you want to restrict the search.
E.g. sites=“amazon.com|ebay.com”

6) region - optional. Specifies which regional (country) search product to query.
See http://developer.yahoo.com/search/boss/boss_api_guide/supp_regions_lang.html

7) abstract - optional. abstract=“long” will retrieve and display an abstract of a web document
up to 300 characters. This expanded abstract provides the requestor with a larger piece of information
to work from in a web search query.

8) style - optional. style=“raw” parameter is used to clean out the HTML from the abstract.

9) ads_market - optional. Ads market. Needed in case your Yahoo! BOSS custom search engine uses ads service.
About possible values see http://developer.yahoo.com/search/boss/boss_api_guide/supp_regions_lang.html

10) ads_partner - optional. Un-encoded Source Tag (alphanumeric string).
Needed in case your Yahoo! BOSS custom search engine uses ads service.

11) ads_serve_url - optional. URL of the exact page on which the ads will be displayed.
Needed in case your Yahoo! BOSS custom search engine uses ads service.

12) ads_affildata_ip - optional. End user ip address.
Needed in case your Yahoo! BOSS custom search engine uses ads service.

13) term_element - required. The name of the form element whose value
contains search term(s).

14) region_element - optional. The name of the form element whose value
contains info which regional (country) search product to query.

15) services_element - optional. The name of the form element whose value
contains info which BOSS services should be used.

16) limit_element - optional. The name of the form element whose value
contains info about max number of results to return.

17) sites_element - optional. The name of the form element whose value
contains info about sites you want to restrict the search.

18) title_element - optional. The name of the form element whose value
contains info about title word to search.
Might be needed by following services: web, limitedweb, news, blogs.

19) url_element - optional. The name of the form element whose value
contains info about word in URL.
Might be needed by following services: web, limitedweb, news, images.
NOTICE: For images service the value of this element should contain exact name of the image file,
e.g. mydog.gif.

20) dimensions_element - optional. The name of the form element whose value
contains info about dimensions of the image. Possible values:
all (default), small, medium, large, wallpaper, widewallpaper.
Might be needed by images service.

21) age_element - optional. The name of the form element whose value
contains info about dimensions of age of pages.
Possible values: 1d - 1000d.
Might be needed by following services: news, blogs.

22) orderby_element - optional. The name of the form element whose value
contains info about how results should be sorted.
Possible value: date. If not specified results will be sorted by relevance.

23) toggle_advanced_element - optional. The name of the form element whose value
is either “simple” or “advanced”. Changing the value of this element will switch
search form from simple mode to advanced or vice versa.

24) toggle_advanced_html_ids - optional. The pipe delimited list of HTML id attributes of page elements
which should be displayed in advanced mode but not in simple mode.

25) web_optional_widgets - optional. The pipe delimited list of form element names which should be displayed
in case web service is selected but hidden in case web service is not selected.

26) limited_web_optional_widgets - optional. The pipe delimited list of form element names which should be displayed
in case limitedweb service is selected but hidden in case limitedweb service is not selected.

27) images_optional_widgets - optional. The pipe delimited list of form element names which should be displayed
in case images service is selected but hidden in case images service is not selected.

28) news_optional_widgets - optional. The pipe delimited list of form element names which should be displayed
in case news service is selected but hidden in case news service is not selected.

29) blogs_optional_widgets - optional. The pipe delimited list of form element names which should be displayed
in case blogs service is selected but hidden in case blogs service is not selected.

30) restore_fields - optional. The pipe delimited list of form element names whose previous values should be restored
on page load.
NOTICE: to restore values of term_element, title_element and url_element it is better to use single variables
yboss_search_term, yboss_url_word, yboss_title_word.

31) normalize_unicode - optional. Allows you to specify if search terms should be converted
into unicode’s normalization form C. Possible values - yes/no. Default value is “no”.
To convert search terms into unicode’s normalization form C you should either use PHP version 5.3 or
higher or have PHP extension PECL intl installed.

32) disable_enter_key - optional. Allows you to specify if “Enter” key should be disabled inside search form.
This could be useful in order to prevent accidental submission of the form. Accepts values “yes” and “no” (default).

II. Single variables:

1) yboss_search_term - outputs search term(s), that is, the value of term_element field.

2) yboss_url_word - outputs the value of url_element field.

3) yboss_title_word - outputs the value of title_element field.


THE TAG {exp:yboss:results}

I. Parameters:

1) main_template_url - required. Allows you to specify URL of the main template (that which contains search form).
You must specify full URL, i.e. starting with “http”. This parameter accepts inside its value
the following ExpressionEngine variables: site_id, site_url, site_index, homepage.

2) results_template_url - required. Allows you to specify URL of the search results template.
You must specify full URL, i.e. starting with “http”. This parameter accepts inside its value
the following ExpressionEngine variables: site_id, site_url, site_index, homepage.

3) max_links - optional. Allows you to specify how many pagination links should be
displayed. Default value is “5”.

4) normalize_unicode - optional. Allows you to specify if search terms should be converted
into unicode’s normalization form C. Possible values - yes/no. Default value is “no”.
To convert search terms into unicode’s normalization form C you should either use PHP version 5.3 or
higher or have PHP extension PECL intl installed.

5) process_indicator - optional. Allows you to specify HTML class parameter of the HTML element
which will act as the indicator of search results being loaded.

6) process_indicator_scroll - optional. Allows you to specify if HTML element
which acts as the indicator of search results being loaded should be srolled into view(value “yes”) or not (value “no”).
Default is “no”.

7) date_format - optional. ExpressionEngine’s date formats are described here:
http://expressionengine.com/user_guide/templates/date_variable_formatting.html.
Default value is “%F %d, %Y”.

8) date_localize - optional. Set to “yes” if you need the dates to be localized, “no” if otherwise.
Default value is “no”.

9) predefined_search_services - optional. Used to set predefined search, i.e. search which is being
done without user submitting search terms (see example code and demo). Allows you to specify pipe delimited list of BOSS services. These are:
ads, spelling, web, limitedweb, news, images, blogs. E.g. predefined_search_services=“news|web”

10) predefined_search_query - optional. Used to set predefined search, i.e. search which is being
done without user submitting search terms. Allows you to specify query string.
E.g. predefined_search_query=“q=commodity%20prices&format=xml&start=0&count=20&age=7d”

II. Main variable pairs:

Inside the tag exp:yboss:results there might be following variable pairs used to output results of different
Yahoo! BOSS services:

1) yboss_resultset_spelling

2) yboss_resultset_ads

3) yboss_resultset_web

4) yboss_resultset_limitedweb

5) yboss_resultset_news

6) yboss_resultset_images

7) yboss_resultset_blogs

NOTICE: any other variables *must* be inside these variable pairs; no content outside these variable pairs will be outputted.

III. Top and bottom variable pairs:

Inside ech of the variable pairs listed above two other variable pairs might be used:

1) yboss_resultset_top

2) yboss_resultset_bottom

Inside these variable pairs the following single variables can be used:

1) yboss_search_term - outputs search term(s), that is, the value of term_element field.

2) yboss_url_word - outputs the value of url_element field.

3) yboss_title_word - outputs the value of title_element field.

4) yboss_first_result_count - outputs count number of the first item in the results set found by the relevant BOSS service.

5) yboss_last_result_count - outputs count number of the last item in the results set found by the relevant BOSS service.

6) yboss_total_results - outputs number of items found by the relevant BOSS service.

7) yboss_pagination_links - outputs pagination links for the items found by the relevant BOSS service.

IV. Single variables

Outside top and bottom variable pairs the following single variables might be used.

Inside yboss_resultset_spelling variable pair:

1) yboss_count - outputs count number of item on current page.

2) yboss_absolute_count - outputs absolute count number of item,
including those items on previous pages (if using pagination).

3) yboss_suggestion - outputs spelling suggestion.

4) yboss_suggestion_url - outputs URL of the new search according to spelling suggestion.

Inside yboss_resultset_ads variable pair:

1) yboss_count - outputs count number of item on current page.

2) yboss_absolute_count - outputs absolute count number of item,
including those items on previous pages (if using pagination).

3) yboss_title

4) yboss_description

5) yboss_sitehost

6) yboss_bid

7) yboss_currency

8) yboss_adultrating

9) yboss_clickurl

Inside yboss_resultset_web variable pair:

1) yboss_count - outputs count number of item on current page.

2) yboss_absolute_count - outputs absolute count number of item,
including those items on previous pages (if using pagination).

3) yboss_date - Returns the date the URL was last crawled.

4) yboss_clickurl - Returns a navigation URL that leads to the target URL for each result.

5) yboss_url - Result’s URL.

6) yboss_dispurl - Returns the URLs of documents matching the query result.

7) yboss_title - Returns the result’s title, with keywords highlighted with html and tags.

8) yboss_abstract - Abstract with keywords highlighted with html tags.

Inside yboss_resultset_limitedweb variable pair:

1) yboss_count - outputs count number of item on current page.

2) yboss_absolute_count - outputs absolute count number of item,
including those items on previous pages (if using pagination).

3) yboss_date - Returns the date the URL was last crawled.

4) yboss_clickurl - Returns a navigation URL that leads to the target URL for each result.

5) yboss_url - Result’s URL.

6) yboss_dispurl - Returns the URLs of documents matching the query result.

7) yboss_title - Returns the result’s title, with keywords highlighted with html and tags.

8) yboss_abstract - Abstract with keywords highlighted with html tags.

Inside yboss_resultset_news variable pair:

1) yboss_count - outputs count number of item on current page.

2) yboss_absolute_count - outputs absolute count number of item,
including those items on previous pages (if using pagination).

3) yboss_date - Last publication date of story.

4) yboss_abstract - Abstract of news story.

5) yboss_title - Title (or Headline) of the story.

6) yboss_language - Language of story.

7) yboss_source - Source publication.

8) yboss_sourceurl - URL of source publication.

9) yboss_url - Link to story.

Inside yboss_resultset_images variable pair:

1) yboss_count - outputs count number of item on current page.

2) yboss_absolute_count - outputs absolute count number of item,
including those items on previous pages (if using pagination).

3) yboss_clickurl - URL to click to view image.

4) yboss_size - Size of image file.

5) yboss_format - Format of image.

6) yboss_height - Height of full-size image.

7) yboss_referrerclickurl - Clickable link to page in which image was found.

8) yboss_referrerurl - Original link to page in which image was found.

9) yboss_title - Title of image (usually the filename).

10) yboss_url - URL of image itself.

11) yboss_width - Width of full-size image.

12) yboss_thumbnailheight - Thumbnail height.

13) yboss_thumbnailwidth - Thumbnail width.

14) yboss_thumbnailurl - Thumbnail image.

Inside yboss_resultset_blogs variable pair:

1) yboss_count - outputs count number of item on current page.

2) yboss_absolute_count - outputs absolute count number of item,
including those items on previous pages (if using pagination).

3) yboss_date - Publication date of story.

4) yboss_score - Score is the “relevancy” of any given blog article as it best
“matches” the query term you entered. It is a combination of factors
including content, how current the blog is, and other measurements.

5) yboss_provider - Contains the name of the blog. This is not a URL.
If the provider is not found or the blog is unable to be categorized,
provider is set to “etc”.

6) yboss_clickurl - Click this link to reach story, if present.

7) yboss_dispurl - Display URL. Usually the same as clickurl.
This URL is the source of the blog article.

8) yboss_title - Title (or Headline) of the story.
It may also bold your query term if there is a match.

9) yboss_abstract - A description of the bog article. Usually the first line in the body of the blog.

10) yboss_author - The name of the blogger that wrote the article. This field may or may not have an entry.

11) yboss_icon - An associated image that may be part of the blog.

SIMPLE EXAMPLE

Let’s create a simple search engine which will use Yahoo! BOSS web service to search amazon.com and ebay.com sites.
Two templates will be needed: template containing exp:yboss:form, e.g. technical/yboss_form_simple and
embed template containing exp:yboss:results tag, e.g. technical/embed_yboss_results_simple.

I. Template containing {exp:yboss:form} tag


<html>

<head>

<title>Yahoo! BOSS Search simple demo</title>

<style type="text/css">

/*Common*/

body {
color: black;
font-family: "arial unicode ms", helvetica, arial, sans-serif;
margin: 0;
font-size: small;
padding: 0;
}

a {
color: #4372aa;
text-decoration: none;
cursor: pointer;
}

a:hover {
text-decoration: underline;
}

/*Main content*/

#maincontent {
width: 48em;
position: relative;
left: 50%;
margin-left: -24em;
padding-bottom: 1em;
}

/* Tables */

table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
}

td {
font-family: "arial unicode ms";
font-size: small;
padding-bottom: 0.5em;
}

/* Headings */

h1 {
font-size: 1.5em;
font-weight: normal;
}

h2 {
font-size: 1.1em;
font-weight: bold;
}


/* Search */

#search_results #word_inputtext, #search_results #title_word_inputtext, #search_results #url_word_inputtext {
width: 100%;
margin: 0 0 0 0;
display: inline;
}

#search_results #submitbutton {
margin: 0 0 0 0;
}

#search_results #help_button {
margin: 0 0 0 0; 
padding-left: 0;
padding-right: 0;
}

.process_indicator {
background-image: url({site_url}{globalvar_interface_images_uri}ajax-loader.gif);
background-repeat: no-repeat;
background-position: center;
height: 7em;
width: 100%;
text-align: center;
display: none;
}

#search_results h2 {
text-align: left;
font-size: 1.2em;
margin: 1.1em 0 0 0;
}

#search_results h2 a:hover {
text-decoration: underline;
color: #4372aa;
}

#search_results p.dispurl {
color: #525252;
margin: 0 0 0.4em 0;
}

#search_results p.abstract {
margin: 0 0 0.4em 0;
}

</style>

</head>

<body id="search_results">

<div id="maincontent">

<h1>Yahoo! BOSS Search simple demo</h1>

<p>
This search engine will use Yahoo! BOSS web service to search amazon.com and ebay.com sites.
</p>

{exp:yboss:form 
term_element="word"
form_id="search_form"
help_button_id="help_button"
abstract="long"
sites="amazon.com|ebay.com"
services="web|spelling"
limit="50"
normalize_unicode="yes"
disable_enter_key="yes"
}

<form id="search_form" action="{homepage}/{segment_1}{if segment_2 != ""}/{segment_2}{/if}{if segment_3 != ""}/{segment_3}{/if}" method="post" accept-charset="utf-8">

<table>

<tr>

<td style="width: 1%;">
Term:&nbsp;
</td>

<td>
<input type="text" name="word" id="word_inputtext" value="{yboss_search_term}" title="Enter term or phrase. To see available operators click help button." />
</td>

<td style="width: 1%;">
<button id="help_button" value="">?</button>
</td>

</tr>

<tr>

<td style="width: 1%;">
</td>

<td colspan="2">
<input type="submit" id="submitbutton" value="Submit" />
</td>

</tr>

</table>

</form>

{/exp:yboss:form}

{embed="technical/embed_yboss_results_simple"}

</div><!-- End of #maincontent -->

</body>

</html>

II. Template containing {exp:yboss:results} tag


{exp:yboss:results
normalize_unicode="yes"
main_template_url="{homepage}/technical/demo/yahoo_boss_search_simple_demo/"
results_template_url="{homepage}/technical/embed_yboss_results_simple/"
process_indicator="process_indicator"
process_indicator_scroll="yes"
}

{yboss_resultset_spelling}

{yboss_resultset_top}
{if yboss_first_result_count > 0}<p>Spelling suggestion{/if}{if yboss_last_result_count > 1}s{/if}{if yboss_first_result_count > 0}:{/if}
{/yboss_resultset_top}

{if yboss_count > 1}, {/if}<strong><a href="{yboss_suggestion_url}">{yboss_suggestion}</a></strong>

{yboss_resultset_bottom}
{if yboss_first_result_count > 0}</p>{/if}
{/yboss_resultset_bottom}

{/yboss_resultset_spelling}

{yboss_resultset_web}

{yboss_resultset_top}
<div class="process_indicator">
<p>Loading web results</p>
</div>
{if yboss_total_results==0}<strong>Web</strong> search for <strong>{yboss_search_term}</strong> returned no results.{/if}
{if yboss_first_result_count > 0}<p>Displaying <strong>web</strong> search results from  {yboss_first_result_count} to {yboss_last_result_count} of {yboss_total_results} for <strong>{yboss_search_term}</strong></p>{/if}

{/yboss_resultset_top}

<div class="result_item">
<h2>{yboss_absolute_count}. <a href="{yboss_clickurl}">{yboss_title}</a></h2>
<p class="dispurl">{yboss_dispurl} {yboss_date}</p>
<p class="abstract">{yboss_abstract}</p>
</div>

{yboss_resultset_bottom}
<p style="text-align: center;">{yboss_pagination_links}</p>
{/yboss_resultset_bottom}

{/yboss_resultset_web}

{/exp:yboss:results}

COMPLEX EXAMPLE

Let’s create a complex search engine which will use Yahoo! BOSS web, news, images and blogs services to search amazon.com or ebay.com sites or the whole internet.
Two templates will be needed: template containing exp:yboss:form, e.g. technical/yboss_form_complex and
embed template containing exp:yboss:results tag, e.g. technical/embed_yboss_results_complex.

I. Template containing {exp:yboss:form} tag


<html>

<head>

<title>Yahoo! BOSS Search complex demo</title>

<style type="text/css">

/*Common*/

body {
color: black;
font-family: "arial unicode ms", helvetica, arial, sans-serif;
margin: 0;
font-size: small;
padding: 0;
}

a {
color: #4372aa;
text-decoration: none;
cursor: pointer;
}

a:hover {
text-decoration: underline;
}

/*Main content*/

#maincontent {
width: 48em;
position: relative;
left: 50%;
margin-left: -24em;
padding-bottom: 1em;
}

/* Tables */

table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
}

td {
font-family: "arial unicode ms";
font-size: small;
padding-bottom: 0.5em;
}

/* Headings */

h1 {
font-size: 1.5em;
font-weight: normal;
}

h2 {
font-size: 1.1em;
font-weight: bold;
}

/* Search */

#search_results #word_inputtext, #search_results #title_word_inputtext, #search_results #url_word_inputtext {
width: 100%;
margin: 0 0 0 0;
display: inline;
}

#search_results #submitbutton {
margin: 0 0 0 0;
}

#search_results #help_button {
margin: 0 0 0 0; 
padding-left: 0;
padding-right: 0;
}

.process_indicator {
background-image: url({site_url}{globalvar_interface_images_uri}ajax-loader.gif);
background-repeat: no-repeat;
background-position: center;
height: 7em;
width: 100%;
text-align: center;
display: none;
}

#search_results h2 {
text-align: left;
font-size: 1.2em;
margin: 1.1em 0 0 0;
}

#search_results h2 a:hover {
text-decoration: underline;
color: #4372aa;
}

#search_results p.dispurl {
color: #525252;
margin: 0 0 0.4em 0;
}

#search_results p.abstract {
margin: 0 0 0.4em 0;
}

#search_results img {
border: 0;
float: left;
margin: 0 1em 0.5em 0;
}

#search_results .img_url {
clear: left;
color: #525252;
margin-top: 0;
}

#search_results p.img_abstract {
color: #525252;
margin-bottom: 0.4em;
}

</style>

</head>

<body id="search_results">

<div id="maincontent">

<h1>Yahoo! BOSS Search complex demo</h1>

{exp:yboss:form 
term_element="word"
toggle_advanced_element="simple_or_advanced"
services_element="services"
limit_element="limit"
sites_element="sites"
title_element="title_word"
url_element="url_word"
dimensions_element="dimensions"
age_element="age"
orderby_element="orderby"
form_id="search_form"
help_button_id="help_button"
abstract="long"
toggle_advanced_html_ids="title_word_tr|url_word_tr|title_word_inputtext|url_word_inputtext"
web_optional_widgets="title_word_tr|url_word_tr"
images_optional_widgets="dimensions|url_word_tr"
news_optional_widgets="age|orderby|title_word_tr|url_word_tr"
blogs_optional_widgets="age|title_word_tr"
restore_fields="simple_or_advanced|services|limit|sites|age|orderby|dimensions"
normalize_unicode="yes"
disable_enter_key="yes"
}

<form id="search_form" action="{homepage}/{segment_1}{if segment_2 != ""}/{segment_2}{/if}{if segment_3 != ""}/{segment_3}{/if}" method="post" accept-charset="utf-8">

<table>

<tr>

<td style="width: 1%;">
Term:&nbsp;
</td>

<td>
<input type="text" name="word" id="word_inputtext" value="{yboss_search_term}" title="Enter term or phrase. To see available operators click help button." />
</td>

<td style="width: 1%;">
<button id="help_button" value="">?</button>
</td>

</tr>

<tr id="title_word_tr" style="display: none;">

<td style="width: 1%;">
Title:&nbsp;
</td>

<td>
<input type="text" name="title_word" id="title_word_inputtext" value="{yboss_title_word}" title="Enter word which should apper as part of the title e.g. europe" /><br />
</td>

<td style="width: 1%;">
</td>

</tr>

<tr id="url_word_tr" style="display: none;">

<td style="width: 1%;">
URL word:&nbsp;
</td>

<td>
<input type="text" name="url_word" id="url_word_inputtext" value="{yboss_url_word}" title="For web service: enter word which should appear as part of URL query, e.g. debt. For images service: enter exact file name, e.g. mydog.gif" /><br />
</td>

<td style="width: 1%;">
</td>

</tr>

<tr>

<td style="width: 1%;">
Mode:&nbsp;
</td>

<td>
<input type="radio" name="simple_or_advanced" value="simple" checked="checked" /> simple
<input type="radio" name="simple_or_advanced" value="advanced" /> advanced

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Search in:

&nbsp;<input type="checkbox" name="services" value="web" checked="checked" /> web
&nbsp;<input type="checkbox" name="services" value="images" /> images
&nbsp;<input type="checkbox" name="services" value="news" /> news
&nbsp;<input type="checkbox" name="services" value="blogs" /> blogs
<input type="checkbox" name="services" value="spelling" checked="checked" style="display: none;" />

</td>

<td style="width: 1%;">
&nbsp;
</td>

</tr>

<tr>

<td style="width: 1%;">
</td>

<td colspan="2">
<select name="limit">
<option value="">Limit</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="20" selected="selected">20</option>
<option value="25">25</option>
<option value="30">30</option>
<option value="35">35</option>
<option value="40">40</option>
<option value="45">45</option>
<option value="50">50</option>
</select>

<select name="sites">
<option value="">Sites</option>
<option value="amazon.com" selected="selected">amazon.com</option>
<option value="ebay.com" selected="selected">ebay.com</option>
<option value="">whole internet</option>
</select>

<select name="age" style="display: none;">
<option value="">Age</option>
<option value="7d">7d</option>
<option value="14d">14d</option>
<option value="30d">30d</option>
<option value="60d">60d</option>
<option value="90d">90d</option>
<option value="180d" selected="selected">180d</option>
<option value="365d">365d</option>
<option value="500d">500d</option>
<option value="1000d">1000d</option>
</select>

<select name="orderby" style="display: none;">
<option value="">Order by</option>
<option value="" selected="selected">relevance</option>
<option value="date">date</option>
</select>

<select name="dimensions" style="display: none;">
<option value="">Dimensions</option>
<option value="all" selected="selected">all</option>
<option value="small">small</option>
<option value="medium">medium</option>
<option value="large">large</option>
<option value="wallpaper">wallpaper</option>
<option value="widewallpaper">widewallpaper</option>
</select>
</td>

</tr>

<tr>

<td style="width: 1%;">
</td>

<td colspan="2">
<input type="submit" id="submitbutton" value="Submit" />
</td>

</tr>

</table>

</form>

{/exp:yboss:form}


{embed="technical/embed_yboss_results_complex"}

</div><!-- End of #maincontent -->

</body>

</html>

II. Template containing {exp:yboss:results} tag


{exp:yboss:results
normalize_unicode="yes"
main_template_url="{homepage}/technical/demo/yahoo_boss_search_complex_demo/"
results_template_url="{homepage}/technical/embed_yboss_results_complex/"
process_indicator="process_indicator"
process_indicator_scroll="yes"
}

{yboss_resultset_spelling}

{yboss_resultset_top}
{if yboss_first_result_count > 0}<p>Spelling suggestion{/if}{if yboss_last_result_count > 1}s{/if}{if yboss_first_result_count > 0}:{/if}
{/yboss_resultset_top}

{if yboss_count > 1}, {/if}<strong><a href="{yboss_suggestion_url}">{yboss_suggestion}</a></strong>

{yboss_resultset_bottom}
{if yboss_first_result_count > 0}</p>{/if}
{/yboss_resultset_bottom}

{/yboss_resultset_spelling}

{yboss_resultset_web}

{yboss_resultset_top}
<div class="process_indicator">
<p>Loading web results</p>
</div>
{if yboss_total_results==0}
<p><strong>Web</strong> search for <strong>{yboss_search_term}</strong> returned no results.</p>
{/if}
{if yboss_first_result_count > 0}
<h1>Web search</h1>
<p>Displaying results from  {yboss_first_result_count} to {yboss_last_result_count} of {yboss_total_results} for <strong>{yboss_search_term}</strong></p>
{/if}
{/yboss_resultset_top}

<div class="result_item">
<h2>{yboss_absolute_count}. <a href="{yboss_clickurl}">{yboss_title}</a></h2>
<p class="dispurl">{yboss_dispurl} {yboss_date}</p>
<p class="abstract">{yboss_abstract}</p>
</div>

{yboss_resultset_bottom}
<p style="text-align: center;">{yboss_pagination_links}</p>
{/yboss_resultset_bottom}

{/yboss_resultset_web}


{yboss_resultset_news}

{yboss_resultset_top}
<div class="process_indicator">
<p>Loading news results</p>
</div>
{if yboss_total_results==0}
<p><strong>News</strong> search for <strong>{yboss_search_term}</strong> returned no results.</p>
{/if}
{if yboss_first_result_count > 0}
<h1>News search</h1>
<p>Displaying results from  {yboss_first_result_count} to {yboss_last_result_count} of {yboss_total_results} for <strong>{yboss_search_term}</strong></p>
{/if}
{/yboss_resultset_top}

<div class="result_item">
<h2>{yboss_absolute_count}. <a href="{yboss_url}">{yboss_title}</a></h2>
<p class="dispurl">Source: <a href="{yboss_sourceurl}">{yboss_source}</a> {yboss_date}</p>
<p class="abstract">{yboss_abstract}</p>
</div>

{yboss_resultset_bottom}
<p style="text-align: center;">{yboss_pagination_links}</p>
{/yboss_resultset_bottom}

{/yboss_resultset_news}

{yboss_resultset_blogs}

{yboss_resultset_top}
<div class="process_indicator">
<p>Loading blogs results</p>
</div>
{if yboss_total_results==0}
<p><strong>Blogs</strong> search for <strong>{yboss_search_term}</strong> returned no results.</p>
{/if}
{if yboss_first_result_count > 0}
<h1>Blogs search</h1>
<p>Displaying results from  {yboss_first_result_count} to {yboss_last_result_count} of {yboss_total_results} for <strong>{yboss_search_term}</strong></p>{/if}
{/yboss_resultset_top}

<div class="result_item">
<h2>{yboss_absolute_count}. <a href="{yboss_clickurl}">{yboss_title}</a></h2>
<p class="dispurl">{yboss_dispurl}</p>
<p class="abstract">{yboss_date} {yboss_author} {yboss_abstract}</p>
</div>

{yboss_resultset_bottom}
<p style="text-align: center;">{yboss_pagination_links}</p>
{/yboss_resultset_bottom}

{/yboss_resultset_blogs}


{yboss_resultset_images}

{yboss_resultset_top}
<div class="process_indicator">
<p>Loading images results</p>
</div>
{if yboss_total_results==0}
<p><strong>Blogs</strong> search for <strong>{yboss_search_term}</strong> returned no results.</p>
{/if}
{if yboss_first_result_count > 0}
<h1>Images search</h1>
<p>Displaying results from  {yboss_first_result_count} to {yboss_last_result_count} of {yboss_total_results} for <strong>{yboss_search_term}</strong></p>
{/if}
{/yboss_resultset_top}

<div class="result_item">
<h2>{yboss_absolute_count}. <a href="{yboss_refererclickurl}">{yboss_title}</a></h2>
<p class="img_abstract">{if yboss_thumbnailurl != ""}<a href="{yboss_clickurl}"><img src="{yboss_thumbnailurl}" width="{yboss_thumbnailwidth}" height="{yboss_thumbnailheight}" /></a>{/if} {if yboss_width AND yboss_height}{yboss_width}x{yboss_height}px<br />{yboss_size}{/if}</p>
<p class="img_url">Image: {yboss_url}<br />
Page: {yboss_refererurl}</p>
</div>

{yboss_resultset_bottom}
<p style="text-align: center;">{yboss_pagination_links}</p>
{/yboss_resultset_bottom}

{/yboss_resultset_images}


{/exp:yboss:results}

PREDEFINED SEARCH EXAMPLE

Let’s create search engine which will use Yahoo! BOSS news service to search whole internet for the phrase “commodity prices”;
user does not need to submit anything (such predefined searches could be useful for certain niche websites).

I. Main template


<html>

<head>

<title>Yahoo! BOSS Search predefined search demo</title>

<style type="text/css">

/*Common*/

body {
color: black;
font-family: "arial unicode ms", helvetica, arial, sans-serif;
margin: 0;
font-size: small;
padding: 0;
}

a {
color: #4372aa;
text-decoration: none;
cursor: pointer;
}

a:hover {
text-decoration: underline;
}

/*Main content*/

#maincontent {
width: 48em;
position: relative;
left: 50%;
margin-left: -24em;
padding-bottom: 1em;
}

/* Tables */

table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
}

td {
font-family: "arial unicode ms";
font-size: small;
padding-bottom: 0.5em;
}

/* Headings */

h1 {
font-size: 1.5em;
font-weight: normal;
}

h2 {
font-size: 1.1em;
font-weight: bold;
}


/* Search */

#search_results #word_inputtext, #search_results #title_word_inputtext, #search_results #url_word_inputtext {
width: 100%;
margin: 0 0 0 0;
display: inline;
}

#search_results #submitbutton {
margin: 0 0 0 0;
}

#search_results #help_button {
margin: 0 0 0 0; 
padding-left: 0;
padding-right: 0;
}

.process_indicator {
background-image: url({homepage}{/images/ajax-loader.gif);
background-repeat: no-repeat;
background-position: center;
height: 7em;
width: 100%;
text-align: center;
display: none;
}

#search_results h2 {
text-align: left;
font-size: 1.2em;
margin: 1.1em 0 0 0;
}

#search_results h2 a:hover {
text-decoration: underline;
color: #4372aa;
}

#search_results p.dispurl {
color: #525252;
margin: 0 0 0.4em 0;
}

#search_results p.abstract {
margin: 0 0 0.4em 0;
}

</style>

</head>

<body id="search_results">

<div id="maincontent">

<h1>Yahoo! BOSS Search predefined search demo</h1>

<p>
This search engine will use Yahoo! BOSS news service to search whole internet for the phrase "commodity prices"; user does not need to submit anything (such predefined searches could be useful for certain niche websites).
</p>

{embed="technical/embed_yboss_results_predefined"}

</div><!-- End of #maincontent -->

</body>

</html>

II. Template containing {exp:yboss:results} tag


{exp:yboss:results
normalize_unicode="yes"
main_template_url="{homepage}/technical/demo/yahoo_boss_search_predefined_search_demo/"
results_template_url="{homepage}/technical/embed_yboss_results_predefined/"
process_indicator="process_indicator"
process_indicator_scroll="yes"
predefined_search_services="news"
predefined_search_query="q=commodity%20prices&format=xml&start=0&count=20&age=7d"
}

{yboss_resultset_news}

{yboss_resultset_top}
<div class="process_indicator">
<p>Loading web results</p>
</div>
{if yboss_total_results==0}<strong>News</strong> search for <strong>{yboss_search_term}</strong> returned no results.{/if}
{if yboss_first_result_count > 0}<p>Displaying <strong>news</strong> search results from  {yboss_first_result_count} to {yboss_last_result_count} of {yboss_total_results} for <strong>{yboss_search_term}</strong></p>{/if}

{/yboss_resultset_top}

<div class="result_item">
<h2>{yboss_absolute_count}. <a href="{yboss_url}">{yboss_title}</a></h2>
<p class="dispurl">Source: <a href="{yboss_sourceurl}">{yboss_source}</a> {yboss_date}</p>
<p class="abstract">{yboss_abstract}</p>
</div>

{yboss_resultset_bottom}
<p style="text-align: center;">{yboss_pagination_links}</p>
{/yboss_resultset_bottom}

{/yboss_resultset_news}

{/exp:yboss:results}

Yahoo! BOSS Search Links

Hooks Used

If the add-on is an extension, and ties into ExpressionEngine's core files, it will use ExpressionEngine hooks. We are listing any hooks the add-on uses for developers to have an easier time locating other add-ons that they can reference for their own work.

  1. show_full_control_panel_end

This entry was created May 15, 2009, 3:22 pm.
This entry was last updated November 20, 2011, 9:20 pm.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through devot-ee.com. If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at https://devot-ee.com/returns to initiate your return. If you have questions, email support@devot-ee.com.

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!