Google AdSense (General)

by bboy121, Tuesday, February 02, 2010, 11:34 (5213 days ago)

Ok guys, I need to be frank here. My knowledge of php is quite limited. i am good with the syntax but dont have much experience working with php functions. I just downloaded MLF. I like it alot but I want to place google ads on my forum. I know I can place the google code inside the template.html file but thats not the problem. The problem is that, the ads are being displayed on the login and the register pages too and that does against googles TOS. So I need a work around to that. From inside the template.html file, I need to check if the page being called is login.php or register.php. If it is, I dont want the ads to be displayed, or else I want them to be. Please, I need to do this soon. I just replaced my old forum with this one. I get alot of visitors on my website.

Thanks in advance to whoever helps me out

locked
4753 views
Avatar

Google AdSense

by Alex ⌂, Tuesday, February 02, 2010, 14:09 (5212 days ago) @ bboy121

Which version do you use? Sounds like the 1.* branch (template.html)?

Alex

locked
4597 views

Google AdSense

by bboy1211, Thursday, February 04, 2010, 10:30 (5211 days ago) @ Alex

Sorry, I am using the latest version. I meant to say main.tpl.

locked
4597 views
Avatar

Google AdSense

by Alex ⌂, Thursday, February 04, 2010, 11:49 (5211 days ago) @ bboy1211

If something should be displayed only for not logged in users:

{if !$user}<p>Hi unknown user!</p>{/if}

If the code contains JavaScript you might need to enclose it in {literal}...{/literal}:

{if !$user}{literal}Code goes here ...{/literal}{/if}

Alex

locked
4790 views

Google AdSense

by Monty Chadha ⌂ @, New Delhi, Wednesday, June 08, 2016, 19:39 (2894 days ago) @ bboy121

I don't think that placing adsense ads on register or login page is so offensive that it leads to account termination.

I believe that invalid hits on adsense advertisement is main reason that might lead to account terminations. Apart from that posting ads on adult or porn sites or prompting user to click ads is offensive and google might take action.

Have seen son many wordpress sites where google ads are being posted on registration and login pages.

locked
3065 views

RSS Feed of thread