Purchase OIOpublisher now for just $47.

Take control of your ad space.

Click here to purchase

    • CommentAuthorgllorca
    • CommentTimeApr 29th 2016
     

    Dear OIO Publisher team,

    I am using your fine plug-in in a sidebar.

    I also use the "Q2W3 Fixed Widget" plug-in, in order to have fixed widgets on my sidebar. The goal is to have the adzone always visible when a reader scrolls down.

    However, When I look on my website, the AdZone is eventually outside of the widget, which makes it "non-fixed".

    Please, find attached my widget settings.
    As you can see, the code is the following :
    <div class="sidebar_ads">
    [adzones id="2"]
    <a href="/publier-une-annonce-sur-le-blog/"><span>Votre publicité ici</span></a>
    </div>

    Here is the shortcode code:
    // Shortcode adzones
    function display_adzones( $atts ) {
    // Attributes
    extract( shortcode_atts(
    array(
    'id' => ''
    ), $atts )
    );
    if(function_exists('oiopub_banner_zone')) oiopub_banner_zone($atts['id'], 'center');
    }
    add_shortcode( 'adzones', 'display_adzones' );

    And finally, this is the output (the whole sidebar) :
    <div class="sidebar-content" style="height: 826px;">

    <div class="sidebar-top group">
    <div id="text-27" class="widget widget_text" style="">
    <div class="textwidget">
    <p>Content of the first widget</p>
    </div>
    </div>
    <style type="text/css">
    #oio-banner-2 { max-width: 300px !important; margin: 0 auto !important; }
    #oio-banner-2 .oio-slot { width: 100% !important; margin: 0% 0% 0% 0% !important; padding-bottom: 83.333% !important; }
    #oio-banner-2 .oio-last-col { margin-right: 0 !important; }
    #oio-banner-2 .oio-last-row { margin-bottom: 0 !important; }
    </style>
    <ul class="oio-banner-zone" id="oio-banner-2">
    <li class="oio-slot oio-last-col oio-last-row"><a rel="nofollow" target="_blank" href="http://blog.defi-ecologique.com/publier-une-annonce-sur-le-blog/" title="blog.defi-ecologique.com"><img src="http://blog.defi-ecologique.com/wp-content/uploads/pub-defi-ecologique.jpg" width="300" height="250" border="0" alt="blog.defi-ecologique.com"></a></li>
    </ul>
    <script>
    (function(){for(var a=document.getElementById("oio-banner-2"),b=a,c,d=window.getComputedStyle;!a.clientWidth;){b=b.parentNode;if(!b||!d||1!==b.nodeType)break;c=d(b,null).getPropertyValue("float");if("left"==c||"right"==c)b.style.width="100%",b.style.maxWidth="300px"};})();
    </script>
    <div id="text-26" class="widget widget_text" style=""> <div class="textwidget"><div class="sidebar_ads">

    <a href="/publier-une-annonce-sur-le-blog/"><span>Votre publicité ici</span></a>
    </div></div>
    </div>
    </div>

    As you can see, the AdZone is outside of the #text-26 div (which is the text widget attached). Therefore, it is not "fixed".

    Why is that ?
    How can I put the AdZone back where it belongs ?

    Thank you for your help.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeMay 1st 2016
     
    Project Admin

    Unfortunately just by looking at the code snippets provided it's impossible to tell what might be going on. If you have a live example, I can have a look to see if I can figure out where the conflict might be.

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorgllorca
    • CommentTimeMay 3rd 2016
     
    • CommentAuthorSimon
    • CommentTimeMay 8th 2016
     
    Project Admin

    I wonder whether it's due to the OIO ad zone outputting immediately, rather than returning the html?

    You could try replacing:

    if(function_exists('oiopub_banner_zone')) oiopub_banner_zone($atts['id'], 'center');

    With:

    if(function_exists('oiopub_banner_zone')) {
    return oiopub_banner_zone($atts['id'], array(
    'align' => 'center',
    'echo' => false,
    ));
    }

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorgllorca
    • CommentTimeMay 11th 2016
     

    It works !

    Thank you very much, that's swell !

    Need help?  Quick start guide | Troubleshooting | All help topics
    • CommentAuthorSimon
    • CommentTimeMay 15th 2016
     
    Project Admin

    No problem, glad it did the trick.

    Need help?  Quick start guide | Troubleshooting | All help topics