We are going to add an AdSense JavaScript code in a phpNuke module. For that purpose you will need to enter your CPanel -> File Manager utility and navigate to your PHP-Nuke folder -> modules -> News directory. Edit the article.php file. To insert the code you will have to:
Look for the following code:
$boxtitle = ""._RELATED."";$boxstuff = "<font >";$result8 = $db->sql_query("select name, url from ".$prefix."_related where tid='$topic'");while ($row8 = $db->sql_fetchrow($result8)) { $name = filter($row8['name'], "nohtml"); $url = filter($row8['url'], "nohtml"); $boxstuff .= "<strong><big>·</big></strong> <a href="$url" target="new">$name</a><br>";}
And above it copy and paste the following code:
echo "<table border="0" cellpadding="0" cellspacing="2" bgcolor="#FFFFFF"width="160"><tr><td>n"."<table border="0" cellpadding="0" cellspacing="0" width="160">n"."</table>n"."<table border="0" cellpadding="2" cellspacing="2" bgcolor="#FFFFFF"width="100%">n"."<tr><td align="center">n"."<font size="1"><b>Related Websites</b></font>n"."</td></tr>n"."<tr>n"."<td bgcolor="#FFFFFF"><font size="1">";?><center><script type="text/javascript"><!--google_ad_client = "your client-number";google_ad_width = 120;google_ad_height = 600;google_ad_format = "120x600_as";google_color_border = "FFFFFF";google_color_bg = "FFFFFF";google_color_link = "336699";google_color_url = "000000";google_color_text = "000000";//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></center><?phpecho "</td>n"."</tr>n"."</table></td></tr></table>n"."<br>nnn";
This, although it seems a bit complicated, is very easy to achieve. To do so, just click ctrl+f when the code is fully loaded and search for
$boxtitle = ""._RELATED."";
and above that line copy and paste the code:
Save the file and your AdSense box will appear in the News sections.
Please, do not forget to change your actual Google Adsense code in the above example.