|
This component allows you to add Google Adsense Search to your Joomla site.
The search results are displayed right inside your Joomla page!
No more popup page. No more diversion to other pages.
Available for both Joomla 1.0.x and native 1.5.x!
Add more power with googleSearch module
You might also want to complement this component with the googleSearch module:
http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,4935/Itemid,35/
The module allows you to add an additional Google search box as a module. This means that you can place the search form in any module position you like. When the user clicks the search button, the search result will be displayed in your Joomla main body by the googleSearch component.
Latest Version
v1.0.10 (for Joomla 1.0) and v1.5.10 (for Joomla 1.5)
Released June 30, 2008
Bug Fix. If you set the option "Display search form in component" to No, sometimes the search form will not display in the googleSearch module too. The bug has been fixed. Thanks to Scott for reporting the bug.
How to install
Set up is as easy as 1-2-3:
- Install the component
- Enter your Google Adsense ID
- Enter your desired width of the search result
That's all you need to get started! You'll now have Google Search right inside your Joomla page!
For advanced settings, please refer to Customizing the Component.
Download
Note: To upgrade to the newer version, simply uninstall the old version and install the new version of the plugin.
Version History
- Version 1.00: released May 12, 2008.
- Version 1.01: released May 15, 2008.
- Some users have encountered the following error: "404 - An error has occurred: Component Not Found", or the configuration page did not appear. Fixed.
- Version 1.02: released May 16, 2008.
- Added
ItemID in the search form so that the respective modules will be displayed correctly with the googleSearch component.
- Added Search Button Label - Allows you to set your own label for the search button.
- Version 1.03: released May 19, 2008.
- Added Google SafeSearch - filtering of adult sites contents
- Added support for googleSearch module
- Added auto-lookup of
Itemid in the googleSearch module (so that the various modules are displayed correctly in your googleSearch main page)
- Version 1.04: released May 20, 2008.
- For some reasons, the search result returned by Google always contains quite a big gap of empty spaces at the bottom of the search result. Have managed to resolve this.
- Version 1.07: released May 23, 2008.
- Allow you to freely position and show/hide the Google logo, radio buttons and search button
- Add Google search watermark or your own-defined watermark in the search field for a more professional look
- Use your own image as Search button
- Full support of css for all search components
- Version 1.08: released May 24, 2008.
- Adds independent css style for the googleSearch component and module.
- Version 1.09: released Jun 10, 2008.
- The codes for googleSearch module and components is now valid XHTML! Thanks to Husein and Dalibor who both informed me that there are some invalid XHTML codes in v1.08/1.58.
- Version 1.0.10: released Jun 30, 2008.
- Bug Fix. If you set the option "Display search form in component" to No, sometimes the search form will not display in the googleSearch module too. The bug has been fixed. Thanks to Scott for reporting the bug.
Customizing the Component
Log on as Administrator, from the Component Menu, select "googleSearch - configure", you will see the following config page.
Only the first two are required. The rest are optional settings that allow you to finetune the component to suit your needs.

- Google Adsense ID: This is your 16-digit google adsense ID. Do not enter any alphabets that precede the number.
- Width of Search Result:: This is the width (in pixels) of the search result returned by Google. Match this with the width of your Joomla page.
- Size of Search Field:: This is the size of the search field. Default size is 48.
- Search Button Label:: Label for the search button. Default size is the English word "Search".
- Channel: If you want to track this with a channel that you've set up in your Adsense account, enter the 10-digit channel number here.
- Search Domain:: Specify the search domain. If you leave this blank, it will use the domain of your Joomla site by default.
- Search Domain Label:: Specify the radio button label that will be displayed in the search form for the search domain. If you leave this blank, it will use the domain of your Joomla site by default.
- Search Domain as Default: There are two radio buttons in the search form: The first one to search the entire web. The second one to search your domain. If you want the radio button for your domain to be selected, choose "Yes" from the pulldown menu. If you want the radio button for the entire web to be selected, choose "No" from the pulldown menu.
- Site Language: Select your site language here.
- Site Encoding: Select your site encoding here. If you're not sure, just choose the first one: West European Latin-1 (ISO-8859-1).
- Country:: Select your country. This will determine which Google domain will be used for the search results.
- Enable Google SafeSearch:: Select yes if you want to enable Google SafeSearch to filter adult-site contents. Default is no.
- Display Last Search Value:: Display the last search value entered by the user. Default is yes.
- Title color: Set the color of the title for the Google search result.
- Background color: Set the color of the background for the Google search result.
- Text color: Set the color of the text for the Google search result.
- URL color: Set the color of the url for the Google search result.
The next 5 config options allow you to set the position of the various HTML elements around the search box. Note that the positions are all relative to the search box.

- Google Logo Position: The position of the Google logo relative to the search box.
- Select Web/Domain Position: The position of the radio buttons (for selecting search web or domain) relative to the search box.
- Search Button Position: The position of the Search Button relative to the search box. If you do not want any Search Button, select 'none'.
- Google Logo Image: Select the type of Google logo you want. If you have a dark background, you might want to use the third one.
- Search Button Image: If you want to use an image as Submit button instead of the standard Submit button, enter the full URL of the location of your image. If you want to revert back to the default Submit Button, just empty this field.
The next 6 config options allow you to customize the watermark text that appears when the use has not enter anything yet in the search box.

- Watermark Type: Google provides a pretty cool watermark (it's image based, so you cannot change the text). If you want to set your own string, select "text".
- Text Color on blur: The watermark text color.
- Text Color on focus: The color of the search string when the user starts typing in the search box.
- Background Color on blur: The watermark background color.
- Background Color on focus: The background color of the search string when the user starts typing in the search box.
- Watermark Text: Your desired watermark text. Make sure you have selected "text" for "Watermark Type".
The following config options are for customizing the googleSearch module. It's exactly identical to its component counterpart, so please refer to the explanations above.

Styling the Component and Module using CSS
You can now set the style of every item within the googleSearch component/module to the exact format you want through CSS. For example, you can set the font family, font size, foreground and background color of the search field, radio label, search button, etc.
I've designed such that the css style for the component is independent of that of the module. So you can have different styles for the component and the module.
For example, if you're using the default Joomla 1.5 template, define the following style in <joomla root folder>/templates/rhuk_milkyway/css/template.css. If you're using the default Joomla 1.0 template, define the following style in <joomla root folder>/templates/rhuk_solarflare_ii/css/template_css.css.
- Search Box
| Component |
Module |
div.googleSearch input.inputbox {
font-family: Verdana;
font-size: 12pt;
font-style: italic;
}
|
div.mod_googleSearch input.inputbox {
font-family: Verdana;
font-size: 12pt;
font-style: italic;
}
|
- Search Button
| Component |
Module |
div.googleSearch input.button {
font-family: "Arial Bold";
font-size: 12pt;
margin-left: 4px;
}
|
div.mod_googleSearch input.button {
font-family: "Arial Bold";
font-size: 12pt;
margin-top: 6px;
}
|
- Search Button Image (if you're using your self-defined image as search button)
| Component |
Module |
div.googleSearch input.button_img {
margin-left: 4px;
}
|
div.mod_googleSearch input.button_img {
margin-left: 4px;
}
|
- Google Logo
| Component |
Module |
div.googleSearch .google_logo {
margin-right: 6px;
}
|
div.mod_googleSearch .google_logo {
margin-right: 6px;
}
|
- Radio Label (the radio buttons to select between search for web or domain)
| Component |
Module |
div.googleSearch .radiolabel {
font-family: Verdana;
font-style: italic;
}
|
div.mod_googleSearch .radiolabel {
font-family: Verdana;
font-style: italic;
}
|
- Radio Buttons (note: this only works on some of the browsers such as IE.)
| Component |
Module |
div.googleSearch input.radio {
background-color: #0000ff;
}
|
div.mod_googleSearch input.radio {
background-color: #0000ff;
}
|
- Radio Group (use this if you want to set the background or draw a border around the entire radio buttons group)
| Component |
Module |
div.googleSearch .radiogrp {
border: 1px solid #ddd;
}
|
div.mod_googleSearch .radiogrp {
border: 1px solid #ddd;
}
|
- The entire search form (use this if you want to set the background or draw a border around the entire search form)
| Component |
Module |
div.googleSearch {
background: #33FF66;
}
|
div.mod_googleSearch {
background: #33FF66;
}
|
- The table within the search form (use this if you want to right align the search form)
| Component |
Module |
div.googleSearch table {
margin-left: auto;
margin-right: 6px;
}
|
div.mod_googleSearch table {
margin-left: auto;
margin-right: 6px;
}
|
- Search Box (method #2)
| Component |
Module |
div.googleSearch input{
font-family: Verdana;
font-size: 12pt;
font-style: italic;
}
|
div.mod_googleSearch input {
font-family: Verdana;
font-size: 12pt;
font-style: italic;
}
|
Replacing the Default Search module of Joomla 1.5
Suppose you want to replace the default search module of Joomla 1.5 using the default rhuk_milkyway template, here are the steps:
- Log on as administrator and go to Module Manager.
- In the input box "Filter:", enter "search".
- You should now see two items: Search (the default mod_search), and Google Search.
- Make sure Enabled is set to No for mod_search, and Yes for Google Search.
- Assuming that you're using the default Joomla 1.5 template, define the following style in
<joomla root folder>/templates/rhuk_milkyway/css/template.css
div.mod_googleSearch table {
margin-left: auto;
margin-right: 6px;
}
div.mod_googleSearch input {
width: 145px;
margin: 15px 0 9px 0;
}
You should now see the googleSearch module instead of the default mod_search in module position user4.
User reviews Average user ratings: 4.0 (from 19 users) Note: You have to be a registered member to leave a comment. Free registration here. |
May 16, 2008 4:38pm
May 18, 2008 8:00pm
after set all the configuration needs by this component i still cant display my google adsense for search in my joomla page... please help...
May 18, 2008 8:52pm
Hi Pahlevy,
Would you want to give a bit more details so that I can try to help?
1) Which version are you using? ver 1.5, 1.51 or 1.52? (or just give me the name of the zip file that you have downloaded).
2) Did you manage to see the config page?
3) If (2) is ok, did you see the search form?
4) If (3) is ok, when you click the search button, what did you see?
Regards,
/kksou
May 18, 2008 9:29pm
hi Kksou
what a quick response.. and sorry, my bad that i didnt give u complete status of my problems...
1) im using joomla 1.0.13 (i install this version com_googleSearch_v1.03.zip)
2) yes
3) nope, i didnt see any search form in my configuration page or in my joomla page (except the default joomla search on the top right position)
4) still stuck on number 3... :)
thanks for your help
Regards,
Pahlevy
May 18, 2008 10:05pm
Hi Pahlevy,
Since you stopped at (3), I believe what happened is that you forgot to create a menu item for the component.
Do this test for me first: Try
http://www.joomladomain.com/index.php?option=com_googlesearch
Did you now see a search form? (Don't forget to change www.joomladomain.com to your domain)
If you see the search form now, it means the googleSearch component is running ok. You can now proceed to add a link to this component in the main menu.
If you're not too sure how to do this, I found a useful link here:
http://help.joomla.org/content/view/323/68/
Regards,
/kksou
May 18, 2008 11:12pm
omg, how stupid i am... :( sorry for that...
thanks a lot mate, you save me a lot of searching time... lol
anyway, i have some question regarding to joomla and your component, can i put this on module somewhere instead of menu..? ive been thinking to put that search on the default joomla search position... another newbie question... :)
or if not at least can you show me hot to remove the boxes when i choose to unpublish some module...?
thanks a again for your kind help... :)
regards,
pahlevy
May 19, 2008 7:13pm
Hi Pahlevy,
To have the google search box in a module and have the result displayed in the googleSearch component, use the googleSearch module which I've just released: http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,4935/Itemid,35/
Once you have installed the googleSearch module, you can unpublish the original search module, and publish googleSearch module in that module position.
Regards,
/kksou
May 20, 2008 8:28pm
hello again kksou,
you really made my life with google search easier...
thanks a lot
regards,
pahlevy
May 21, 2008 10:15pm
first of all, thanks to this great component. if only i can get it to work :(
i installed the latest version (as of may 21st) of the component and module. when i search using the module, it takes me to the component page with no result. when i search from the component, it gives me an error (see below message).
===
404: Not Found
Sorry, but the content you requested could not be found
===
pls. help!
May 21, 2008 11:05pm
Hi Brian,
Need a bit more details to know what's going on:
1) After you installed the component, did you manage to see the config page?
2) Are you able to see the search form in the component?
3) Are you able to see the search form in the module?
Based on the error message, I have a feel that you did not install the googlesearch right. Hence it says it could not find the component.
Let me know if your Step 2 above is ok.
Regards,
/kksou
p.s. I went to your website. I did not see any google search form there...
May 22, 2008 1:22pm
hi kksou,
1. yes, i was able to see the config page. i even customize the text color.
2. yes
3. yes
i uninstalled the reinstalled the component but it didn't help. i still get the same error.
May 22, 2008 4:31pm
Hi Brian,
1) Would you mind try this on a fresh install of joomla and see if you're getting the same error?
2) Since you have a pretty established website, is it possible that you set up a subdomain as test site and install the component/module? I need to be to see the actual error message and view the source (from the browser) in order to know what's being passed in the search form.
3) The other possible reason might be that you're using opensef or sh404SEF. If you are, check the redirection database. I believe you have installed earlier versions of the component, which do not contain the Itemid (in which case opensef/sh404SEF will try to guess some Itemid) The later versions of googleSearch component properly adds the Itemid info. This will mean that there will be multiple entries of the same component in your redirection database. You get the "content you requested could not be found" error because opensef/sh404SEF selects the older url instead of the newer one. You need to delete all the older redirection entries. If you're confused, let me know whether you're using opensef or sh404SEF first, and we're see what we can do.
Regards,
/kksou
May 22, 2008 4:57pm
hi kksou,
yes, i'm using sh404sef. so what do i need to do? i'm not an advance joomla user and not a programmer so i don't really know how to tweak these things.
thanks for the help!
May 22, 2008 7:08pm
Hi Brian,
1. Log on as administrator.
2. First go to Menu - mainmenu. Look for your googleSearch component and take note of the CID (the number on the last column). This is the Itemid of the menu.
3. Now go to Component - sh404SEF. Click on View/Edit SEF Urls.
4. Suppose you have named the com_googleSearch component "Google Search", in the field "Filter" (top right corner), enter "google".
5. You should now see a list of SEO-friendly urls (i.e. the translated ones) containing the name google.
6. In the column "real url", you should see more than one entries of urls with index.php?option=com_googlesearch, but some with different Itemid's. This is the cause of the problem.
7. Look for the one with the correct Itemid (the number you've looked up in step 2 above), and delete away all the other entries. There should only be one left with the correct Itemid.
8. If possible, do a restart of your server.
Try the above and let me know if it works.
Regards,
/kksou
May 23, 2008 10:10am
2. went to main menu and saw the new entry i entered that should be link to google_search. it usually says Component - component name. mine shows up as Component-. is this a problem too? it takes me to the component anyway when i click on it.
4. i named it Search. i filtered it but didn't see any com_googlesearch on the links.
6. in the column "real url", they're all blank.
7. didn't find any cid number that matches.
8. my site is hosted by godaddy so i won't be able to restart it.
what should i do next?
May 25, 2008 11:56pm
Hi Brian,
For Step 3, make sure you clicked "View/Edit SEF Urls" and not "View/Edit Custom Redirects".
For your reply to Step 6, what's on the left (the column "SEF Url")?
If you have named the component Search, I suppose it should be Search.html or Search/
Now delete all the blank entries you see there (for the column Real URL). These are what's causing the problem, because it points to nowhere.
Go back to your home page. Click reload so that a new entry will be generated for your googleSearch component.
Repeat Step 3 again till you see an entry with Real URL containing index.php?option=com_googlesearch
If it is still not there, then manually add an entry there with the correct Itemid.
If it still doesn't work, please give me a bit more details along the way so that I can try to guess what's going wrong.
Regards,
/kksou
May 29, 2008 8:35am
The search componenet returns no results, just a blank page with the search box at the top. Using Joomla 1.0.15 & the latest version of this component. I also tried fiddling with sh404sef setting and the component doesn't even show up. When I search I get a link in the browser like this...
May 29, 2008 8:46am
Murphy's Law - as soon as you post looking for a solution - you end up fixing it yourself.
I had configure the setting in sh404sef to skip this component & now it works perfectly.
July 11, 2008 4:09pm
I have tried nearly every Google-based search extension available for Joomla. NONE of them worked - some not at all, some needed tweaking that I'm not skilled enough to do. FINALLY, I found one that works - THANK YOU for the good work.
I had the same issue as TB above - initially it didn't work, but when I told sh404sef to skip this component, it works just fine.