Jump to content

Disable ads individual pages


IPBGallery.com

Recommended Posts

  • 8 months later...

@EugeneZybov

ACP > Themes > Edit HTML and CSS
Templates > core > front > global > globalTemplate

Find:

{advertisement="ad_global_header"}

Replace with following:

{{if !(\IPS\Request::i()->app == 'core' and request.module == 'system' and \IPS\Request::i()->controller == 'register' or \IPS\Request::i()->controller == 'login' or \IPS\Request::i()->controller == 'lostpass' or \IPS\Request::i()->controller == 'page')}}
                      {advertisement="ad_global_header"}
{{endif}}

This will disable the global header Ad on Register, Login, Lost Password and "Page".

Here "Page" means that pages build using the Pages app.

So, the key is this code:

or \IPS\Request::i()->controller == 'register'

Keep on adding this code one after the other and simply change the Real URL controller page syntax. You can find it under: ACP > Advanced Configuration > Friendly URLs

The same goes for global footer Ads. Find:

{advertisement="ad_global_footer"}

Replace with following:

{{if !(\IPS\Request::i()->app == 'core' and request.module == 'system' and \IPS\Request::i()->controller == 'register' or \IPS\Request::i()->controller == 'login' or \IPS\Request::i()->controller == 'lostpass' or \IPS\Request::i()->controller == 'page')}}
                      {advertisement="ad_global_footer"}
{{endif}}

Cheers

Link to comment
Share on other sites

I don't think that's easily possible without installing a plugin to set some global variable when on an error page. A variable that you could then access in the templates. 

I tried a bit, but couldn't find a way to do it, and the code doesn't seem to provide a value someone can check either. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...