Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18155

    Hi.

    I’ve customized the top banner message to always be closed. This is the code that I used:

    function avia_banner($padding = 0)

    {

    $extraClass = “maximized”;

    $output = “”;

    $cookieHash = “”;

    $bannerText = avia_get_option(‘banner’);

    $cookieName = THEMENAME.’_avia_banner’;

    $bannerHash = md5($bannerText);

    $padding = $padding * 43;

    if(!trim($bannerText)) return;

    if( empty($_COOKIE[$cookieName])) $extraClass = “maximized firstcall”;

    if(!empty($_COOKIE[$cookieName])) $cookieHash = $_COOKIE[$cookieName];

    if(!empty($_COOKIE[$cookieName]) && $bannerHash != $cookieHash) $extraClass = “minimized”;

    Still, the top banner message is open when I delet the cookie and reload the page. Any idea what I’m doing wrong?

    #98432

    Hey!

    In angular/js/avia.js delete following code:

    if(jQuery.fn.avia_hide_info_text)
    jQuery("#info_text_header").avia_hide_info_text();

    to get rid of the banner area/text.

    Regards,

    Peter

    #98433

    Hello, Dude.

    I don’t want to remove the banner area/text. I just want it to be closed as a default and possible to open if wanted.

    #98434

    In this case you need to remove some other code from avia.js – open up the file and delete following code:

    if(container.is('.firstcall'))
    {
    setTimeout(function()
    {
    container.trigger('click');
    $.cookie(container.data('cookiename'), 'firstcall', { expires: 365, path: '/' });
    container.removeClass('firstcall');

    },2000); }

    #98435

    Perfect! Thanks

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Top Banner Message close’ is closed to new replies.