Ads

From Hackepedia
Jump to navigationJump to search

To add Burst Media ads in mediawiki, you will want to edit 3 files.

First, create a "burst.php" in your parent directory (the directory with LocalSettings.php):

 $ cat burst.php 
 <!-- BEGIN RICH-MEDIA NETWORK CODE -->
 <div id="burst-ads">
 Below this notice is an advertisement. Please see our Privacy Policy.
 <script language="JavaScript">
 rnum=Math.round(Math.random() * 100000); ts=String.fromCharCode(60);
 if (window.self != window.top) { nf='' } else { nf='NF/' };
 document.write(ts+'script   src="http://www.burstnet.com/cgi-bin/ads/sk14726a.cgi/v=2.1S/sz=120x600A|160x600A/'+rnum+'/'+nf+'RETURN-CODE/JS/">'+ts+'/script>');
 </script><noscript><a href="http://www.burstnet.com/ads/sk14726a-map.cgi/ns/v=2.1S/sz=120x600A|160x600A/"  target="_top">
 <img src="http://www.burstnet.com/cgi-bin/ads/sk14726a.cgi/ns/v=2.1S/sz=120x600A|160x600A/" border="0" alt="Click  Here"></a>
 </noscript>
 <!-- END BURST CODE -->

This assumes you're using vertical banners, as we are, and you have received similar code from BurstMedia to the above, as well as started your campaign. You will now want to add the php include below, probably around line 230 of Monobook.php:

 $ vi skins/MonoBook.php

                wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) );
?>
                        </ul>
                </div>
        </div>
                <?php include("burst.php") ?>
 <?php
                if( $this->data['language_urls'] ) { ?>

 

Finally,

$ vi skins/monobook/main.css

add this:

#burst-ads {
    width: 120px;
    clear: left;
    position: absolute;
    padding: 35px 0px 6px 6px;
    float: right;
    right: 0px;
    top: 10px;
    z-index: 5;
}

and change the first 0 to 125px in #content:

#content {
       margin: 2.8em 125px 0 12.2em;

reload your page and you should be good to go.