SimplePortal
Customization => Custom Coding => Topic started by: waruna on February 28, 2010, 01:00:38 AM
-
Hello guys, 2 quick question:
1) Can someone help me how to put an ads at portal index? I tried to add a top/bottom html block, but the ads is 700px width, so the block appears to have a scrollbar navigation and that is not nice to see. How can I remove the scrollbar? :'(
2) How to put google ads in correct way? Because seems to me the ads doesn't appear at all. I tried to insert the script inside <body> </body> tag also can't help. I tested the script using manual html/php file and the ads perfectly works. Am I done something wrong?
Thanks in advance.
-
Anyone? :(
-
Regarding
1. Is the advert a banner? if so could you resize it?
2. Are the permissions set so adverts can be seen?
-
You may use the Ad management mod (http://custom.simplemachines.org/mods/index.php?mod=255) and edit the portal index where you can ad the proper code.
For instance, after installing "Ad management mod", if you would like to add an ad right below the menu, you should ad the following code:
//Below the menu ads
if (function_exists("show_indexAds"))
{
$ads = show_indexAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
echo '
<br class="clear" />';
Unfortunately i don't know which file you should edit and where you should put the above code; maybe someone will guide us, because i'm having the same issue.
-
It should go into the Portal.template.php file. If you want it at the top, in template_portal_above() or if you want it at the bottom, in template_portal_below() function.