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.0.zip (12.3 kB view details)

Uploaded Source

TracGoogleSearch-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

TracGoogleSearch-0.1.0.tar.bz2 (6.4 kB view details)

Uploaded Source

Built Distribution

TracGoogleSearch-0.1.0-py2.5.egg (11.4 kB view details)

Uploaded Source

File details

Details for the file TracGoogleSearch-0.1.0.zip.

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.0.zip
Algorithm Hash digest
SHA256 26ed7a2ca53b270b5d3584f444a00f4a64b8e3a293270a211ad0b68306cfb500
MD5 e1e715bd4144dfe951a8cb4b823485f9
BLAKE2b-256 12eec4de21c92d4ea10e039b18f4d4dcc59a4567ce1160b47dda79e464e976cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bd9e28845899c6e158c42a1f14fb910ce47efdd30134b71523d46ef554ab1faf
MD5 292db2c4efc7d91abf84a59c8229fad3
BLAKE2b-256 0154b4831ad411fc30b8ffa057a6e702d462e4c7a8ab6cc9c883350f700cce59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.0.tar.bz2
Algorithm Hash digest
SHA256 dd480eb2790523d579aa98806026e0b3164f6b41c4fdf5caf9ff69c21cce8bdb
MD5 877e0ef1fb6e3b12328bf9dd4dca1dbd
BLAKE2b-256 d32022fde52b1e76897f48f55adb09b093471122c4c1ca08e6ee6448861d7273

See more details on using hashes here.

File details

Details for the file TracGoogleSearch-0.1.0-py2.5.egg.

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.0-py2.5.egg
Algorithm Hash digest
SHA256 496b3006c82f880dd61238cd0670a319280487857825d31e5a6ed3d9004882ee
MD5 349b6b8516ef49573560f134a70f6ccd
BLAKE2b-256 73a65e42b02e437aa6459e2f3f5c6ff9b4b441a32d59dff6322fa467e8c2a987

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