Skip to main content

Google Adsense Search Plugin for Trac

Project description

TracGoogleSearch is a trac plugin which enables your trac environment to use Google’s Adsense For Search on the mini search box displayed on top.

Note: Regular trac search won’t be disabled, the users must click the “Search” button to access it, and will only show up and work if user has SEARCH_VIEW permissions, unlike this plugin, which does not require any special permissions since it’s querying Google not trac.

Installation

Installing the plugin is as easy as:

sudo easy_install TracGoogleSearch

And then enabling it:

[components]
tracext.google.search.* = enabled

And that’s it!

Configuration

In order to use this plugin you must first create a custom search engine on your Adsense account, configure it like you want it and choose to display the results on a page on your own website.

If you wish Google to show results relative to the domain of your trac environment, on your Adsense account, edit your search engine settings, choose “view more advanced features”, select “Search the entire web but emphasize included sites” and then under “Sites” add your trac environment domain.

From the resulting code that Google provides we’ll need the values from the hidden fields named, cx and cof, ie, your client id and search id strings.

Consider the following example code:

<form action="http://domain.tld/gsearch" id="cse-search-box">
  <div>
    <input type="hidden" name="cx" value="partner-pub-0000000000000000:0aaaa0aaa00a" />
    <input type="hidden" name="cof" value="FORID:1" />
    <input type="hidden" name="ie" value="UTF-8" />
    <input type="text" name="q" size="31" />
    <input type="submit" name="sa" value="Search" />
  </div>
</form>
<script type="text/javascript"
        src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>

The values you’ll need to remember would be partner-pub-0000000000000000:0aaaa0aaa00a and FORID:1, the rest of the code will be provided by the plugin.

The plugin can then be configured on trac’s administration panel, under the section Google and then Search.

Bugs and/or New Features

Please submit bugs of new features to:

http://google.ufsoft.org/

Source Code

If you wish to be on the bleeding edge and get the latest available code:

hg clone http://google.ufsoft.org/hg/search/ TracGoogleSearch

Note: For up-to-date documentation please visit TracGoogleSearch’s site.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

TracGoogleSearch-0.1.2.zip (18.6 kB view details)

Uploaded Source

TracGoogleSearch-0.1.2.tar.gz (11.3 kB view details)

Uploaded Source

TracGoogleSearch-0.1.2.tar.bz2 (10.3 kB view details)

Uploaded Source

Built Distribution

TracGoogleSearch-0.1.2-py2.6.egg (11.5 kB view details)

Uploaded Source

File details

Details for the file TracGoogleSearch-0.1.2.zip.

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.2.zip
Algorithm Hash digest
SHA256 eecf3d756caf943c562463441a2b7bee228923cefa6ef7e96775e3c1b10729a8
MD5 059379fa96bed7f67e7896b83b563cae
BLAKE2b-256 8dc8b633b81072477b404c90047cbbc6032b71918ca6607529c088c852b95eab

See more details on using hashes here.

File details

Details for the file TracGoogleSearch-0.1.2.tar.gz.

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b8a979ce1b3fe35739d78cf9105a031734524f24bb360f5c9f5f57c2b964a6e0
MD5 af9929a70fecb809b2af0d42607ae61f
BLAKE2b-256 2dc8bf237188700159551aa6721348e4cc1782487abfe0ce9442c26068ce8036

See more details on using hashes here.

File details

Details for the file TracGoogleSearch-0.1.2.tar.bz2.

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.2.tar.bz2
Algorithm Hash digest
SHA256 8a15301333ca6a2ac4e78a76818560fcf03c0ddda183df4f536ab9b014d5650d
MD5 909c4acf735ca70f2205b3e5301fb8f0
BLAKE2b-256 1980b4075cd9cfac7c68f74d136a4d12736eb45e99ffb54f68c6f0aa9cbcfe70

See more details on using hashes here.

File details

Details for the file TracGoogleSearch-0.1.2-py2.6.egg.

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.2-py2.6.egg
Algorithm Hash digest
SHA256 420ae4bd4b292057329e0c349497f988ec67d009bfbc37773ed04dd10a93fbf9
MD5 0491147eac2ed5f883f2aab591e8750b
BLAKE2b-256 8f738a264f326ffa997f3859aa85da54b53899907756005fc481389a5dc5e5a1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page