Allow a third display option: display on site without JavaScript/frames
| Project: | Google Custom Search Engine |
| Version: | 5.x-1.6 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
If you get a "business" (paid) account on Google Custom Search, you are allowed to get search results via XML and display them in your site however you want, without ads, and without using JavaScript or iFrames.
I have successfully modified your google_cse module so that it can do this. Probably other sites would find this useful, so I thought I'd file a Feature Request with my changes.
I can attach a patch if you want, but there are so many changes I thought it might be simpler just to attach the rewritten module itself. Besides making this new display option, I also added a bunch of other options to the Settings page that allow you to customize more of the text in the output of the module. And since there were now a lot of options, I rearranged the options screen (added some more fieldsets and changed the order of some fields).
I will also attach a few lines to be added to the CSS file for the new display option.
I did this for a Drupal 5 site, so I have only done this for the Drupal 5 version of your module, but it would probably be good to do it for Drupal 6 as well. Feel free to use the code as you see fit, and let me know if you'd like the patches in a different format.
| Attachment | Size |
|---|---|
| New version of 5.x module, with option to display results in site without JavaScript | 25.6 KB |
| CSS additions for new version of module | 111 bytes |

#1
Any chance to get this integrated? This is a great third option.
#2
I was hoping the CSE module did this, and am very glad to find this patch. I'd love to see it integrated in as well.
#3
A patch on drupal-6 would be preferred, otherwise I'll have to do a lot of work to integrate this.
#4
I've been playing with the XML feature and it works great.
In addition, I've further modified the code posted above to support the use of GCSE's labels and refinements. I.e. the "Refine your search for 'blah'" features.
I'm happy to share what I've got with anyone interested. I wasn't sure it made sense to post a patch against a patch, but once the base XML feature is integrated in I'd be happy to roll something.
#5
Rather than posting a patch of a patch, just reroll the patch. But it also needs to be rerolled for d6.
#6
Sorry - my client's site was started a while back and was using D5, so that is why the patch is for D5.
#7
Is this change available for drupal 6 module? I only see that you can choose where you want the ads to be displayed and I don't see an option for using a business account