Alvin63

Customer
Hi Russ. I've recently become aware that I need an advanced cookie banner. A couple of things. I used bassman's addon to style the Xenforo advanced cookie banner so it was a smaller, floating box on a desktop screen (as opposed to a large, screen-width banner at the bottom of the page). This looks better on desktop and is easier to read - however it takes up half the page on mobile.

Additionally some of the styling/colour changes didn't work with the pixel exit style. As in some kind of conflict somewhere? Because the colour changes showed up on default style. While he did give me some code for extra less to change those particular colour buttons, I was wondering if the styling for the cookie banner is already built into the pixel exit style somewhere (ie no need for an additional addon or extra.less alterations).

So that's the question really. Is there some styling built into my xenbase theme for the cookie banner somewhere? And if not, is there anything I can do to make the cookie banner smaller on mobile screens?! Thank you.
 
We do indeed have properties for it. We give users the ability to easily switch between the various notice styles. Go to Style properties -> Notices (or search for xbBottomNoticeStyle in the admin top right search).

You have the following options:
Primary
Accent
Dark
Light
Custom (define below)

If using custom, you can just set your own custom background and text styling. We try to do our best to adjust links + buttons but you might need further CSS if using the custom approach. The property for custom is towards the bottom "Custom notice"
 
Thank you. So is the cookie notice in there. or do I have to find it in ACP and adapt it within the Xenbase Notices styling? I couldn't find xbBottomNoticeStyle in the search.

I assume the existing cookie notice has functionality attached to the buttons to accept or reject cookies. So do I need to find it and then style it?
 
Thank you. So is the cookie notice in there. or do I have to find it in ACP and adapt it within the Xenbase Notices styling? I couldn't find xbBottomNoticeStyle in the search.

Click style properties, make sure you're on one of our styles. That search term will not work on non-Pixel Exit styles.

You can also just go to the properties directly:

1748025977821.png
 
So in notices in my style, all I can see is the option to create notices? The advanced cookie notice seems to be set in ACP so presumably I need to find that to style it? Or is it just a case of changing the colours etc within notices?
 
Ok so I've gone down to Custom notices and it says

Default styling for when "Other, using custom CSS class name:" Set the class name to: myCustomNotice or when Cookie and push notice style is set to "Custom".​


So presumably I do the styling within there, but I'm not quite clear about what I set to "Custom". If I just style it in there, will it just style the cookie notice?
 
Just to be clear, our property simply changes the cookie + push notices to a different style. That's really it. We don't change positions or how it functions, we change the look (colors).

XenForo by default has various notice styles which you can see when adding a normal notice. XenForo also by default forces a specific style onto the cookie notice, so we just give you the option to use the other styles.
 
Thank you. So this is the original cookie notice, reverted, without the addon. Presumably this isn't set by my Xenbase style but takes some properties from my style settings, is that right? So if I change the styling in "custom" will that affect all notices and not just the cookie notice?

Also, the existing colour settings I have in custom seem different to the cookie notice! I changed all the colours after installing Xenbase, to my existing colour scheme. So I'm still a bit confused!

Original cookie notice.jpg
 
I don't really want to be over-riding the xenbase style with something in extra.less if I can do the styling within my style :-)

I can see under Welcome notices it mentions floating notices, but I can't see any mention of that in custom notices.
 
Sorry if I was being dense :-) I haven't done any styling in my style since I first set the forum up - out of the habit :-) Everything just ticked over. I'm not too worried about colour changes particularly but liked the idea of a vertical notice that was box shaped and easier to read the text above the accept and reject buttons.
 
You could add something like this into extra.less:

Code:
@media (min-width: (@xf-responsiveWide  + 1))
{
    .u-bottomFixer
    {
        right: @xf-elementSpacer;
        bottom: @xf-elementSpacer;
        width: 400px;
        margin-left: auto;
        .notice.notice--cookieAdvanced .notice-content .u-pageCentered
        {
            display: block;
        }
    }
}

This will only apply to larger devices and revert back to the default behavior for mobile. I think the mobile approach XenForo has works best, personally. If you want that to always work, you need to remove the top 2 lines, and the bottom line (class + opening and closing bracket)
 
Thank you very much. That is much appreciated. I noticed before that it tends to look the same on mobile, regardless of how it looks on computer. I'm not keen on the bigger cookie notice but it seems necessary now. (I have clearly not been compliant for a long time though!). I very much appreciate that as I wasn't keen on the idea of mixing things up - ie part addon and part mystyle styling. Trying to keep my addons down as well. I have quite a few now for various things.
 

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.

Back