Help with Login template?

Started by drewactual, January 23, 2018, 10:12:09 PM

Previous topic - Next topic

drewactual

ad(no)sense has determined that my login page violates their policy of not having 'inventory' and have restricted ads pushed to the site.

so i have three choices as i see it... (1) pull the ads (need the $) so nope... (2) build some sort of free standing pop-up for login without the site template (complication) so nope... (3) add 'inventory' to the page (YUP!!!!)

my first idea was to simply stack some SSI on the login.template, but apparently this doesn't work within SMF (inside the loop for lack of better terms), so....

how would this be done? 

Many thanks in advance!!!

vbgamer45

Add a check for your ad placments to make sure they appear on login2 or login2 actions.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

drewactual

the ads don't have any problem loading on the page when adsense is pushing them, it's that the page has no content other than the login form, and they have decided 'lack of inventory' (basically, no content) is cheating... and have restricted push's to the overall site because of...

it seems to me the easiest way out of this is to add content to the page such as SSI's "recent topics" and maybe some other stuff like memberlist and .... well, you get the idea.. this would meet their criteria of 'content'...

are you suggesting I add the SSI (or equiv content) via your ad placement mod?  I guess that would work too if i used php in the code with the require ssi statement?

man, i appreciate your help.

edited to add: I tried to get clever and made a robots.txt to exclude that (?=login) from their indexing, but.... i guess now that they're onto it they're simply on to it... so no dice.  the 'right' column is the issue- down the right side of the forum, which is placed their via hard coding in the index.template and not via admanager, and in effort to be able to use the same visual effect outside the forum as within and cut down on php calls while rendering the page... i don't know how to exclude that on a function call (login=true) rather than a page that's controlled by a template.  lost in the sauce, here... :)

Aleksi "Lex" Kilpinen

Couple of simple pointers from experience:

One, Adsense has it's own bot that WILL crawl all urls that load their ads.

Two, placing their ads on pages that are only for logins, redirections etc. is against Adsense rules, and so you should be working to avoid it from happening, not to make it look like a content site and enable it. Adsense doesn't take kindly to rule breakers, and worst case scenario:
You temporarily or permanently lose ad revenue completely because Adsense decides to punish you.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

drewactual

i'm ALL about doing this right... believe me... I just don't know how. 

how do you break the template to exclude a division for the login form page exclusively?  If i can do this, i'd be happy... but...

adding content to the login should be simpler, and it's NOT cheating... it's the same thing as the forum home page.

Aleksi "Lex" Kilpinen

Something like this could work I think

If your ad is a simple echo in index.template, basically showing on all pages like this
echo '<img src="http://www.example.com/ad.png" />';

Then create an array of actions where you do not want them to show, before showing the ad code
$excluded_actions = array('login','login2','register','register2');

Then add an if statement to the actual ad code
if (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], $excluded_actions))
    echo '<img src="http://www.example.com/ad.png" />';



Didn't test this, but should be a working example.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

drewactual

this is beautiful!!!!!!

thank you a ton!!!!!

very very much appreciate your help!!!!!

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: