Edgewall Software

Changes between Version 10 and Version 11 of TracInterfaceCustomization


Ignore:
Timestamp:
Nov 30, 2005, 6:02:16 AM (18 years ago)
Author:
Pedro Algarvio <ufs@…>
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • TracInterfaceCustomization

    v10 v11  
    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 ==
     67It actually pretty simple now that I know it, here it goes.
     68On your trac environment directory, edit '''`site_css.cs`''' and put this inside:
     69{{{
     70#!css
     71#content {
     72        padding: 0;
     73        margin: 15px 140px 0 15px;
     74        text-align: left;
     75        min-height: 770px;
     76}
     77
     78#ads {
     79        position: absolute;
     80        top: 170px;
     81        right: 10px;
     82        width: 140px;
     83        z-index: 1;
     84        text-align: right;               
     85}
     86}}}
     87Now 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.
     88
     89Now we'll need to add the Google Ads code somewhere right? Edit '''`site_footer.cs`''', and next is an example:
     90{{{
     91#!text/html
     92<div id="ads">
     93        <!--- Start of Google Ad Code -->
     94        YOU WOULD PASTE IT HERE
     95        <!--- End of Google Ad Code -->
     96</div>
     97}}}
     98
    6699
    67100----