HTML widgets in sidebars?

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

HTML widgets in sidebars?

Harvey
This post was updated on .
Would love to be able to make use of the space  below the adsense ad.



Possible to add that functionality?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Pedro
Harvey44 wrote
Possible to add that functionality?
I didn't understand which functionality do you want to add there? An html widget?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Harvey
Pedro <Nabble> wrote
Harvey44 wrote
Possible to add that functionality?
I didn't understand which functionality do you want to add there? An html widget?

Yes. Within the div on the sidebar, would it be possible to add html widgets?
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Pedro
You can edit your sidebar_widget macro. After edit it, your macro should be like this:
<override_macro name="sidebar_widget" requires="node_page,servlet">
    <n.actions_widget/>
    <n.people_widget/>
    <n.subscribe_widget/>
    <n.categories_widget/>
    <n.archives_widget/>
    <n.ads_widget />
    ---- your div here -----
</override_macro>
with your html widget at line 8, that is the area  below the adsense ad.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Harvey
Wow that's cool.  Does my div need to be inside nabble tags?

Here's my div:

<raw><div style="text-align: center;">
<a href="http://www.nelsap.org/book.html" rel="nofollow" target="_blank"><img src="http://nyskiblog.com/wp-content/uploads/2012/07/Lost-Ski-Areas-Southern-Adirondacks.jpg" style="border: solid #000000; border-width: 1px" alt="Lost Ski Areas of S Adk" width="180"/></a></div>

<div style="color: #ffffff; text-align: center;"> <span style="font-size: normal;">Order Your Copy Today!</span></div></raw>



On Tue, Jul 31, 2012 at 2:18 PM, Pedro <Nabble> [via Nabble Support] <[hidden email]> wrote:
You can edit your sidebar_widget macro. After edit it, your macro should be like this:
<override_macro name="sidebar_widget" requires="node_page,servlet">
    <n.actions_widget/>
    <n.people_widget/>
    <n.subscribe_widget/>
    <n.categories_widget/>
    <n.archives_widget/>
    <n.ads_widget />
    ---- your div here -----
</override_macro>
with your html widget at line 8, that is the area  below the adsense ad.


If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/HTML-widgets-in-sidebars-tp7580917p7580948.html
To unsubscribe from HTML widgets in sidebars?, 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
|

Re: HTML widgets in sidebars?

Pedro
It is not necessary, it can be like this:
<override_macro name="sidebar_widget" requires="node_page,servlet">
    <n.actions_widget/>
    <n.people_widget/>
    <n.subscribe_widget/>
    <n.categories_widget/>
    <n.archives_widget/> 
    <n.ads_widget />
    <div style="text-align: center;">
<a href="http://www.nelsap.org/book.html" rel="nofollow" target="_blank"><img src="http://nyskiblog.com/wp-content/uploads/2012/07/Lost-Ski-Areas-Southern-Adirondacks.jpg" style="border: solid #000000; border-width: 1px" alt="Lost Ski Areas of S Adk" width="180"/></a></div>
 
<div style="color: #ffffff; text-align: center;"> <span style="font-size: normal;">Order Your Copy Today!</span></div>
</override_macro> 
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Pedro
In reply to this post by Harvey
Harvey, there is a better way to edit that macro. You can use the <n.overridden/> tag, so it will be like this:
<override_macro name="sidebar_widget" requires="node_page,servlet">
    <n.overridden />
        <div style="text-align: center;">
<a href="http://www.nelsap.org/book.html" rel="nofollow" target="_blank"><img src="http://nyskiblog.com/wp-content/uploads/2012/07/Lost-Ski-Areas-Southern-Adirondacks.jpg" style="border: solid #000000; border-width: 1px" alt="Lost Ski Areas of S Adk" width="180"/></a></div>
 
<div style="color: #ffffff; text-align: center;"> <span style="font-size: normal;">Order Your Copy Today!</span></div>
</override_macro> 
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Harvey
So....

This code will make the div I insert appear EVERYWHERE the sidebar appears correct?

Would it be possible to determine specificially which sub apps got the div?

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

Re: HTML widgets in sidebars?

Harvey
What i really want is to only display that ad (div above) if there is room in the sidebar without lengthening the page.

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

Re: HTML widgets in sidebars?

Pedro
In reply to this post by Harvey
Do you want to use it in your blog? Are there any sub app inside it?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Harvey
Not sure I understand.

I was trying to use nabble space in the side bar.

Ideally I'd like the code to say "insert this ad unit if there is at least XXXpixels available. (vertical measurement).
HTTPS Please!
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Pedro
Ok, I'll make this code for you.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Harvey
Wow. Dream it and the dream comes true.

On Tue, Jul 31, 2012 at 10:47 PM, Pedro <Nabble> [via Nabble Support] <[hidden email]> wrote:
Ok, I'll make this code for you.


If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/HTML-widgets-in-sidebars-tp7580917p7580958.html
To unsubscribe from HTML widgets in sidebars?, 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
|

Re: HTML widgets in sidebars?

Pedro
Will you use it in your magazine?
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Harvey
I don't think I have any empty sidebar space in the magazine. Let's just try the directory.

On Tue, Jul 31, 2012 at 11:24 PM, Pedro <Nabble> [via Nabble Support] <[hidden email]> wrote:
Will you use it in your magazine?


If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/HTML-widgets-in-sidebars-tp7580917p7580960.html
To unsubscribe from HTML widgets in sidebars?, 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
|

Re: HTML widgets in sidebars?

Pedro
Harvey,
please edit your sidebar_widget macro, in your Directory, paste this code:
<override_macro name="sidebar_widget" requires="node_page,servlet">
    <n.overridden />
    <n.put_in_head.>
		<script type='text/javascript'>
			$(document).ready(function(){
				var footer_pos = $("table.footer-table").position().top;
				var ad_pos = $("div.ad").position().top;
				var ad_h = 220;
				var widget_h = 272;
				if(footer_pos - ad_pos > (ad_h +widget_h))
					$("#h-widget").show();
			});
		</script>
	</n.put_in_head.>    
	<div id='h-widget' class="invisible">
		<div style="text-align: center;">
		<a href="http://www.nelsap.org/book.html" rel="nofollow" target="_blank"><img src="http://nyskiblog.com/wp-content/uploads/2012/07/Lost-Ski-Areas-Southern-Adirondacks.jpg" style="border: solid #000000; border-width: 1px" alt="Lost Ski Areas of S Adk" width="180"/></a>
		</div> 
		<div style="color: #ffffff; text-align: center;"> <span style="font-size: normal;">Order Your Copy Today!</span></div>  
    </div> 
</override_macro> 
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Harvey
There are two overrides there  - so edit the top one?

SOOO cool.

On Wed, Aug 1, 2012 at 3:19 PM, Pedro <Nabble> [via Nabble Support] <[hidden email]> wrote:
Harvey,
please edit your sidebar_widget macro, in your Directory, paste this code:
<override_macro name="sidebar_widget" requires="node_page,servlet">
    <n.overridden />
    <n.put_in_head.>
		<script type='text/javascript'>
			$(document).ready(function(){
				var footer_pos = $("table.footer-table").position().top;
				var ad_pos = $("div.ad").position().top;
				var ad_h = 220;
				var widget_h = 272;
				if(footer_pos - ad_pos > (ad_h +widget_h))
					$("#h-widget").show();
			});
		</script>
	</n.put_in_head.>    
	<div id='h-widget' class="invisible">
		<div style="text-align: center;">
		<a href="http://www.nelsap.org/book.html" rel="nofollow" target="_blank"><img src="http://nyskiblog.com/wp-content/uploads/2012/07/Lost-Ski-Areas-Southern-Adirondacks.jpg" style="border: solid #000000; border-width: 1px" alt="Lost Ski Areas of S Adk" width="180"/></a>
		</div> 
		<div style="color: #ffffff; text-align: center;"> <span style="font-size: normal;">Order Your Copy Today!</span></div>  
    </div> 
</override_macro> 



If you reply to this email, your message will be added to the discussion below:
http://support.nabble.com/HTML-widgets-in-sidebars-tp7580917p7580965.html
To unsubscribe from HTML widgets in sidebars?, 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
|

Re: HTML widgets in sidebars?

Pedro
Yes, you will only be able to edit the top one.
My test forum.
Reply | Threaded
Open this post in threaded view
|

Re: HTML widgets in sidebars?

Harvey
In reply to this post by Pedro
Sorry to be slow.

Replace this:

<override_macro name="sidebar_widget" requires="node_page,servlet">
    <n.actions_widget/>
    <n.people_widget/>
    <n.subscribe_widget/>
    <n.categories_widget/>
    <n.ads_widget />
</override_macro>

with this:  (?)

<override_macro name="sidebar_widget" requires="node_page,servlet">
    <n.overridden />
    <n.put_in_head.>
		<script type='text/javascript'>
			$(document).ready(function(){
				var footer_pos = $("table.footer-table").position().top;
				var ad_pos = $("div.ad").position().top;
				var ad_h = 220;
				var widget_h = 272;
				if(footer_pos - ad_pos > (ad_h +widget_h))
					$("#h-widget").show();
			});
		</script>
	</n.put_in_head.>    
	<div id='h-widget' class="invisible">
		<div style="text-align: center;">
		<a href="http://www.nelsap.org/book.html" rel="nofollow" target="_blank"><img src="http://nyskiblog.com/wp-content/uploads/2012/07/Lost-Ski-Areas-Southern-Adirondacks.jpg" style="border: solid #000000; border-width: 1px" alt="Lost Ski Areas of S Adk" width="180"/></a>
		</div> 
		<div style="color: #ffffff; text-align: center;"> <span style="font-size: normal;">Order Your Copy Today!</span></div>  
    </div> 
</override_macro> 


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

Re: HTML widgets in sidebars?

Harvey
Wow it works.

I'd like to put my ad above the adsense ad.

Also it seems that now the ARCHIVES are showing. I THINK we had prevented those from showing.
HTTPS Please!
12