SMF Ads Support Forum

Support => General Support => Topic started by: armada on January 06, 2014, 05:31:07 am

Title: HOWTO: Disable ads in pages actions Register, Login, Reminder, Activate
Post by: armada on January 06, 2014, 05:31:07 am
Hiya,

You may find that some users are confused by adverts on the Registration pages, as well as the Login, Reminder (forgot password/username page) and the Activation pages.

They may think that the ads are part of your site's contents and could potentally be duped by unscrupulous advrtisers.

To prevent that, go to:

Sources/LoadAds.php

(Make a copy of the file first in case you make a mistake), noting the singe quotes, square brackets and the correct spacing (no spaces between the ==).

Find:
Code: [Select]
        //For security reasons, we don't want to display ads if the action is "admin" or "admod"
        if(isset($_REQUEST['action']) && ($_REQUEST['action'] == 'admod' || $_REQUEST['action'] == 'admin' ' ))
                return ;

Replace with:
Code: [Select]
        //For security reasons, we don't want to display ads if the action is "admin", "admod", "register", "login", "reminder", or "activate"
        if(isset($_REQUEST['action']) && ($_REQUEST['action'] == 'admod' || $_REQUEST['action'] == 'admin' || $_REQUEST['action'] == 'register' || $_REQUEST['action'] == 'login' || $_REQUEST['action'] == 'reminder' || $_REQUEST['action'] == 'activate' ))
                return ;

All the best,
Armada