Jump to content

Is it possible to create an empty sidebar (for ads to show up there)?


Go to solution Solved by Morrigan,

Recommended Posts

I need a sidebar in order for ads to be automatically displayed in the sidebar. 

However the only way I've found to create a sidebar is to open the builder and create a small widget (a small text widget). Now I have my small text widget and the ads automatically shows up below. But I would prefer to not have that small text widget at all. 

Is there a solution? Thanks!

Link to comment
Share on other sites

Thank you, however that did not work as expected unfortunately. 

First, the sidebar ad is stuck to the content on its left with no padding, unlike a real sidebar. 

Second, the sidebar ad that is supposed to turn into a sticky ad (stays in place while scrolling down) once it reaches the top of the viewport, completely disappears when you scroll down (and the forum content becomes full width again). 

image.thumb.gif.ea8884f0bd88b22e56859917420b2d9e.gif

Edited by Jamynee
Link to comment
Share on other sites

9 minutes ago, Jamynee said:

Second, the sidebar ad that is supposed to turn into a sticky ad (stays in place while scrolling down) once it reaches the top of the viewport, completely disappears when you scroll down (and the forum content becomes full width again). 

You would need to contact your advertisement provider for assistance with this. Unfortunately, this is a feature of the ad, not our software. It may be, it needs to be implemented somewhere special.

 

9 minutes ago, Jamynee said:

First, the sidebar ad is stuck to the content on its left with no padding, unlike a real sidebar. 

I am unable to reproduce this so you will also want to check your theme and advertisement. Here is a screenshot of the padding I am seeing which is normal with anything in the sidebar.

image.png

Link to comment
Share on other sites

4 minutes ago, Jamynee said:

Thank you Jim. 

The reason I was thinking this may be an issue with Invision was because once I add a widget (any widget), everything behaves as expected, both the sicky part, and the padding part: 

image.thumb.gif.160737b5812e601edad4205f5a03d0a2.gif

You would need to contact your advertisement provider and ensure that the requirements are being met. It could be the advertisement requires something which is being fulfilled by the block above being there. I'm afraid, we are unable to provide assistance to third party scripts.

Link to comment
Share on other sites

Marc Stridgen
This post was recognized by Marc Stridgen!

"I'm sure others will find this helpful too :)"

Nathan Explosion was awarded the badge 'Helpful' and 10 points.

When the sidebar is displayed normally, this is what contains all the widgets within it:

<div id="ipsLayout_sidebar" class="ipsLayout_sidebarright " data-controller="core.front.widgets.sidebar">
	<div class="cWidgetContainer " data-controller="core.front.widgets.area" data-role="widgetReceiver" data-orientation="vertical" data-widgetarea="sidebar">
		<ul class="ipsList_reset">
        	[EACH WIDGET THEN HAS ITS OWN <li></li>]
		</ul>
	</div>
</div>

When the advertisement is set to be shown in the sidebar is used, the ad is displayed in the sidebar as follows:

<div data-role="sidebarAd">TEST</div>
<br>
<br>
<div id="ipsLayout_sidebar" class="ipsLayout_sidebarright " data-controller="core.front.widgets.sidebar">
	<div class="cWidgetContainer " data-controller="core.front.widgets.area" data-role="widgetReceiver" data-orientation="vertical" data-widgetarea="sidebar">
		<ul class="ipsList_reset">
        	[EACH WIDGET THEN HAS ITS OWN <li></li>]
		</ul>
	</div>
</div>

And then when there are no widgets and the advertisment setting to force sidebar is used, you just get this:

<div data-role="sidebarAd">TEST</div>
<br>
<br>

If you really are not going to have any widgets displayed, then maybe make this the code for the advertisment instead:

<div id="ipsLayout_sidebar" class="ipsLayout_sidebarright">TEST</div>
Link to comment
Share on other sites

On 4/27/2022 at 6:08 PM, Morrigan said:

If you have pages you could try adding a custom block with an empty div in it.

Great! I did that and it works! Thanks a lot for the simple idea. 

And thank you too @Nathan Explosionfor the detailed code, I'm sure this will come in handy at one time or another, I appreciate the help as well. 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...