close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How does one add Google Search to a website?

Thread began 3/28/2014 4:48 pm by frank375703 | Last modified 4/04/2014 1:19 pm by Jason Byrnes | 3506 views | 18 replies |

frank375703

How does one add Google Search to a website?

I want to add Google Search to a website. I tried to follow the Google Search Tools tutorial but it has not worked out the way I expected. The tutorial leaves info out and I have no clue how to add this search field to the header of a page. I wound up getting a page with only the search field which returns a result of 0. This is extremely frustrating and I wish your tutorials were easier to follow and understand.

The link is www.skyeconsultingnj.com/test/php.

All I want to do is have a search function in the header of the website on every page like you see on websites.

Sign in to reply to this post

Jason ByrnesWebAssist

can you send a copy of the webassist/google/search/plugins/test_custom_search.php page

Sign in to reply to this post

frank375703

Yes, attached. The goal is to add this to the header of the website and have the search result appear in a page that looks like the website.

I will need to add this search feature to another website also. Are there any other more in depth tutorials?

Basically I'm looking to be able to create something like on your site. Search field in header and then results below in the content area of a branded page. The tutorial made it look easy. ugh.

Attached Files
test_custom_search.php
Sign in to reply to this post

Jason ByrnesWebAssist

it looks like when you ran the wizard, you selected to have the search page and the results page on the same page, for what you are trying to accomplish, you would need to create a separate search and results page.

you would then apply your template top the results page to add your site design to it, and you could copy the search form fcrom the search page into the head section of your template.

as for why it is not returning results, i don't see an obvious problem in the code, I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

frank375703

Ok, here is the link to the page with the search field.

http://skyeconsultingnj.com/test.php

I have to get this to work on this page (test.php) so the client can test and approve it.


My real concern is adding this feature to the next site I have in the till. Unfortunately I hand coded that site as I have yet to figure out how to use your template and design tools to replicate a design I mock up in photoshop. So I do not have a template to apply to the page results. I would have to add this stuff to a website that already has been coded outside of webs assist tools.

As a designer, I'm having a hard time learning to use your tools for time saving techniques. Specifically, once I design website in Photoshop, how to use your products to code, make template and then add these features to them. As we don't do a lot of websites, It's always on a need to know basis. Does web assist have any start to finish tutorials in this regard?

Sign in to reply to this post

Jason ByrnesWebAssist

if i write the session to the results, i see the following:

["last_WAGS_result_1_10"]=> string(357) "{ "error": { "errors": [ { "domain": "usageLimits", "reason": "accessNotConfigured", "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project." } ], "code": 403, "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project." } } " }


this means The google search api is not configured to allow access for your domain. you will need to use the google API manager to add your domain to the list of domains allowed for the api key you are using.


Templates are a feature of Dreamweaver, there is a tutorial hear for Dreamweaver templates:
http://www.webassist.com/tutorials/Creating-applying-Dreamweaver-templates

if you don't have a template for the site design, you will need to edit the results page after it is created to apply your site design to it. Like i said before, use the google search wizard to create the search and results pages seperatly, then apply your design to the results page.

Sign in to reply to this post

frank375703

Ok, i deleted everything and started from scratch. I created a template page for the results page. I used the google search wizard and created separate search and results pages. I uploaded everything and it looks like the actual mechanics are working. However the search results come out to zero.

Having zero experience with google's API, i had originally set it up and had http://www.skyeconsultingnj.com allowed access. Im not sure what else I have to do to give it access.

I private messaged the search page. any ideas what I'm doing wrong?

Sign in to reply to this post

Jason ByrnesWebAssist

writing session data to the results page still shows the access not con figured error:

Access Not Configured. Please use Google Developers Console to activate the API for your project


in the google developers console, make sure that the custom search API is enabled in the API section.

in the credentials section, edit the allowed referrers for the API and enter your site address as:

www.skyeconsultingnj.com
skyeconsultingnj.com

Sign in to reply to this post

frank375703

I did what you said. Made sure the custom search API was on. it was not. I can't find where it said to turn that on but i did. I added the credentials as you listed. Still not working. Is there a lag time before it all works once everything is in place? OR do i have to regenerate a new API Key? If so, what do I do once I regenerate it?

Sign in to reply to this post

Jason ByrnesWebAssist

as a private message can you send screen shots of the api and credentials tabs of the developer console please

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...