Jump to content


Google Ads


  • You cannot reply to this topic
1 reply to this topic

#1 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 16 November 2004 - 12:17 AM

Google ads in MKportal

Ads in a block
The simplest way to add Google banners MKportal is to put them in a block. Ads will be global if you put them in a left or right block and your forum is inside of the portal. If you put your ad in a center block or your forum opens outside the portal they will display only on the homepage.

Create a php block in the MKportal Admin CP with the code below and insert your Google script where indicated..

Quote


$content ="insert Google ad script here";

?>



Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard

#2 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 16 November 2004 - 12:18 AM

Ads above the center blocks
If you want to put Google ads above the center blocks make the following edit. Ads will be global if your forum is inside of the portal. If your forum opens outside the portal they will display only in the portal modules.

FIND (in mkportal/templates/default/tpl_main.php)
function view_column_center($blocks) {
global $mklib;
return <<<EOF

<!-- colonna di centro -->
	<td valign="top" align="left" width="100%">
 <table cellpadding="0" cellspacing="3" border="0" width="100%">
  <tr><td align="left">

		{$blocks}

 </td></tr>
	</table>
	</td>

EOF;
}
Add the code in red and insert your Google script where indicated.

Quote

function view_column_center($blocks) {
global $mklib;
return <<










(Ad script goes here)



{$blocks}




EOF;
}



Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users