How to Insert Allstudentforum type of ads within smf forum first post.
If you have been a regular user of all student forum, you most have notice the placement
of our sponsored ads within our first post and most of you have been asking how you could
also do this for your smf forum. This was actually inspired by my desire on How to place Nairaland type of ads on my smf forum
Hoever i am here today to guide you guys through on how you can also do
How to place Allstudentforum type of ads within smf forum first post.
To do this, follow the steps bellow.
1. Log Into Your Control panel, where your files are hosted in the root server of your site, that is public_html
2. Navigate and click on the Themes Folder .
3. Then Click on Default folder.
4. Select Display.template.php file and click Edit your.
After the Edit page has opened, Find this code bellow by press Ctrl+F on your keyboard and then typing or copy and paste the code in the find box.
<div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>
Once you have located the code, then replace the code with this one bellow.
<div class="inner" id="msg_', $message['id'], '"', '>';
if ($message['id'] == $context['first_message'])
<div style="float:right; width:308px;">
<table width="308" height="190" border="0" cellspacing="5" cellpadding="1">
<td><a href="Company website 1"><img src="Yoursite.com/Company website 1 ads" /></td>
<td><a href="Company website 2"><img src="Yoursite.com/Company website 2 ads" /></td>
<td><a href="Company website 3"><img src="Yoursite.com/Company website 3 ads" /></td>
<td><a href="Company website 4"><img src="Yoursite.com/Company website 4 ads" /></td>
', $message['body'], '</div>
Now you can save this changes. Remember to replace the company website with the real website link of the company you which to advertise and also make sure
the image source of the company ads is correct. this what i mean, replace the Yoursite.com/Company website 1 ads, with the real location of your website link
holding the company ads.Finally to make the ads rotate every time a user or quest visit your site
, you will need to download this php script that has been put together to help you achieve this, download this php script
and follow this step bellow.
To install the script, simply download it and place it in any folder, preferably the one that holds your ads in your root server. How ever in this default configuration, all ads (banner, image, etc) from the folder where the script is located will been display.
Now once you have this script on your server, remember to place the script in the same directory or folder where the company ads will be located. if you have 4 folder for your different company, make sure you copy the rotate.php into those 4 folder.
That is all.
, ask your questions and i will answer them for you.