Author Topic: How To Insert Nairaland Type Of Ads On Your SMF Forum  (Read 4682 times)

0 Members and 1 Guest are viewing this topic.

Offline mfoniso

  • Administrator
  • Hero Member
  • *****
  • Posts: 2273
  • Country: ng
  • Karma: +0/-0
  • Gender: Male
    • Play Lsit Hub
How To Insert Nairaland Type Of Ads On Your SMF Forum
« on: November 23, 2012, 02:23:51 PM »
We all know that Nairaland actually abandon google adsense and has started displaying its own kind of ads on its SMF forum. Many of your have been wondering how he is able to do this and also wish they could do same on their own SMF forum. Well here is a simple tutorial that will guide you guys on how to go about it.
This script will display a random ads every time a user re-loads the page or starts navigating.
This script can also be perfectly used for a banner of header on your website. You can also use this in your signature or avatar on your forum. Additionally, you can rotate HTML and CSS files. Just make sure this script is placed on a PHP server, otherwise it will not work.

To display Nairaland type of ads on your smf forum,
1. First you will need to have ads management mod from the SMF mod site that’s if you don’t have it yet on your site, but if you do,    please skip this step.

2. Here is a php script that has been put together to help you achieve this, your will need to download this php script and follow this step bellow.

To install the script, simply download it and place it in any folder of your in your root server. How ever in this default configuration, all ads (banner, image, etc) from the folder where the script is located is been display.
Example:
Code: [Select]
public_html/ads/local ads/rotate.php 3. Now direct the source to the PHP file and you're done. This is what I mean, simply now go to your smf Ads manager mod in your admin panel and add a new ads, name it what ever you want it to be and in the body, simply direct the source to the PHP file, for example
Code: [Select]
<img src=" public_html/ads/local ads/rotate.php " alt="Ads" width="400" height="100" />Select where you want the ads to appear on your forum  then save it after that view you website where you had intended the ads to appear and that’s all.
 Now any banner ads or image file located in the same directory as the script will be displayed randomly.

Advanced configuration for those that wants to use  folder other than the folder where the php script is kept
Change this variable in the script to locate the directory where your images are placed.
Code: [Select]
$folder = '.';Set $folder to the full path to the location of your banner or images image file.
   For example:
Code: [Select]
$folder = '/user/me/example.com/images/';If the rotate.php file will be in the same folder as your images then you should leave it set to
Code: [Select]
$folder = '.';
Advanced configuration for those that wants to enable additional image types other than gif, jpg, and png,
If you'd like to enable additional image types other than gif, jpg, and png, add a duplicate line to the section below for the new image type.

Code: [Select]
$extList = array();
$extList['gif'] = 'image/gif';
$extList['jpg'] = 'image/jpeg';
$extList['jpeg'] = 'image/jpeg';
$extList['png'] = 'image/png';
   
   Add the new file-type, single-quoted, inside brackets.
   
   Add the mime-type to be sent to the browser, also single-quoted,
   after the equal sign.
   
   For example:
   PDF Files:

      
Code: [Select]
$extList['pdf'] = 'application/pdf';   
              CSS Files:

     
Code: [Select]
  $extList['css'] = 'text/css';
    You can even serve up random HTML files:

      
Code: [Select]
$extList['html'] = 'text/html';
    $extList['htm'] = 'text/html';

    Just be sure your mime-type definition is correct!
That’s all, if you have any question or difficulty, post a reply and you will get some assistance and if you successfully display your ads like that of nairaland also share it here. Good luck.
« Last Edit: November 23, 2012, 02:26:07 PM by mfoniso »


Please do not PM me questions, ask all your questions in the forum, for others to learn from.

All Student Forum

How To Insert Nairaland Type Of Ads On Your SMF Forum
« on: November 23, 2012, 02:23:51 PM »

Offline jearile2006

  • Jr. Member
  • **
  • Posts: 85
  • Country: ng
  • Karma: +0/-0
    • Uniport forum
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #1 on: September 04, 2013, 01:01:47 PM »
but how can one include links to the banners??
i must say i love the work your doing... pls if u don't mind, how did u modify your portal, the centre column of your home and the links to your boards?? plz do share your concept. how do i include verification before posting reply or topic?? tanx

Offline mfoniso

  • Administrator
  • Hero Member
  • *****
  • Posts: 2273
  • Country: ng
  • Karma: +0/-0
  • Gender: Male
    • Play Lsit Hub
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #2 on: September 04, 2013, 03:00:44 PM »
Quote
i must say i love the work your doing
Thank you for your words of encouragement.

Quote
but how can one include links to the banners??
pls if u don't mind, how did u modify your portal, the centre column of your home and the links to your boards?? plz do share your concept. how do i include verification before posting reply or topic?? tanx

First lets take it one at a time, You asked how one can include links to the banners? well this depends on where exiately you want the ads to show, i will asume you are using the admanagement mod as i mention earlier. Now to include links to the ads, simply call the folder where your ads is and the rotate.php just like this exaple bellow
Code: [Select]
www.yoursite.com/advert/rotate.phpNote the advert in the above example is the folder containing your ads and the rotate.php file
Please do not PM me questions, ask all your questions in the forum, for others to learn from.

All Student Forum

Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #2 on: September 04, 2013, 03:00:44 PM »

Offline jearile2006

  • Jr. Member
  • **
  • Posts: 85
  • Country: ng
  • Karma: +0/-0
    • Uniport forum
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #3 on: September 04, 2013, 10:39:05 PM »
i mean if for instance i av an mtn banner ad, how do i include a link dat wud redirect members/guest once they click on the ad... do u mean i include using dz site as an instance: "www.yoursite.com/advert/rotate.php" OR "www.mtn.com/advert/rotate.php"?? plz make me understand the concept better. tanx
« Last Edit: September 05, 2013, 12:03:56 AM by mfoniso »

Offline mfoniso

  • Administrator
  • Hero Member
  • *****
  • Posts: 2273
  • Country: ng
  • Karma: +0/-0
  • Gender: Male
    • Play Lsit Hub
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #4 on: September 04, 2013, 11:47:29 PM »
Quote
i mean if for instance i av an mtn banner ad, how do i include a link dat wud redirect members/guest once they click on the ad... do u mean i include using dz site as an instance: "www.yoursite.com/advert/rotate.php" OR "www.mtn.com/advert/rotate.php"?? plz make me understand the concept better. tanx

Ok i think your question is clear. To do this, you will have to place the link of your MTN ads in an HTML table tag <td></td> and then hyper link the tag to the MTN site. for example
Code: [Select]
<table><tr>
<a href="mtnonline.com">
<td>img src="www.yoursite.com/advert/rotate.php"></td></a>
</tr></table>

Let me know if you were able to achieve this.
« Last Edit: September 05, 2013, 12:46:12 AM by mfoniso »
Please do not PM me questions, ask all your questions in the forum, for others to learn from.

All Student Forum

Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #4 on: September 04, 2013, 11:47:29 PM »

Offline jearile2006

  • Jr. Member
  • **
  • Posts: 85
  • Country: ng
  • Karma: +0/-0
    • Uniport forum
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #5 on: October 03, 2013, 12:16:00 PM »
I'm sowie bt i can't help asking ds same question. wen i clicked on the ads (the 4 diff banners) on this page, they all have their own unique url; hw is it possible?? if i've MTN, GLO, AIRTEL & ETISALAT on one particular folder, how do i designate diff url to each banner/ads??? i just wish u understand wat i mean...tanx
« Last Edit: October 03, 2013, 12:26:06 PM by jearile2006 »

Offline mfoniso

  • Administrator
  • Hero Member
  • *****
  • Posts: 2273
  • Country: ng
  • Karma: +0/-0
  • Gender: Male
    • Play Lsit Hub
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #6 on: October 03, 2013, 07:00:56 PM »
Did you read the above post? that is how you get it done, in the above example, its just for one ads box, so repeat it for all your the number of ads you wish to serve. For example
Code: [Select]
<table><tr>
<a href="mtnonline.com">
<td>img src="www.yoursite.com/advert/rotate.php"></td></a>
<a href="glo.com">
<td>img src="www.yoursite.com/advert2/rotate.php"></td></a>
<a href="etisalat.com">
<td>img src="www.yoursite.com/advert3/rotate.php"></td></a>
<a href="zain.com">
<td>img src="www.yoursite.com/advert4/rotate.php"></td></a>
</tr></table>
Note you will need to have different folders for the different company, in each of thee folder, you can place as many of that company advert as you want. i think nairaland uses 4 ads for each folder.
« Last Edit: October 03, 2013, 07:10:24 PM by mfoniso »
Please do not PM me questions, ask all your questions in the forum, for others to learn from.

Offline jearile2006

  • Jr. Member
  • **
  • Posts: 85
  • Country: ng
  • Karma: +0/-0
    • Uniport forum
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #7 on: October 10, 2013, 12:07:13 PM »
public_html/ads/local ads/rotate.php
When i copied rotate.php in "ads" folder, the picture of the ads didn't display until i copied it to the same folder wia d ads(bannners) were i.e "local ads" folder. My 1st question is: if i've for instance local ads_1, local ads_2 & local ads_3; doz it mean i must copy rotate.php on each of dz folders??
Secondly, in my ads management, i cudnt locate any position for placing ads inside the first post of every board like d four ads u've on ur forum. And lastly, must it be 4 ads or u cud av more dan 4 on dat position... tanx - i just cant stop asking questions, i hope u don't mind o???
ciao...

Offline mfoniso

  • Administrator
  • Hero Member
  • *****
  • Posts: 2273
  • Country: ng
  • Karma: +0/-0
  • Gender: Male
    • Play Lsit Hub
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #8 on: October 10, 2013, 01:40:18 PM »
Quote
public_html/ads/local ads/rotate.php
When i copied rotate.php in "ads" folder, the picture of the ads didn't display until i copied it to the same folder wia d ads(bannners) were i.e "local ads" folder.
If you go through the tutorial again you will note that i said the rotate.php has to be in thesame folder that your ads are, meaning if you want to display ads from 4 different companies, each of the folder holding this ads most contain the rotate.php
Quote
My 1st question is: if i've for instance local ads_1, local ads_2 & local ads_3; doz it mean i must copy rotate.php on each of dz folders??
Yes.
Quote
Secondly, in my ads management, i cudnt locate any position for placing ads inside the first post of every board like d four ads u've on ur forum
There is no position for this in the ads management mod, it require some modifications, however i am preparing a tutorial on this, which i will soon make available.
Quote
And lastly, must it be 4 ads or u cud av more dan 4 on dat position... tanx
Its not a most, you can have as many as you want 8)
Please do not PM me questions, ask all your questions in the forum, for others to learn from.

Offline jearile2006

  • Jr. Member
  • **
  • Posts: 85
  • Country: ng
  • Karma: +0/-0
    • Uniport forum
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #9 on: October 10, 2013, 07:04:36 PM »
Tanx... can't wait for it!

Offline mfoniso

  • Administrator
  • Hero Member
  • *****
  • Posts: 2273
  • Country: ng
  • Karma: +0/-0
  • Gender: Male
    • Play Lsit Hub
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #10 on: October 14, 2013, 11:54:59 AM »
You welcome, now you can go through the tutorial on How to Insert Allstudentforum type of ads within smf forum first post as i promised
« Last Edit: October 14, 2013, 12:19:33 PM by mfoniso »
Please do not PM me questions, ask all your questions in the forum, for others to learn from.

Offline everest9

  • Newbie
  • *
  • Posts: 1
  • Country: ng
  • Karma: +0/-0
    • Xtremeloaded Forum
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #11 on: January 01, 2015, 12:47:08 AM »
Great tips and hope it can work in every website template

Offline rioemmanuel

  • Newbie
  • *
  • Posts: 1
  • Country: ng
  • Karma: +0/-0
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #12 on: November 18, 2016, 04:06:25 PM »
How can I install the downloaded script into a folder in the root server(this sounds too technical) I'm just a newbie and I really need to get some advert running for some brands today. Please explain using the simplest term

Offline mfoniso

  • Administrator
  • Hero Member
  • *****
  • Posts: 2273
  • Country: ng
  • Karma: +0/-0
  • Gender: Male
    • Play Lsit Hub
Re: How To Insert Nairaland Type Of Ads On Your SMF Forum
« Reply #13 on: November 18, 2016, 05:12:48 PM »
@rioemmanuel, You will need to follow the above instruction step by step. You can locate your root server in the cpanel, under your file manager folder. it is usually named public_html. In this folder will you drop the download zipped file after you most have extracted it. Once you have locate the public_html, the path should look like this public_html/your ads folder (Note this is what i mean public_html/ads)
Please do not PM me questions, ask all your questions in the forum, for others to learn from.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
10 minus 10 = ?:
What letter is missing in this word 'Gogle':

Related Topics

  Subject / Started by Replies Last post
2 Replies
1174 Views
Last post November 20, 2013, 09:51:07 PM
by mfoniso
0 Replies
1955 Views
Last post October 14, 2013, 12:24:12 PM
by mfoniso
0 Replies
2399 Views
Last post January 04, 2014, 02:26:23 AM
by mfoniso
5 Replies
710 Views
Last post February 06, 2015, 05:51:21 PM
by mfoniso
0 Replies
97 Views
Last post May 29, 2017, 10:29:54 AM
by mfoniso