Jump to content


- - - - -

Google Site Search


  • Please log in to reply
24 replies to this topic

#1 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 30 July 2010 - 08:52 PM

Posted Image

File Name: Google Site Search
File Submitter: Martin
File Submitted: 30 Jul 2010
File Updated: 05 Feb 2012
File Category: IP.Board v3.1

File Information
Resource Type: Hook
Version: 1.1.3 (11003)
Compatibility: IP.Board 3.1 series



Description
Google Site Search is a hook that adds Google's Site Search as an option to your search dropdown. You can choose who's allowed to used it, and if it should always be the default option.
The search results will be shown in a popup.

Earn money with this using Google AdSense
If you want to integrate your Google AdSense account into these search result, you need to have a custom search engine (CSE) created for your site. From the CSE Control Panel you'll find a link in the left side menu that allows you to connect your AdSense- and CSE account together.

Change log
v1.0.3 - Fixed IE8 issues
v1.0.2 - Fixed a bug were you could not do multiple search without refreshing the page. Removed the AdSense setting (See above paragraph). Also added a warning message to admin if it's missing an AJAX API key.
v1.0.1 - Bug with the group permissions. If you chose more than one group, the universe imploded.
v1.0 - Initial public release

Click here to download this file

#2 Snookputt

Snookputt

    Coder

  • IM Supporters
  • PipPipPipPipPip
  • 137 posts
  • IPB Version:v3.1.x

Posted 05 August 2010 - 04:02 PM

I can't seem to get the results from the site, it is searching the www, any suggestions?

#3 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 05 August 2010 - 08:02 PM

Have you created your own Custom Search Engine, and entered the API key from that into the settings?

#4 Snookputt

Snookputt

    Coder

  • IM Supporters
  • PipPipPipPipPip
  • 137 posts
  • IPB Version:v3.1.x

Posted 05 August 2010 - 08:23 PM

Yes I have Martin, I have also entered the Google AJAX API Key and the Google Custom Search Engine ID and chosen the default search engines

#5 Snookputt

Snookputt

    Coder

  • IM Supporters
  • PipPipPipPipPip
  • 137 posts
  • IPB Version:v3.1.x

Posted 05 August 2010 - 08:27 PM

O[K, fixed. I chose search ONLY included sites this was a check box in the preferences section of Google ;)

#6 kissrocknroll

kissrocknroll

    Novice

  • Members
  • PipPip
  • 19 posts
  • Real Name:eddie
  • IPB Version:v3.0.x

Posted 18 August 2010 - 06:34 PM

doesnt work for me
its doesnt show me the option to search on google

Edited by kissrocknroll, 18 August 2010 - 06:35 PM.


#7 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 18 August 2010 - 08:33 PM

Can you PM me the URL where it is installed?

#8 cvs

cvs

    n00b

  • Members
  • Pip
  • 1 posts
  • Real Name:Mr-z
  • IPB Version:v2.1.x

Posted 26 August 2010 - 09:53 AM

i got Admin warning

Quote

(IM) Google Site Search is not properly setup. Please refer to the system settings or readme file for this hook for more information on how to set it up. NB: An AJAX API key IS required!
If you don't want to use this hook, disable or uninstall it to remove this warning message.

it ok this fix sorry

Edited by cvs, 26 August 2010 - 09:58 AM.


#9 DyCe

DyCe

    Coder

  • Banned
  • PipPipPipPipPip
  • 126 posts
  • Real Name:DyCe
  • IPB Version:v2.3.x

Posted 30 August 2010 - 08:59 PM

good functioning modification m4rtin. have a question.

could it required adsense ID, pub or generated search code from adsense ? and can we allow this search on limited forum ? i means i have 3 forums with different categories. and i want to allow adsense search work only the forum no.2 and forum no.1 and forums no.3 set for default Google search which we configure from the ACP.

thanks

#10 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 30 August 2010 - 09:06 PM

Sorry, but the use of AdSense is fully controlled by Google.

Quote

Earn money with this using Google AdSense
If you want to integrate your Google AdSense account into these search result, you need to have a custom search engine (CSE) created for your site. From the CSE Control Panel you'll find a link in the left side menu that allows you to connect your AdSense- and CSE account together.


#11 DyCe

DyCe

    Coder

  • Banned
  • PipPipPipPipPip
  • 126 posts
  • Real Name:DyCe
  • IPB Version:v2.3.x

Posted 30 August 2010 - 09:39 PM

I am not that mean. i means we have seen the search function in all over the forum after installing this modification. so could its possible we have choice in in this modification we can allow adsense search by default to selected forums. and all other forums we select google or bulletin forum searching.

for example:

we have 3 forum.

visitor came in forum no.2 and he need some unique thing so he definitely used our search function. and we set it forum no.2 from ACP (that anyone search in this forum and through this forum so by default adsense CSE Box he saw)

and if visitor come in forum no.3 and he need some other unique thing so he definitely used search function here too. and we set it this forum no.3 from ACP (that anyone search in this forum and through this forum so by default he saw Google search) means he entered any word so he get results from Google.

i hope i describe better now.

Quote

can we allow this search on limited forum ? i means i have 3 forums with different categories. and i want to allow adsense search work only the forum no.2 and forum no.1 and forums no.3 set for default Google search which we configure from the ACP.


#12 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 31 August 2010 - 10:14 AM

So you want to restrict use of this hook to only some forums?

Edit ./hooks/imGoogleSearch_<randomString>.php and ./hooks/imGoogleSearchJs_<randomString>.php
Find:
ipsRegistry::$settings['im_googleSearch-cseKey']	= trim( ipsRegistry::$settings['im_googleSearch-cseKey'] );

If you want to allow the use of this in other parts of the board, and only in forum #3 and #4
Add below:
if ( ipsRegistry::$request['f'] AND ! in_array( ipsRegistry::$request['f'], array( 3,4 ) ) )
		{
			return false;
		}

If you want to allow use of this in only forum #3 and #4, and no where else
Add below:
if ( ! ipsRegistry::$request['f'] OR ! in_array( ipsRegistry::$request['f'], array( 3,4 ) ) )
		{
			return false;
		}

If you don't want to allow the use of this in other parts of the board but in forum #3 and #4
Add below:
if ( ipsRegistry::$request['f'] AND in_array( ipsRegistry::$request['f'], array( 3,4 ) ) )
		{
			return false;
		}


#13 DyCe

DyCe

    Coder

  • Banned
  • PipPipPipPipPip
  • 126 posts
  • Real Name:DyCe
  • IPB Version:v2.3.x

Posted 05 September 2010 - 04:35 AM

Tusen takk martin  (w00t)

Edited by DyCe, 05 September 2010 - 04:40 AM.


#14 Meraj

Meraj

    n00b

  • Banned
  • Pip
  • 4 posts
  • IPB Version:v2.3.x

Posted 24 September 2010 - 04:59 PM

Very nice hook...

I have a little problem...

This hook is working fine on my default IPB skin. but when a search some on my custome skin, it gives an error.

[#10145.1] The application '' does not support search 


#15 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 24 September 2010 - 05:07 PM

Enable the skin and this hook for guests, and send me the URL to your board, and I'll take a look at it :)

#16 peps

peps

    Novice

  • Members
  • PipPip
  • 9 posts
  • Location:Italy
  • Real Name:Joseph
  • IPB Version:v3.0.x

Posted 06 October 2010 - 02:04 PM

Hello great mod, this is what I was looking for.

But I have the same error above:
[#10145.1] The application '' does not support search 

May be because I have a custon skin ("Elegant" from skinbox.net)?

Edited by peps, 06 October 2010 - 02:36 PM.


#17 peps

peps

    Novice

  • Members
  • PipPip
  • 9 posts
  • Location:Italy
  • Real Name:Joseph
  • IPB Version:v3.0.x

Posted 06 October 2010 - 05:15 PM

I found.
The plugin works with firefox and not with internet eplorer

#18 Mazakony

Mazakony

    n00b

  • Banned
  • Pip
  • 3 posts
  • Real Name:Mazakony Forums
  • IPB Version:v3.1.x

Posted 17 October 2010 - 04:30 PM

thanks for this hook
This hook working fine wih default skin.and some another skin, but when a search on velevet skin it gives an error

#19 lifestyle

lifestyle

    n00b

  • Members
  • Pip
  • 3 posts
  • IPB Version:N/A

Posted 02 November 2010 - 09:46 PM

Hi Martin. First of all i want to thank you very much for the work you put into this hook.
Like other users above i encountered the same error [#10145.1] on our forum.
Google Ajax Api Key and Google Custom Search Engine ID are installed.

I tested the search in different browsers but the results are the same.

I will apreciate any help.
Thank you in advance!

#20 Martin

Martin

    But but, it's not only only!

  • Management
  • PipPipPipPipPipPipPipPipPipPip
  • 7,081 posts
  • Location:Hammerfest, Norway
  • Real Name:Martin Aronsen
  • IPB Version:v3.2.x
Contributor

Posted 07 November 2010 - 07:06 AM

View Postlifestyle, on 02 November 2010 - 09:46 PM, said:

Hi Martin. First of all i want to thank you very much for the work you put into this hook.
Like other users above i encountered the same error [#10145.1] on our forum.
Google Ajax Api Key and Google Custom Search Engine ID are installed.

I tested the search in different browsers but the results are the same.

I will apreciate any help.
Thank you in advance!
The javascript file "./public/js/ips.googleSearch.js" doesn't exist on your site. This can either indicate that you haven't uploaded it, or you uploaded it somewhere else.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users