Advertisement:

Author Topic: Help with Login template?  (Read 460 times)

Offline drewactual

  • Full Member
  • ***
  • Posts: 694
    • College Football Fan Site CFB51
Help with Login template?
« on: January 23, 2018, 10:12:09 PM »
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!!!

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,559
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Help with Login template?
« Reply #1 on: January 23, 2018, 10:14:14 PM »
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

Offline drewactual

  • Full Member
  • ***
  • Posts: 694
    • College Football Fan Site CFB51
Re: Help with Login template?
« Reply #2 on: January 23, 2018, 10:21:45 PM »
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... :)

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,625
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Help with Login template?
« Reply #3 on: January 23, 2018, 10:51:24 PM »
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.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"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

Offline drewactual

  • Full Member
  • ***
  • Posts: 694
    • College Football Fan Site CFB51
Re: Help with Login template?
« Reply #4 on: January 23, 2018, 10:55:41 PM »
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.

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,625
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Help with Login template?
« Reply #5 on: January 23, 2018, 11:10:36 PM »
Something like this could work I think

If your ad is a simple echo in index.template, basically showing on all pages like this
Code: [Select]
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
Code: [Select]
$excluded_actions = array('login','login2','register','register2');
Then add an if statement to the actual ad code
Code: [Select]
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.
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"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

Offline drewactual

  • Full Member
  • ***
  • Posts: 694
    • College Football Fan Site CFB51
Re: Help with Login template?
« Reply #6 on: January 23, 2018, 11:26:10 PM »
this is beautiful!!!!!!
 
thank you a ton!!!!!

very very much appreciate your help!!!!!

Offline Aleksi "Lex" Kilpinen

  • A Peculiar Finn
  • Lead Support Specialist
  • SMF Super Hero
  • *
  • Posts: 18,625
  • Gender: Male
  • Don't worry, I'm n00b friendly
    • Aleksi.Kilpinen on Facebook
    • LexArma on GitHub
    • aleksi-kilpinen on LinkedIn
    • There's No Place Like 127.0.0.1
Re: Help with Login template?
« Reply #7 on: January 23, 2018, 11:28:38 PM »
You are welcome :)
A Finnish Support Specialist
 Happily running multiple SMF 2.0 installations.
  Fooling around with an i7 990X @ 3,47Ghz / 12Gb / Win 10 x64 / 3840x2160


How you can help SMF

"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