Closed Thread
Results 1 to 2 of 2

Thread: How to insert ads in MediaWiki

  1. #1
    Fedlerner's Avatar
    Fedlerner is offline Retired Fedlerner is an unknown quantity at this point
    Join Date
    Aug 2006
    Location
    Buenos Aires, Argentina
    Posts
    12,923

    Exclamation How to insert ads in MediaWiki

    Inserting the Ads in MediaWiki is a bit complicated (it took me a long time to figure it out).
    You can add before the ad code <div align="center">, and after the code </div> to make it look nicer by centering the ad.

    For the Corporate plan:
    You'll need to edit two files, and you can edit the file by using an FTP Client, or FileManager (from cPanel).
    Go to the MediaWiki folder, and go to the "skins" subfolder. You'll need to edit two files:

    -The first file is located in the "/skins/monobook" subfolder. The file you need to edit is the "main.css".
    Add the following code:
    Code:
    #wholebody {
    position: absolute;
    top: 70px;
    }
    Right before this code:
    Code:
    #column-content {
        width: 100%;
        float: right;
        margin: 0 0 .6em -12.2em;
        padding: 0;
    }
    And save the file.

    -The second file is located in the /skins subfolder. The file you need to edit is the "MonoBook.php".

    You'll need to add the following code:
    Code:
    <div id="header">
    THE JAVASCRIPT CODE HERE
    </div>
    <div id="wholebody">
    After this code:
    Code:
        </head>
    <body <?php if($this->data['body_ondblclick']) { ?>ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
    <?php if($this->data['body_onload'    ]) { ?>onload="<?php     $this->text('body_onload')     ?>"<?php } ?>
     class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?>">
    before this code:
    Code:
        <div id="globalWrapper">
            <div id="column-content">
        <div id="content">


    Then you'll need to add:
    Code:
    </div>
    Right after this code:
    Code:
    ?>
                </ul>
            </div>
        <?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
    </div>
    Before this code:
    Code:
    <?php $this->html('reporttime') ?>
    <?php if ( $this->data['debug'] ): ?>
    <!-- Debug output:
    <?php $this->text( 'debug' ); ?>
    Save the file and that's it. In FireFox you need to delete your cookies to see the changes.


    If you still can't insert the Ads, please post in the "Free Hosting" board.
    Last edited by Fedlerner; 12-10-2006 at 07:53 PM.
    Federico Lerner
    Former x10Hosting Administrator - Staff Manager

  2. #2
    Fedlerner's Avatar
    Fedlerner is offline Retired Fedlerner is an unknown quantity at this point
    Join Date
    Aug 2006
    Location
    Buenos Aires, Argentina
    Posts
    12,923

    Re: How to insert ads in MediaWiki

    For the Advanced plan:

    It's easier than the Corporate plan. You just need to edit the "MonoBook.php", and you can edit the file by using an FTP Client, or FileManager (from cPanel). Go to the MediaWiki folder, and go to the "skins" subfolder. You'll need do this:

    You just need to add the "JavaScript" code:

    After this code:
    Code:
    		</div><!-- end of the left (by default at least) column -->
    			<div class="visualClear"></div>
    			<div id="footer">
    Before this code:
    Code:
    <?php
    		if($this->data['poweredbyico']) { ?>
    				<div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div>
    Save the file and that's it. In FireFox you need to delete your cookies to see the changes.


    If you still can't insert the Ads, please post in the "Free Hosting" board.
    Last edited by Fedlerner; 12-10-2006 at 07:51 PM.
    Federico Lerner
    Former x10Hosting Administrator - Staff Manager

Closed Thread

Similar Threads

  1. Need help to insert x10hosting ads in my website.
    By blitzkrieg in forum Scripts & 3rd Party Apps
    Replies: 3
    Last Post: 12-24-2006, 01:09 PM
  2. Adding ads to MediaWiki (Or WikiMedia)
    By the_king_dollars in forum Free Hosting
    Replies: 9
    Last Post: 12-11-2006, 07:50 AM
  3. MediaWiki
    By cheaster pyloa in forum Scripts & 3rd Party Apps
    Replies: 2
    Last Post: 11-14-2006, 09:08 PM
  4. mysql cc
    By chrisosx in forum Free Hosting
    Replies: 7
    Last Post: 07-06-2005, 01:22 PM
  5. Mod Help
    By Ericsson in forum Free Hosting
    Replies: 4
    Last Post: 03-04-2005, 03:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers