PDA

View Full Version : Help needed to Hide ads from Lost password page


Katoona
01-22-2020, 11:45 PM
Google is nagging about my ads showing in ".../login.php?do=lostpw" page, and I need to make a conditional statement to hide Google ads from this page.

I am using <vb:if condition="!in_array($GLOBALS['threadid'], array(30016,53421,94993))"> to hide ads from spesific threads that contain content not accepted by Mr. G, but I cant figure out how to hide it from "Lost password" page as mentioned above.

Can anybody help? I am using VB4.2

iA1
01-23-2020, 03:25 AM
Add a new plugin at hook location: replacement_vars

Paste the following code:

if (defined('VB_ERROR_PERMISSION') OR (THIS_SCRIPT == "login"))
{
$find = '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js';
$replace = '';
$newtext = str_replace($find, $replace, $newtext);

$find = '(adsbygoogle = window.adsbygoogle || []).push';
$replace = '';
$newtext = str_replace($find, $replace, $newtext);
}



Install this addon as well: https://vborg.vbsupport.ru/showthread.php?t=326045

Katoona
01-23-2020, 03:09 PM
This worked beautifully. Thanks a lot. I would not have figured this out in a million years :)

I have not recieved any emails regarding Error pages, so I will hold on installing Mr. Bird's addon, but I have bookmarked it in case I need to.