MyBB Community Forums

Full Version: [Resolved] Question on removing ads on certain pages - My Advertisements
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
**Update - .m., your suggestion worked perfectly.  Thank you!

I hate posting questions when I can usually find my answers using 'search', but I'm stumped on this one.  I edited the plugin file, myadvertisements.php, using previous thread suggestions to remove ads from registration and user profiles by adding the following after every global at the start of each function.

if(THIS_SCRIPT == 'member.php' || THIS_SCRIPT == 'usercp.php')
{
   return;
} 
The advertisements indeed to not show up for those pages, but are instead replaced with the zone text at the header and footer:
{myadvertisements[zone_1]} 
&
{myadvertisements[zone_2]}
I'm sure I am missing something simple here, but haven't figure it out.  Any assistance would be appreciated.  Thanks to the creator of this plugin as it works very well.
you can wrap the zones with a div element and add style rules to remove the zones on specific pages
<div class="myadv">{myadvertisements[zone_1]} </div>
<div class="myadv">{myadvertisements[zone_2]} </div>

admin panel >> themes >> your theme >> add style sheet --> myadv.css
attached to --> specific files ;
add another --> usercp.php ; add another --> member.php ; add another --> memberlist.php

Write my own content :
.myadv {display: none;}
.m., yes, that makes sense and should do the trick. Appreciate your prompt response.