Author Topic: HOWTO: Disable ads in pages actions Register, Login, Reminder, Activate  (Read 7153 times)

0 Members and 1 Guest are viewing this topic.

Offline armada

  • Newbie
  • *
  • Posts: 1
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

SMF Ads Support Forum


 

.