Login  Register

One ad in one spot.

classic Classic list List threaded Threaded
8 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

One ad in one spot.

Harvey
1931 posts
I have a 200 x 200 ad sense unit on this page.

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

Anyway to replace it there, and there only with an ad of my own?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: One ad in one spot.

Pedro
2557 posts
Yes, I will prepare the naml for you.
My test forum.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: One ad in one spot.

Pedro
2557 posts
In reply to this post by Harvey
Do you have the code of your ad?
My test forum.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: One ad in one spot.

Harvey
1931 posts
<div style="text-align: center;">
<a href="http://www.worthskis.com/" rel="nofollow" target="_blank"><img src="http://nyskiblog.com/wp-content/uploads/2012/05/Worth-Skis.jpg" alt="Worth Skis" height="200" width="200" /></a></div>

On Thu, Mar 21, 2013 at 11:29 PM, Pedro <Nabble> [via Nabble Support] <[hidden email]> wrote:
Do you have the code of your ad?


If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/One-ad-in-one-spot-tp7583668p7583670.html
To unsubscribe from One ad in one spot., click here.
NAML



--
"Like" us on Facebook: www.facebook.com/NYSkiBlog
Follow us on Twitter: http://twitter.com/nyskiblog
----------
Harvey Road: NYSkiBlog.com
NY Ski Forum: forum.NYSkiBlog.com
NY Ski Magazine: mag.NYSkiBlog.com
NY Ski Directory: directory.NYSkiBlog.com
HTTPS Please!
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: One ad in one spot.

Harvey
1931 posts
In reply to this post by Pedro
Is this something we could replicate in other spots?

On Thu, Mar 21, 2013 at 11:29 PM, Pedro <Nabble> [via Nabble Support] <[hidden email]> wrote:
Do you have the code of your ad?


If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/One-ad-in-one-spot-tp7583668p7583670.html
To unsubscribe from One ad in one spot., click here.
NAML



--
"Like" us on Facebook: www.facebook.com/NYSkiBlog
Follow us on Twitter: http://twitter.com/nyskiblog
----------
Harvey Road: NYSkiBlog.com
NY Ski Forum: forum.NYSkiBlog.com
NY Ski Magazine: mag.NYSkiBlog.com
NY Ski Directory: directory.NYSkiBlog.com
HTTPS Please!
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: One ad in one spot.

Pedro
2557 posts
You should edit your show_custom_ads macro like this:
 <override_macro name ="show_custom_ads" parameters="location" requires="servlet" >
    <n.if.equal value1="[n.location/]" value2="widget">  
        <then>  
            <div class="ad">
				<n.if.equal value1="[n.page_node.id/]" value2="5001365">  
					<then>						
						<div style="text-align: center;">
							<a href="http://www.worthskis.com/" rel="nofollow" target="_blank">
							<img src="http://nyskiblog.com/wp-content/uploads/2012/05/Worth-Skis.jpg" alt="Worth Skis" height="200" width="200" />
							</a>
						</div>
					</then>
					<else>
						<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> 
					</else>
				</n.if.equal>  

            </div>
        </then>  
        <else>  
            <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>
        </else>  
    </n.if.equal> 
</override_macro> 
The code is testing when the app is at that place you want to show the specific ad.
My test forum.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: One ad in one spot.

Harvey
1931 posts
I couldn't figure out which lines to add so I just replaced the whole thing and it worked. !

If I wanted that ad to appear elsewhere could I just add in the node number to that code without duplicating the whole thing?

 <n.if.equal value1="[n.page_node.id/]" value2="5001365, XXXXXXX, XXXXXX">  
HTTPS Please!
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: One ad in one spot.

Pedro
2557 posts
Do you have an idea of how many other places it might be shown?
My test forum.