{Tutorial} Installing Ads Into E107

Maz_P

New Member
Messages
4
Reaction score
0
Points
0
E107 Version 0.7.8: (should work with any version - but you are using the latest version - aren't you...)

This method has been tested with personal X10 advertising code and advanced advertising code.
I have not tried the corporate one but I suspect that graphics 'may' alter the page displayed substantially.

I found it quickest to take the fairly redundant plugin 'powered_by_menu', and converted that for use to enable the required text advertisments on my advanced server. Note that modifying the php file related to this plugin, will mean that it will never again give you the e107/PHP/MySQL advertising stuff as it was originally intended for, but hey - I did say that this was a fairly redundant plugin that in my experience is hardly used.

Right - now down to the nitty gritty
I have assumed that you have managed to install e107 onto your server [I will write an installation tutorial if anyone is interested]. I am also taking things step by step, there is no insult to your intelligence or ability intended...


Open your browser and navigate to your X10 Control Panel, click on the button marked Advertisement Codes.

find your required advertising code, and save it somewhere:
e.g. for an Advanced Hosting Package use the code displayed

Code:
<script type="text/javascript" src="http://x10hosting.com/adserve.js?advanced"></script>

Navigate on your local disk to your downloaded e107 installation folder.

e.g.
My Documents\e107_v0.7.8_full\e107_plugins

then into
My Documents\e107_v0.7.8_full\e107_plugins\powered_by_menu


open the file
powered_by_menu.php
In the editor of your choice (for this purpose wordpad will be fine)

Copy the code from below - go back to wordpad - press control A - then control V - this will paste and overwrite the existing code with it.

Code:
<?php
$head = "Advertisement";
$code = 'place your advertising code here';
$ns -> tablerender($head,  $code);
?>

Note that there is a quote before place and one after here

Edit the line between the quotes:
and enter your required advertising code that you wrote down/copied earlier from your control panel

for example:
Code:
$code = '<script type=\'text/javascript\' src="http://x10hosting.com/adserve.js?advanced"></script>';


Save the file to disk - note again, that your original powered_by_menu.php will no longer function as its original intended purpose and will now be dedicated to the X10 advertising code.

FTP or upload your saved file to the e107_plugins\powered_by_menu folder, and overwrite the existing powered_by_menu.php

Enable the Powered By plugin from your E107 Admin area - On a new installation it will be enabled already by default.

Initially it will be blank with just the header 'Advertisement' showing. Don't panic (like me), apparantly Google Adsense will have to crawl your site first to determine the advertisment type to display. It took about 24 hours for mine to show up.

Hope this has been useful

Note to the forum Mod - delete this if it contravenes any X10 Forum Rules - I am new here and its my 1st Post
 
Top