This should come before any other rules, so put it just after the "RewriteEngine on" line. Don't forget to replace linuxweblog.com with your own.
Add a "google_search()" function in the "search.module" file to return the Search box and the results. The code can be generated from your adsense account. Here is what I have -- note the query text is pre-filled into the search box:
Integrate Google Search on Drupal sites and generate revenue
Below is what I have done to integrate the adsense google search with the Drupal CMS.
Add the rewrite rule to ".htaccess" file so the search query gets directed to the search page:
RewriteCond %{QUERY_STRING} ^domains=linuxweblog.com&q=([^&]+)&.*$
RewriteRule ^.*$ index.php?q=search&keys=%1 [L]
This should come before any other rules, so put it just after the "RewriteEngine on" line. Don't forget to replace linuxweblog.com with your own.
Add a "google_search()" function in the "search.module" file to return the Search box and the results. The code can be generated from your adsense account. Here is what I have -- note the query text is pre-filled into the search box:Now in the "search_view()" function concatenate the search results just before printing the page:
That's it. Test it out and see how it works!!