HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Google Search addon

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#100432 (In Topic #19717)
Avatar

Well-settled

Has anyone installed this on there site, I am trying to test this but I cant seem to get it past the point of adding the side block, and it showing and bringing up a blank results page, but I guess without the api it will obviously show no results.

It advises you in the download area, and also the blocks configuration page that you need a google api, but when clicking the link google are now saying the loader no longer requires keys.
I am assuming I am doing something wrong and it will actually require some sort of key obtaining but maybe the link has changed, anyone happen to know which one I require?

This is the sign-up link in the comments in the download area on here

Sign-up for an API Key - Google Loader --- Google Developers

But when adding the block it is this link here

Sign-up for an AJAX Search API Key - Google AJAX Search API - Google Code which is dead.

So I assume I need to find a google ajaxsearch api, google searching brings me back to the same page advising the loader no longer requires a key.

Any help apreciated

Code

Block construction assistant: side_google_search (change)

Side Google Search -- Put a google search box on your website.

Typical use: When you install this block it will create a standard results page called google_search, this page can be edited or customised in the same way as any other page. In addition you can create your own page or put a results block on an existing page.

Select the parameters of the block. Some of the defaults have been entered for you - if you leave a parameter blank, the default value will be used.

Sometimes IDs are required for parameters values - these are usually numbers and may usually be found within the URLs used to edit the item you wish to reference (although usually we'll help you with a drop-down/tree list instead).

User Search Id    
You will need an API key from Google which you can get via this link: http://code.google.com/apis/ajaxsearch/signup.html.

Page Id    
The id of the page in which you have put the main google_search block on.



Back to the top
 
Posted
Rating:
#100433
Avatar

Community saint

Just installed it on a test site and it seems to work fine.

API keys are no longer required, so just leave the User Search Id field blank.

The site I tested it on is not indexed by Google, but it knows its domain name, so when I search for the domain name it comes up in the search results, so it looks like its working.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#100435
Avatar

Well-settled

I must have something wrong then, or maybe my understanding of what this does maybe is wrong.

I have it installed, with it showing, when I type something in the search block it takes me to a blank results page, I was hoping it would be a custom google search related to my sites indexed pages
Back to the top
 
Posted
Rating:
#100436
Avatar

Community saint

When I put the results box on the same page it works fine, but if I tell it to go to a different page, i.e. google_search, I get a blank result like you do.

Looking at the results page code, I can't see how it can possible work if it leaves the current page. Even if you had a api key, there is nothing on the results page to tell it to load the results.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#100437
Avatar

Thanks for the help testing temp1024. I'm going to take a look at this. By mistake the block says it was made by me; actually it was someone working for us at the time and I guess our testing was inadequate ;). I'll have to learn this myself too :lol:.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#100438
Avatar

Yeah, that page_id parameter right now is quite pointless. We could strip it out, but I think it should work as discussed above. I'll see what I can do…

EDIT: No actually it should work. It is relaying the POST data back through when it gets to the target page. Testing it though…


Last edit: by Chris Graham


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#100439
Avatar

Hi,

I've just gone over it and 50% rewritten it ;). The addon has been uploaded.

If anyone is interested, these are the changes:
https://github.com/chrisgraham/ocPortal/commit/eda41625639cf420c1511f4ac6e18f7ae37af97a
Loads of tweaks.

I renamed the default results page to '_google_search' as the underscore will stop it showing in the sitemap.

I changed the page name parameter to page_name, just to match ocPortal naming conventions (it was page_id).

Note that the results page must be in a zone where the search block is showing.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#100448
Avatar

Community saint

Looking good Chris, all that is needed now is to update the description to remove the references to keys and explain the zone dependency.

I think the zone dependency is going to catch a few people out, it certainly did me.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#100458
Avatar

Ok cool :)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#100462
Avatar

Community saint

 :thumbs:

I think you need some rest there Chris:
O_o This addon consists from to two blocks: O_o

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#100463
Avatar

Lol, I did miss that typo, but I'm not the guilty party this time ;).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#100486
Avatar

Well-settled

Thanks for looking at this Chris, works a treat, I have added it to the side panel on my site with the results page within the same zone.  :thumbs:

I unfortunately have an issue with the normal forum search.
Now I am unsure if this is related or if this was happening before (I would of thought a member might of advised me though), but when I try a forum search, I keep getting this error message

I have to admit I have not myself tried a forum search for a while, so more then likely related to something else, as I can not see how they would be linked

This seems to happen while searching the forums, from the advanced search area from the forums panel_top
Using the main search content page, and then searching the forums from there works




Last edit: by kenno
Back to the top
 
Posted
Rating:
#100487
Avatar

Ah, I have applied a fix to your site to solve this.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:
 Add topic 

Quick reply   Contract

Your name:
Your message: