Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

AdSpace div not showing in 2.1b1

whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

In the BitterSweet theme, an optional AdSpace div is offered.

When I uncomment it in default.master, however, the div doesn't show on the page, and appears as greyed out in Firebug.

If I change the div name to anything else in default.master and custom.css, e.g. ASpace, it works as expected, so it isn't an issue with the css elements.

So somewhere else in Vanilla I guess AdSpace is being told not to display, but I can't see where.

Anyone got any ideas?

Tagged:

Comments

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    So somewhere else in Vanilla I guess AdSpace is being told not to display

    I hate when that happens, you could try visibility:visible or make a plugin to control your css?

    jQuery.fn.visible = function() {
        return this.css('visibility', 'visible');
    }
    
    jQuery.fn.invisible = function() {
        return this.css('visibility', 'hidden');
    }
    
    jQuery.fn.visibilityToggle = function() {
        return this.css('visibility', function(i, visibility) {
            return (visibility == 'visible') ? 'hidden' : 'visible';
        });
    }
    To overload the original jQuery toggle(), not recommended...
    
    !(function($) {
        var toggle = $.fn.toggle;
        $.fn.toggle = function() {
            var args = $.makeArray(arguments),
                lastArg = args.pop();
    
            if (lastArg == 'visibility') {
                return this.visibilityToggle();
            }
    
            return toggle.apply(this, arguments);
        };
    })(jQuery);
    
    

    Working Example:

    http://jsfiddle.net/nGhjQ/

    or

    
        function toggleVisibility(AdSpace){
            if (AdSpace.style.visibility=="hidden"){
                AdSpace.style.visibility="visible";
                }
            else {
                AdSpace.style.visibility="visible";
                }
            }
    
    
  • Options
    whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @vrijvlinder

    I'm not really looking for a workaround like that.

    This is an issue which will affect any user of the BitterSweet theme, afaIk.

    It would be better to have a native Vanilla solution, imo.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    This is an issue which will affect any user of the BitterSweet theme

    Then my answer was just as Bitter sweet ?!...lol

  • Options

    I know this is old, but just in case someone has this happen to them, Are you using an adblocker on your browser? If you are, you need to disable it for the forum you are working on.

Sign In or Register to comment.