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:
Comments
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 =([^&]+)&.*$ [L]
RewriteRule ^.*$ index.php?q=search&keys=%1
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!!