3 steps for Google Custom Search in a Joomla site
Moderator: General Support Moderators
Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
- kontaxis
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Nov 28, 2007 10:07 am
- Location: Athens
- Contact:
3 steps for Google Custom Search in a Joomla site
Greetings from Greece to all Joomla users!
Just tested an easy way to add a Google Custom Search on a Joomla site: http://www.hybridcars.gr
Only a Static Content Item is requared, for displaying the searched results,
and 3 simple steps, for getting the most powerful search-code in your site!
1) Create a Static Content Item, named for example "Search Results"
- Publish it, in order to see the URL created (write it down) and then unpublish it
2) Copy the URL of the Static Cotent Item at Google Custom Search Engine* |Code|, for where the results are to be displayed.
3) Copy - paste the given code: "Google Box Code" at the place you want the Search Box to appear.
- copy - paste the given code: "Google Result Code" in the Static Content Item you created at 1st step.
This is what I tryed in http://www.hybridcars.gr and worked! (use the search Box at the top-right corner)
Can somebody else try it too, for getting more feedback and suggestions on this subject ?
*to create a Google Custom Search Engine visit: http://www.google.com/coop/cse
Just tested an easy way to add a Google Custom Search on a Joomla site: http://www.hybridcars.gr
Only a Static Content Item is requared, for displaying the searched results,
and 3 simple steps, for getting the most powerful search-code in your site!
1) Create a Static Content Item, named for example "Search Results"
- Publish it, in order to see the URL created (write it down) and then unpublish it
2) Copy the URL of the Static Cotent Item at Google Custom Search Engine* |Code|, for where the results are to be displayed.
3) Copy - paste the given code: "Google Box Code" at the place you want the Search Box to appear.
- copy - paste the given code: "Google Result Code" in the Static Content Item you created at 1st step.
This is what I tryed in http://www.hybridcars.gr and worked! (use the search Box at the top-right corner)
Can somebody else try it too, for getting more feedback and suggestions on this subject ?
*to create a Google Custom Search Engine visit: http://www.google.com/coop/cse
-
- Joomla! Apprentice
- Posts: 16
- Joined: Sun Jan 22, 2006 9:49 pm
Re: 3 steps for Google Custom Search in a Joomla site
Thanks for the posting. I like your site.
I tried to follow the instructions. The google code does not output on the front page, it doesn't even show the search box. I switched off html editor.
Which pages did you place the google code in, how did you paste the code, did you unpublish the static code once at step 3?
Thank you.
I tried to follow the instructions. The google code does not output on the front page, it doesn't even show the search box. I switched off html editor.
Which pages did you place the google code in, how did you paste the code, did you unpublish the static code once at step 3?
Thank you.
- changlee
- Joomla! Explorer
- Posts: 470
- Joined: Tue Nov 20, 2007 11:05 am
- Location: Greece
- Contact:
Re: 3 steps for Google Custom Search in a Joomla site
You just have to create a new static content with Google page results pasted inside.
If you do not programm your life, someone else will do it for you.
SMTP Newsletter APP: https://www.emailbat.com
SMTP Newsletter APP: https://www.emailbat.com
- kontaxis
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Nov 28, 2007 10:07 am
- Location: Athens
- Contact:
Re: 3 steps for Google Custom Search in a Joomla site
Hi, computersaidno. Congratulations for your site!
You want to create a "google search box search" at the frondpage of your site,
searching for contents only in http://www.greenmaven.com , to specific sites or to the entire web?
You must Publish the static content you created, in order the results to be visible.
Let me know if you need any help, I created a Custom google search for your site and worked perfectly.
If you like I can send you the code, but it is better to create it with your account in order to track statistics information.
you can even connect the search results with a adSense account, if you have.
try searching the words "hybrid cars" at my search box at http://www.hybridcars.gr and you see Ads appearing at the left side
You want to create a "google search box search" at the frondpage of your site,
searching for contents only in http://www.greenmaven.com , to specific sites or to the entire web?
You must Publish the static content you created, in order the results to be visible.
Let me know if you need any help, I created a Custom google search for your site and worked perfectly.
If you like I can send you the code, but it is better to create it with your account in order to track statistics information.
you can even connect the search results with a adSense account, if you have.
try searching the words "hybrid cars" at my search box at http://www.hybridcars.gr and you see Ads appearing at the left side
-
- Joomla! Apprentice
- Posts: 24
- Joined: Thu Dec 15, 2005 6:56 pm
Re: 3 steps for Google Custom Search in a Joomla site
It seems it only works if you are using some SEF-engine....
- kontaxis
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Nov 28, 2007 10:07 am
- Location: Athens
- Contact:
Re: 3 steps for Google Custom Search in a Joomla site
Also, a google gadget can be designed and publised at google directory for public use !
take a look here: http://gmodules.com/ig/directory?hl=en& ... utput=html
take a look here: http://gmodules.com/ig/directory?hl=en& ... utput=html
-
- Joomla! Apprentice
- Posts: 40
- Joined: Tue Jan 30, 2007 9:09 pm
Re: 3 steps for Google Custom Search in a Joomla site
Hello,
I am trying to make this work on my site
http://www.chrisanderika.com/testing
but everytime I try to implement the search, instead of pointing to the specified page
http://chrisanderika.com/testing/index. ... &Itemid=38
it just bounces back to my front page.
Any ideas/help?
I am trying to make this work on my site
http://www.chrisanderika.com/testing
but everytime I try to implement the search, instead of pointing to the specified page
http://chrisanderika.com/testing/index. ... &Itemid=38
it just bounces back to my front page.
Any ideas/help?
- kontaxis
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Nov 28, 2007 10:07 am
- Location: Athens
- Contact:
Re: 3 steps for Google Custom Search in a Joomla site
At the control panel of your google custom search, it gives you 2 codes to copy-paste at your site.erikas_boy wrote:Hello,
I am trying to make this work on my site
http://www.chrisanderika.com/testing
but everytime I try to implement the search, instead of pointing to the specified page
http://chrisanderika.com/testing/index. ... &Itemid=38
it just bounces back to my front page.
Any ideas/help?
- Initially you must specify the RESULT PAGE : http://chrisanderika.com/testing/index. ... &Itemid=38
-then the 1st code must be pasted at the place you want to have the search box appearing,
the 2nd code must be pasted at the page you want the results: http://chrisanderika.com/testing/index. ... &Itemid=38
-
- Joomla! Apprentice
- Posts: 40
- Joined: Tue Jan 30, 2007 9:09 pm
Re: 3 steps for Google Custom Search in a Joomla site
Already done. Still bounces to the front page. I can't figure out why. I even tried deleting it all and trying over, but still nothing. Also (while we're on the topic) is there any way to make this work with pages that are for registered viewers only? It doesn't seem so.....
edit: Thanks, by the way for the fast reply. recently I've been finding replies few and far between around here......
edit: Thanks, by the way for the fast reply. recently I've been finding replies few and far between around here......
-
- Joomla! Apprentice
- Posts: 5
- Joined: Thu Feb 07, 2008 8:18 pm
Re: 3 steps for Google Custom Search in a Joomla site
I'm having the same issue with the search bouncing back to the frontpage. Has anyone come up with a solution to this?
-
- Joomla! Apprentice
- Posts: 5
- Joined: Thu Feb 07, 2008 8:18 pm
Re: 3 steps for Google Custom Search in a Joomla site
OK, found it here: http://www.mkbergman.com/?p=311 and here: http://groups.google.com/group/google-c ... 9e771344cd
basically I added hidden input values to manually match the dirty URL in Joomla, which is everything that comes after the ?--> (ex: http://www.xxx.xxx?option=com_content&v ... Itemid=132)
Like so...
<!-- Google CSE Search Box Begins -->
<form action="http://xxx" id="searchbox_xxx:xxx">
<input type="hidden" name="option" value="com_content">
<input type="hidden" name="view" value="article">
<input type="hidden" name="id" value="61">
<input type="hidden" name="Itemid" value="132">
this works!!!
basically I added hidden input values to manually match the dirty URL in Joomla, which is everything that comes after the ?--> (ex: http://www.xxx.xxx?option=com_content&v ... Itemid=132)
Like so...
<!-- Google CSE Search Box Begins -->
<form action="http://xxx" id="searchbox_xxx:xxx">
<input type="hidden" name="option" value="com_content">
<input type="hidden" name="view" value="article">
<input type="hidden" name="id" value="61">
<input type="hidden" name="Itemid" value="132">
this works!!!
- kontaxis
- Joomla! Apprentice
- Posts: 5
- Joined: Wed Nov 28, 2007 10:07 am
- Location: Athens
- Contact:
Re: 3 steps for Google Custom Search in a Joomla site
Great work "pstitalia" !
-
- Joomla! Apprentice
- Posts: 40
- Joined: Tue Jan 30, 2007 9:09 pm
Re: 3 steps for Google Custom Search in a Joomla site
Brilliant, thanks a million. That worked perfect.
- erickaps
- Joomla! Enthusiast
- Posts: 106
- Joined: Thu Aug 17, 2006 9:27 am
- Location: United Kingdom
- Contact:
Re: 3 steps for Google Custom Search in a Joomla site
Nice work "pstitalia".
Got this working very nicely here http://www.ingenious-resourcing.com/ind ... iew/37/43/ using two different customer searches and a standard internal site search.
Got this working very nicely here http://www.ingenious-resourcing.com/ind ... iew/37/43/ using two different customer searches and a standard internal site search.
-
- Joomla! Guru
- Posts: 643
- Joined: Mon Nov 07, 2005 3:45 am
- Contact:
Re: 3 steps for Google Custom Search in a Joomla site
I'd like to expand a little on this, cause it drove me nuts for about 2 hours:
This method works, but watch out for your actual link, this is mine:
domain.com/index.php?option=com_content&task=view&id=42&Itemid=49
you are concerned with just the stuff after the "?" - broken down, it's this:
option=com_content
task=view
id=42
Itemid=49
So, my code went from this:
To this:
<input type="hidden" name="cx" value="XXXXXXXXXXX" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="option" value="com_content" />
<input type="hidden" name="task" value="view" />
<input type="hidden" name="id" value="42" />
<input type="hidden" name="Itemid" value="49" />
<input type="text" name="q" size="20" />
<input type="submit" name="sa" value="Search" />
As you can see for each abc=xyz statement in the link, you need the same input values in your code as well. The bold is custom stuff you need to figure out and the red letters are things you definitely need to change according to your content id #s.
This method works, but watch out for your actual link, this is mine:
domain.com/index.php?option=com_content&task=view&id=42&Itemid=49
you are concerned with just the stuff after the "?" - broken down, it's this:
option=com_content
task=view
id=42
Itemid=49
So, my code went from this:
Code: Select all
<input type="hidden" name="cx" value="XXXXXXXXXXX" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="text" name="q" size="20" />
<input type="submit" name="sa" value="Search" />
<input type="hidden" name="cx" value="XXXXXXXXXXX" />
<input type="hidden" name="cof" value="FORID:10" />
<input type="hidden" name="option" value="com_content" />
<input type="hidden" name="task" value="view" />
<input type="hidden" name="id" value="42" />
<input type="hidden" name="Itemid" value="49" />
<input type="text" name="q" size="20" />
<input type="submit" name="sa" value="Search" />
As you can see for each abc=xyz statement in the link, you need the same input values in your code as well. The bold is custom stuff you need to figure out and the red letters are things you definitely need to change according to your content id #s.
-
- Joomla! Apprentice
- Posts: 20
- Joined: Sun Mar 30, 2008 10:34 am
Re: 3 steps for Google Custom Search in a Joomla site
Hi,
I've just released a googleSearch component that allows you to easily add a Google Search to your Joomla site:
http://extensions.joomla.org/component/ ... Itemid,35/
Set up is as easy as 1-2-3:
1. Install the component
2. Enter your Google Adsense ID
3. Enter your desired width of the search result
That's all you need to get started!
Of course there are other advanced settings that allow you to customize the Google Search to suit your needs.
I've just released a googleSearch component that allows you to easily add a Google Search to your Joomla site:
http://extensions.joomla.org/component/ ... Itemid,35/
Set up is as easy as 1-2-3:
1. Install the component
2. Enter your Google Adsense ID
3. Enter your desired width of the search result
That's all you need to get started!
Of course there are other advanced settings that allow you to customize the Google Search to suit your needs.
-
- Joomla! Apprentice
- Posts: 7
- Joined: Mon Apr 28, 2008 8:24 pm
Re: 3 steps for Google Custom Search in a Joomla site
I'm interested in buying the Joomla template that is being used at:
http://www.greenmaven.com
Regards,
[email protected]
http://www.dominicana.com
http://www.greenmaven.com
Regards,
[email protected]
http://www.dominicana.com
-
- Joomla! Apprentice
- Posts: 28
- Joined: Sun Mar 18, 2007 3:31 pm
Re: 3 steps for Google Custom Search in a Joomla site
im trying to geth this working to i goth the search button upp and the results page buth its emty no results on it. what is wrong. loke here www.kollon.se
-
- Joomla! Apprentice
- Posts: 7
- Joined: Sat Jun 14, 2008 9:01 am
Re: 3 steps for Google Custom Search in a Joomla site
I get a blank search result. My url doesn't have the ItemId.
http://www.site.com/index.php?option=co ... icle&id=51
To create static item, I just follow this instruction http://nyjoomla.wordpress.com/2008/02/2 ... tent-item/ which basically suggest one to create a new Article and select Uncategorized. I am using Joonla 1.5.3.
Any suggestion how to make this work?
http://www.site.com/index.php?option=co ... icle&id=51
To create static item, I just follow this instruction http://nyjoomla.wordpress.com/2008/02/2 ... tent-item/ which basically suggest one to create a new Article and select Uncategorized. I am using Joonla 1.5.3.
Any suggestion how to make this work?
-
- Joomla! Intern
- Posts: 59
- Joined: Tue Sep 25, 2007 2:44 pm
Re: 3 steps for Google Custom Search in a Joomla site
Same here....
Joomla 1.5.8, getting a blank page.
Dont quite understand by how to put the google search result code in the static page . . . has it to be written on the page like any text or in the HTML of the page ?
In both cases, i also get a blank page.
Since my page does not have these 4 values -
<input type="hidden" name="option" value="com_content" />
<input type="hidden" name="task" value="view" />
<input type="hidden" name="id" value="42" />
<input type="hidden" name="Itemid" value="49" />
My URL is this -
index.php?option=com_content&view=article&id=308
So I did this -
<input type="hidden" name="cx" value="partner-xxxxxxxxxxxxxxxxxxxxx" />
<input type="hidden" name="cof" value="FORID:11" />
<input type="hidden" name="option" value="com_content" />
<input type="hidden" name="view" value="article" />
<input type="hidden" name="id" value="308" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="20" />
<input type="submit" name="sa" value="Search" />
Can anyone please suggest ?
Thanks,
AA.
Joomla 1.5.8, getting a blank page.
Dont quite understand by how to put the google search result code in the static page . . . has it to be written on the page like any text or in the HTML of the page ?
In both cases, i also get a blank page.
Since my page does not have these 4 values -
<input type="hidden" name="option" value="com_content" />
<input type="hidden" name="task" value="view" />
<input type="hidden" name="id" value="42" />
<input type="hidden" name="Itemid" value="49" />
My URL is this -
index.php?option=com_content&view=article&id=308
So I did this -
<input type="hidden" name="cx" value="partner-xxxxxxxxxxxxxxxxxxxxx" />
<input type="hidden" name="cof" value="FORID:11" />
<input type="hidden" name="option" value="com_content" />
<input type="hidden" name="view" value="article" />
<input type="hidden" name="id" value="308" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="20" />
<input type="submit" name="sa" value="Search" />
Can anyone please suggest ?
Thanks,
AA.
- Mikunda
- Joomla! Fledgling
- Posts: 3
- Joined: Thu Sep 03, 2009 3:04 pm
SOLUTION J2.5: Steps for Google Custom Search in a Joomla si
Hi there,
Wanted to share how I did it for a Joomla 2.5 Site. Looks like a lot of steps because it is super detailed, in fact it is quite simple - takes 3 minutes to implement:
1. Purchase your Custom Search license.
2. Once activated, go to your Search Console, select Control Panel, which is next to your Custom Search Name
3. Click the Control Panel
4. Once you are in, from the column on the left, find "Get Code"
5. You will be given 2 codes - one for your Search module, which you set up this way:
- Go to modules, create a custom HTML Module, publish in your Search position, paste the code above that was provided by Google for your search "box". (don't forget to "toggle editor" and paste in HTML view.)
- Optional: You might need to uncomment the <input type="submit" name="sa" value="Search" /> to hide the Search button and only keep the input form; you can also modify the search box width by editing this number here<input type="text" name="q" size="31" />.
- Disable your Joomla Search Module
6. To use the second code:
- Create an Article in your "Uncategorized" article category. Name it "XYZCompany Search Results"
- Paste the Google code provided for this page in the article (don't forget to "toggle editor" and paste in HTML view.)
- Save.
- Go to Hidden menu
- Create new menu item " Search results" and link to your newly created search article.
7. Optional:
- Copy-paste the code from the module, place above the code in the article. This way you will have a nice search results page with a nice search form on top of it. I would add 1-2 <br/> to create a break between the two.
8. Test - should be working fine.
Wanted to share how I did it for a Joomla 2.5 Site. Looks like a lot of steps because it is super detailed, in fact it is quite simple - takes 3 minutes to implement:
1. Purchase your Custom Search license.
2. Once activated, go to your Search Console, select Control Panel, which is next to your Custom Search Name
3. Click the Control Panel
4. Once you are in, from the column on the left, find "Get Code"
5. You will be given 2 codes - one for your Search module, which you set up this way:
- Go to modules, create a custom HTML Module, publish in your Search position, paste the code above that was provided by Google for your search "box". (don't forget to "toggle editor" and paste in HTML view.)
- Optional: You might need to uncomment the <input type="submit" name="sa" value="Search" /> to hide the Search button and only keep the input form; you can also modify the search box width by editing this number here<input type="text" name="q" size="31" />.
- Disable your Joomla Search Module
6. To use the second code:
- Create an Article in your "Uncategorized" article category. Name it "XYZCompany Search Results"
- Paste the Google code provided for this page in the article (don't forget to "toggle editor" and paste in HTML view.)
- Save.
- Go to Hidden menu
- Create new menu item " Search results" and link to your newly created search article.
7. Optional:
- Copy-paste the code from the module, place above the code in the article. This way you will have a nice search results page with a nice search form on top of it. I would add 1-2 <br/> to create a break between the two.
8. Test - should be working fine.
-
- Joomla! Enthusiast
- Posts: 126
- Joined: Wed Mar 17, 2010 7:46 am
Re: 3 steps for Google Custom Search in a Joomla site
Hello Mikunda, can you give me some details?
the code i copy has 2 lines of comments where one says to past this before </head>, we dont put it before </head> ?Mikunda wrote:Hi there,
Wanted to share how I did it for a Joomla 2.5 Site. Looks like a lot of steps because it is super detailed, in fact it is quite simple - takes 3 minutes to implement:
1. Purchase your Custom Search license.
2. Once activated, go to your Search Console, select Control Panel, which is next to your Custom Search Name
3. Click the Control Panel
4. Once you are in, from the column on the left, find "Get Code"
5. You will be given 2 codes - one for your Search module, which you set up this way:
- Go to modules, create a custom HTML Module, publish in your Search position, paste the code above that was provided by Google for your search "box". (don't forget to "toggle editor" and paste in HTML view.)
What kind of menu is that? a link to the article? If so how do you connect the module with that article results?- Optional: You might need to uncomment the <input type="submit" name="sa" value="Search" /> to hide the Search button and only keep the input form; you can also modify the search box width by editing this number here<input type="text" name="q" size="31" />.
- Disable your Joomla Search Module
6. To use the second code:
- Create an Article in your "Uncategorized" article category. Name it "XYZCompany Search Results"
- Paste the Google code provided for this page in the article (don't forget to "toggle editor" and paste in HTML view.)
- Save.
- Go to Hidden menu
- Create new menu item " Search results" and link to your newly created search article.
7. Optional:
- Copy-paste the code from the module, place above the code in the article. This way you will have a nice search results page with a nice search form on top of it. I would add 1-2 <br/> to create a break between the two.
8. Test - should be working fine.
Buy Medical Supplies, Medical Equipment and Home Health Care products: http://www.medi-shop.gr/en