Changes between Version 2 and Version 3 of TracGoogleSearchPlugin


Ignore:
Timestamp:
Apr 13, 2018, 10:03:33 PM (6 years ago)
Author:
figaro
Comment:

Reworked page to reflect new hosting

Legend:

Unmodified
Added
Removed
Modified
  • TracGoogleSearchPlugin

    v2 v3  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Trac Google Search Plugin
     3= Trac Google Search
    44
    5 {{{
    6 #!rst
    7 TracGoogleSearch_ is a trac_ plugin which enables your trac_ environment to
    8 use Google_'s Adsense_ For Search on the mini search box displayed on top.
     5== Description
    96
    10 **Note:** Regular trac_ search won't be disabled, the users must click the
    11 *"Search"* button to access it, and will only show up and work if user has
    12 ``SEARCH_VIEW`` permissions, unlike this plugin, which does not
    13 require any special permissions since it's querying Google_ not trac_.
     7This plugin enables your Trac environment to use Google's Adsense for Search on the mini search box displayed on top.
    148
    15 Installation
    16 ------------
    17 Installing the plugin is as easy as::
     9**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.
    1810
    19   sudo easy_install TracGoogleSearch
     11== Bugs/Feature Requests
    2012
    21 And then enabling it:
     13Existing bugs and feature requests for TracGoogleSearchPlugin are
     14[report:9?COMPONENT=TracGoogleSearchPlugin here].
    2215
    23 .. code-block:: ini
     16If you have any issues, create a
     17[/newticket?component=TracGoogleSearchPlugin new ticket].
    2418
    25   [components]
    26   tracext.google.search.* = enabled
     19[[TicketQuery(component=TracGoogleSearchPlugin&group=type,format=progress)]]
    2720
    28 And that's it!
     21== Download
    2922
    30 Configuration
    31 -------------
    32 In order to use this plugin you must first create a custom search engine on
    33 your Adsense_ account, configure it like you want it and choose to display
    34 the results on a page on your own website.
     23This plugin is available on [pypi:TracGoogleSearch PyPi].
    3524
    36 If you wish Google_ to show results relative to the domain of your trac_
    37 environment, on your Adsense_ account, edit your search engine settings, choose
    38 *"view more advanced features"*, select *"Search the entire web but emphasize
    39 included sites"* and then under *"Sites"* add your trac_ environment domain.
     25== Source
    4026
    41 From the resulting code that Google_ provides we'll need the values from the
    42 hidden fields named, **cx** and **cof**, ie, your client id and search id
    43 strings.
     27Check out TracGoogleSearchPlugin from [pypi:TracGoogleSearch PyPi].
     28
     29== Installation
     30
     31General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page.
     32
     33== Configuration
     34
     35In 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.
     36
     37If 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 emphasise included sites"* and then under *"Sites"* add your trac_ environment domain.
     38
     39From 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.
    4440
    4541Consider the following example code:
    4642
    47 .. code-block:: text/html
    48 
     43{{{
    4944  <form action="http://domain.tld/gsearch" id="cse-search-box">
    5045    <div>
     
    5651    </div>
    5752  </form>
    58   <script type="text/javascript"
    59           src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
    60 
    61 
    62 The values you'll need to remember would be
    63 **partner-pub-0000000000000000:0aaaa0aaa00a** and **FORID:1**, the rest of the
    64 code will be provided by the plugin.
    65 
    66 The plugin can then be configured on trac_'s administration panel, under the
    67 section **Google** and then **Search**.
    68 
    69 Bugs and/or New Features
    70 ------------------------
    71 
    72 Please submit bugs of new features to::
    73 
    74   http://google.ufsoft.org/
    75 
    76 
    77 Source Code
    78 -----------
    79 
    80 If you wish to be on the bleeding edge and get the latest available code:
    81 
    82 .. code-block:: sh
    83 
    84   hg clone http://google.ufsoft.org/hg/search/ TracGoogleSearch
    85 
    86 
    87 **Note**: For up-to-date documentation please visit TracGoogleSearch_'s site.
    88 
    89 
    90 .. _trac: http://trac.edgewall.org
    91 .. _TracGoogleSearch: http://google.ufsoft.org/wiki/TracGoogleSearch
    92 .. _Google: http://www.google.com
    93 .. _Adsense: https://www.google.com/adsense/
     53  <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script>
    9454}}}
    9555
    96 This plugin is also available on [pypi:TracGoogleSearch PyPi].
     56The 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.
     57
     58The plugin can then be configured on trac_'s administration panel, under the section **Google** and then **Search**.
     59
     60== Recent Changes
     61
     62See [pypi:TracGoogleSearch PyPi].
     63
     64== Author/Contributors
     65
     66'''Author:''' Pedro Algarvio [[BR]]
     67'''Maintainer:''' [[BR]]
     68'''Contributors:'''