[SMF-Mkportal]Ads

dsfreak

New Member
Messages
1,338
Reaction score
0
Points
0
Ok, saw that no one made something like this, and since tyler helped me with it, I figured I would share with all!Anyhow:


Edit: Grr...... fogot what file this is all in, it should be in (mkportal root)/templates/(your template)/tpl_main.tpl

Find this part in the code:

PHP:
function view_column_center($blocks) {
global $mklib;

Directly below it, put this: (note this is for x10 Corp hosting)

PHP:
// Global center block hack
$ccode = "
      <tr align=\"center\">
        <td>
      <!-- begin x10 ad -->
<a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a7fb3e9d' border='0' alt=''></a>
      <!-- end   x10 ad -->
        </td>
      </tr>
      ";
$cblock = $this->view_block("x10 Ad", $ccode);
// end Global center block hack
Yes, I know it does not have the javascript part of the ad, but this still works!
Now, the result should be:

PHP:
function view_column_center($blocks) {
global $mklib;
// Global center block hack
$ccode = "
      <tr align=\"center\">
        <td>
      <!-- begin x10 ad -->
<a href='http://x10hosting.com/advert/adclick.php?n=a7fb3e9d' target='_blank'><img src='http://x10hosting.com/advert/adview.php?what=zone:1&amp;n=a7fb3e9d' border='0' alt=''></a>
      <!-- end   x10 ad -->
        </td>
      </tr>
      ";
$cblock = $this->view_block("x10 Ad", $ccode);
// end Global center block hack
return <<<EOF

<!-- begin center column -->
This makes the ad viewable even when the forum is open, unless of course, you don't have the option to view the forum inside of a portal, in which case you have to do it seperately for the forum.

Hope it helped, Andy.
 
Last edited:

n4tec

Active Member
Messages
3,312
Reaction score
0
Points
36
thanx for the tutorial about how to put ads on Mkportal for a SMF forum..
 
Top