Login  Register

Re: show_custom_ads

Posted by Pedro on Oct 12, 2013; 7:07pm
URL: https://support.nabble.com/show-custom-ads-tp7585894p7587219.html

It seems that you would have to remove the first if/then block. Like this:
<override_macro name = "show_custom_ads" parameters="location" requires="servlet" >
    <n.if.regex_matches text="[n.location/]" pattern="(first_classic_message|last_classic_message)">  
        <then>  
        </then>  
        <else>  
            <n.as_html_comments.location/>
            <n.if.not.regex_matches text="[n.location/]" pattern="app_bottom|topic_bottom|search_top">  
                <then>
                    <div class="ad shaded-bg-color rounded" style="padding:.5em 0">
                        <script type="text/javascript">                          
                            google_ad_client = "ca-pub-0156740191883467";
                            /* Leaderboard */
                            google_ad_slot = "9529659947";
                            google_ad_width = 728;
                            google_ad_height = 90;
                            google_page_url = "<n.current_url/>";
                        </script>
                        <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                        </script>
                    </div>
                </then>
            </n.if.not.regex_matches>
        </else>  
    </n.if.regex_matches>       
 
</override_macro>
My test forum.