show_custom_ads

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

show_custom_ads

Harvey
Guys I am totally confused about how to show custom ads.

Right now I have three VT ads?

VT_ad_1
VT_ad_2
VT_ad_3

I can't figure out how #3 is working or of #2 is even in play.

Can I just have two VT ads?

One will be called:  MRG_ad
The other will be called: Worth_ad

The MRG ad is the top ad on this page:

http://directory.nyskiblog.com/Vermont-Ski-Areas-f5001365.html

The Worth ad is the bottom ad on this page:

http://directory.nyskiblog.com/Vermont-Ski-Areas-f5001365.html

Also I have some other ads serving from a macro called:

h_widget

Can we consolidate all of my custom ad serving into one system and then explain it to me so I can ad and remove ads myself?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Pedro <Nabble>
I don't remember now, we have made so many changes. I renamed the macros as you want.
Check your ads file at the advanced naml editor.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey
I think it would make sense to have a fully thought out and integrated system for forum admins to control their own advertising. It would bring revenue to Nabble and Admins.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Pedro <Nabble>
I guess 90% of our users use an ad web tool like, for example Google adsense. So that, they have their own control panel to check everything.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey
Pedro <Nabble> wrote
I guess 90% of our users use an ad web tool like, for example Google adsense. So that, they have their own control panel to check everything.
I do use adsense.  I get opportunities to sell individual units for much more than adsense could produce.  It would be idea to be able to use adsense across the whole site but pick specific spots for custom ads.

Basically I am doing that now, I just don't know how to make changes, or add new ad units, without asking you guys for help.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey
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!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Pedro <Nabble>
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.
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey
Pedro please help asap.

I tried to fix this and my ads are gone.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey
I had save the original code on the side and just placed it back in and ads are still gone.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Pedro <Nabble>
In reply to this post by Harvey
Where your ads are placed? Your forum seems to be ok.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey
Are you seeing ads between the first and second post?

I don't.

When I did the code edit I got code in red. But once you told me that was ok so I hit save and it took it.

But I am not seeing any ads in any browser.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Pedro <Nabble>
In reply to this post by Pedro <Nabble>
Were they from google adSense?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey
Yes. The original code that was in there an hour ago is back in. (I think I did it right).

Are you seeing ads? I'm not.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey
Here's is the code as it stands now. It was working before. Ideally I'd like to remove the code for the first unit because I am not using that size:

 <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> 
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Pedro <Nabble>
I don't know how this code was working. I fixed as I think is the correct one. Please, if you see anything wrong, back it to one who used to work until I can see it again.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey

Not exactly sure what you are saying.

We were only displaying the ad after the first post not the second ad at the bottom of the page.

Also we had some padding between the ad unit and the bottom of the signature.

(via mobile)

On Oct 12, 2013 4:35 PM, "Pedro &lt;Nabble&gt; [via Nabble Support]" <[hidden email]> wrote:
I don't know how this code was working. I fixed as I think is the correct one. Please, if you see anything wrong, back it to one who used to work until I can see it again.
My test forum.



If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/show-custom-ads-tp7585894p7587229.html
To unsubscribe from show_custom_ads, click here.
NAML
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey
Pedro,

The ad should be BELOW the first post area not in it:

HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey
The ad unit should be outside the classic message div:

HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Harvey
In reply to this post by Harvey
I did this:
 <override_macro name ="show_custom_ads" parameters="location" requires="servlet" >
    
    <n.if.regex_matches text="[n.location/]" pattern="(first_classic_message)">  
        <then>  
            
            <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="margin: 2em 0 -1em 0; 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>
        </then>  
    </n.if.regex_matches>             
 
</override_macro>
 
...to remove the ad from the bottom of the page, and to correct the alignment of the ad in the first post. But I can't figure out how to put the ad BETWEEN the first and second post, instead of INSIDE the first post.
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: show_custom_ads

Pedro <Nabble>
Please, see if it is correct now.
My test forum.
12