Login  Register

Re: show_custom_ads

Posted by Harvey on Oct 12, 2013; 6:39pm
URL: https://support.nabble.com/show-custom-ads-tp7585894p7587218.html

Here is my forum code for show_custom_ads:

     <override_macro name ="show_custom_ads" parameters="location" requires="servlet" >
    <n.if.equal value1="[n.location/]" value2="widget">  
        <then>  
            <div class="ad">
                <script type="text/javascript">                  
                    google_ad_client = "ca-pub-0156740191883467";
                    /* Small-Square */
                    google_ad_slot = "1736553008";
                    google_ad_width = 200;
                    google_ad_height = 200;
                    google_page_url = "<n.current_url/>";
                </script>
                <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
                </script> 
            </div>
        </then>  
        <else>  
            <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>             
        </else>  
    </n.if.equal> 
</override_macro>    

The code was brought over from my other apps that show a 200 x 200 ad. But my forum only shows 728 x 90.

Can you show me what lines to remove to eliminate the code for the 200 in the forum?  I tried several option but keep getting an error.
HTTPS Please!