View Full Version : Easy Way To Ad Google Adsense & More Anywhere
shadav
12-19-2006, 11:29 PM
Unfortunately before I decided to find out if there were support forums lol I played around and trail and error til I figured out you can not make google adsense work! After much headache lol I finally, ditch effort, tried it as an include and it works! Create a file named whatever.tpl...mine's named google.tpl and save it into your /public_html/directory/templates folder then wherever you want your google adsense to be just put this snipt in Content visible to registered users only. this also works for any other programs...like trafficswarm, adbrite...ect...for each new code you'll need to create a new tpl file and then just use the include script with the file name
proprod
12-19-2006, 11:31 PM
Adsense works fine, use {literal} tags. The way you're doing it now is the recommended way anyway, though :)
shadav
12-20-2006, 12:00 AM
lol yeah i just saw a thread somewhere that mentioned sorrounding the code with {literal} {/literal} figures...oh well :p
lol i'm just glad it finally worked :D cuz I was really gettin frustrated with it!
victoriavain
04-20-2007, 04:33 PM
Is this {literal} tag really important to put around basically all script on your directory? I have tracking codes and more that is not visable too. Does it make it easier on the spiders to keep all script inside a literal tag?
James
04-20-2007, 04:50 PM
no it's more for the smarty parsing. When you use literal tags smarty does not parse anything between them. It takes the code 'literally'.
Think of the {literal} {/literal} tags as a 'What you see, is what you get' for everything inbetween the tags.
notes
04-25-2007, 05:13 PM
I tried this with adrotate.php but gives me the following erro:
"Fatal error: Smarty error: [in adrotate.php line 31]: syntax error: unrecognized tag: $num=0; (Smarty_Compiler.class.php, line 439)"
any suggestions?
thanks,
droolingmnky
04-26-2007, 01:45 AM
if your using PHP then you'll need to encase it within {php} {/php} tags.
navjotjsingh
06-19-2007, 04:47 PM
Cool...I never knew about literal tags. Even I was very frustrated why the code is not working. Now it works!
msolution
06-19-2007, 09:58 PM
you could check the adsense mod here
http://www.dir.vc/free-phpld-mods/
its based on the same principle... but increased functionality
Regards
M.
vBulletin® v3.8.0, Copyright ©2000-2012, Jelsoft Enterprises Ltd.