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.1.zip (16.9 kB view details)

Uploaded Source

TracGoogleSearch-0.1.1.tar.gz (9.9 kB view details)

Uploaded Source

TracGoogleSearch-0.1.1.tar.bz2 (10.1 kB view details)

Uploaded Source

Built Distribution

TracGoogleSearch-0.1.1-py2.5.egg (11.5 kB view details)

Uploaded Source

File details

Details for the file TracGoogleSearch-0.1.1.zip.

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.1.zip
Algorithm Hash digest
SHA256 5328485906f6c4015b8582a2679df1617d111010b02ba867d9846a4427b48739
MD5 816e90592da03f368b9c2ca814f6bf8e
BLAKE2b-256 8984d56e37789a3ed14a6240f030b34d440386b07c3897c9d482460fcd4ee2f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.1.tar.gz
Algorithm Hash digest
SHA256 641070835adacbb543b5548f035a6f21432c65e45dde5fd686ad8e9e29d74174
MD5 bdc7a021471f51303ea5cd998ec8c5e2
BLAKE2b-256 7b2510d9d21f8fa77ee38f1c280a1f4a46e181ca934f0bf599edcd0a6fdb2267

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.1.tar.bz2
Algorithm Hash digest
SHA256 de6fa4e2a7631b58b208b51e9a32595cc0f2f2476977666938f6dc2df9a32962
MD5 a008fd0d9794eee396e61927b3985982
BLAKE2b-256 b533d44bf390cf724a49d761835899d7cee06bd98be82bca055bf9f4505c559c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for TracGoogleSearch-0.1.1-py2.5.egg
Algorithm Hash digest
SHA256 375db2e5f1445deed255b75d7feecca303299694e8fc6b853d10a027fe8347ac
MD5 3c71c2749243be8c8eff1b4d86f8bfe4
BLAKE2b-256 e7d1326692fd60850a497a6525584da1cd7aed63205707784fcb09139eac2d12

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