Edgewall Software

Changes between Version 14 and Version 15 of TracInterfaceCustomization


Ignore:
Timestamp:
Nov 30, 2005, 9:58:41 PM (18 years ago)
Author:
Pedro Algarvio <ufs@…>
Comment:

Updated Adding Google Ads To Your Trac - Just some more details about what is being done.

Legend:

Unmodified
Added
Removed
Modified
  • TracInterfaceCustomization

    v14 v15  
    6464If you absolutely need to use modified templates, copy the template files from the default templates directory (usually in found in `$prefix/share/trac/templates`) into the `templates` directory of the project environment. Then modify those copies to get the desired results.
    6565
    66 == Adding Google Ads to your Trac ==
     66== Adding Google Ads To Your Trac ==
    6767It's actually pretty simple now that I know it, here it goes.
    6868On your trac environment directory, edit '''`site_css.cs`''' and put this inside:
     
    9494}
    9595}}}
    96 Now a bit of explanation. Settings are of course, of topic, if you have doubts, there's a CSS link above in this page, click it, even so I'll explain parts. First we override '''`#content`''', trac's main content div id so we can have space for our ads. The most important part is that '''`140px`''', our right margin, we also set a minimun height or else the ads would be on top of the footer in case the wiki page is small enough.
     96Now a bit of explanation. Settings are of course, of topic, if you have doubts, there's a CSS link above in this page, click it, even so I'll explain parts.
     97
     98First we override '''`#content`''', trac's main content div id so we can have space for our ads. The most important part is that '''`140px`''', our right margin. We also set a minimun height(`min-height`) for Mozilla and Safary browsers and `height` for IE browser or else the ads would be on top of the footer in case the wiki page is small enough, which explains why there are two '''`#content`'''. Because IE doesn't respect `min-height`, so it's just work arround that.
     99
     100The '''`width`''' in '''`#ads`''' should only be set if you intend to have multiple ad spaces, for example, a Skyscraper Google Ad, and also a 'Use Firefox...' that google also makes available. If it wasn't set, both ads would show up side by side, wich is not good '''`;]`'''. If you only intend on using a single Skyscrapper Google Ad, you should ommit '''`width`''', why, because if a user has the firefox Ad-Block plugin, and he blocks all ad content from google he'll see the wiki pages with the full width. Neat right, this way we make everyone happy.
    97101
    98102Now we'll need to add the Google Ads code somewhere right? Edit '''`site_footer.cs`''', and next is an example: