Bocar Posted January 18, 2018 Report Share Posted January 18, 2018 Hi. I want to put an ad on the sidebar below the first bloc I've placed the tag but there is a problem. The {advertisement="PAVE"} shows but not correctly on desktop, only when you reduce your page.. My code {{$adsForceSidebar = ( \IPS\Settings::i()->ads_force_sidebar AND \IPS\core\Advertisement::loadByLocation( 'ad_sidebar' ) );}} {{if (isset( \IPS\Output::i()->sidebar['enabled'] ) and \IPS\Output::i()->sidebar['enabled'] ) && ( ( isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== '' ) || ( isset( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) && count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) ) || ( \IPS\Dispatcher::i()->application instanceof \IPS\Application AND \IPS\Dispatcher::i()->application->canManageWidgets() ) || $adsForceSidebar )}} <div id='ipsLayout_sidebar' class='ipsLayout_sidebar{$position} {{if !( isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== '' ) && ( !isset( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) || !count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) ) && \IPS\Dispatcher::i()->application->canManageWidgets() && !$adsForceSidebar}}ipsLayout_sidebarUnused{{endif}}' data-controller='core.front.widgets.sidebar'> {{if isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== ''}} <aside id="elContextualTools" class='ipsClearfix' {{if isset( \IPS\Output::i()->sidebar['sticky'] )}}data-ipsSticky{{endif}}> {expression="\IPS\Output::i()->sidebar['contextual']" raw="true"} </aside> {{endif}} {{if $adsForceSidebar OR ( \IPS\core\Advertisement::loadByLocation( 'ad_sidebar' ) AND ( ( isset( \IPS\Output::i()->sidebar['contextual'] ) && trim( \IPS\Output::i()->sidebar['contextual'] ) !== '' ) OR ( isset( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) && count( \IPS\Output::i()->sidebar['widgets']['sidebar'] ) ) ) )}} <div data-role='sidebarAd'> {advertisement="ad_sidebar"} </div> <br><br> {{endif}} {template="widgetContainer" group="global" app="core" params="'sidebar', 'vertical'"} {advertisement="PAVE"} </div> {{endif}} Can you help us correct this ? ThX. Quote Link to comment Share on other sites More sharing options...
Management Michael Posted January 20, 2018 Management Report Share Posted January 20, 2018 Is there any reason why you can't use the existing "ad_sidebar" ad location? Seems to be code already there for it. If not, what is the html contents of your PAVE ad? It sounds like you might have a "collapse" css style in place that usually collapses when on mobile and not desktop. So not sure why yours is. Quote Link to comment Share on other sites More sharing options...
Bocar Posted January 20, 2018 Author Report Share Posted January 20, 2018 Hi ad_sidebar ad location does the same thing. The content of PAVE is : <div class="ipsResponsive_hidePhone ipsResponsive_hideTablet"> <div id="sas_439"></div> <script type="application/javascript"> sas.cmd.push(function() { sas.call("std", { siteId: 4877, // pageId: 30141, // Page : 1-soccers.fr/rg formatId: 439, // Format : IMU 300x600 target: '' // Ciblage }); }); </script> <noscript> <a href="//ww62.smartadserver.com/ac?jump=1&nwid=62&siteid=4877&pgname=rg&fmtid=439&visit=m&tmstp=[timestamp]&out=nonrich" target="_blank"> <img src="//ww62.smartadserver.com/ac?out=nonrich&nwid=62&siteid=4877&pgname=rg&fmtid=439&visit=m&tmstp=[timestamp]" border="0" alt="" /> </a> </noscript> </div> Quote Link to comment Share on other sites More sharing options...
Bocar Posted January 28, 2018 Author Report Share Posted January 28, 2018 I have changed the size of the sidebar to make it wider, but no changes for the banner position. Quote Link to comment Share on other sites More sharing options...
Management Michael Posted February 3, 2018 Management Report Share Posted February 3, 2018 On 1/29/2018 at 8:10 AM, Mostovoi said: I have changed the size of the sidebar to make it wider, but no changes for the banner position. Is this up on a public site I can look at? It would be a bit easier to see it in action and I assume you've also got a custom theme that might impact things differently then the default theme would. Quote Link to comment Share on other sites More sharing options...
Bocar Posted February 3, 2018 Author Report Share Posted February 3, 2018 Right, we have a custom theme. The site is Soccers.fr Quote Link to comment Share on other sites More sharing options...
Management Michael Posted February 4, 2018 Management Report Share Posted February 4, 2018 10 hours ago, Mostovoi said: Right, we have a custom theme. The site is Soccers.fr Sorry I meant access to your board to look at your current html code you got and then I can make any adjustments needed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.