The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
4 posters

    Ultimate Forumotion Navbar

    avatar
    bhowe
    Forumember


    Posts : 55
    Reputation : 1
    Language : english

    Solved Ultimate Forumotion Navbar

    Post by bhowe July 29th 2020, 5:53 pm

    I have the Ultimate Forumotion Navbar Java script installed on my website. This give me a drop down menu in the top right hand corner that contains all the links to different things such as your Inbox. Normally the lettering is black in color but turns red and gives a popup notice when you receive a PM. I have had it working for years. Suddenly the other day every user that is signed in has had it turn red and a message (Undefined New) beside their Inbox link. There is no new message nor does the popup work any longer. My website is https://www.insidelakeside.com/


    Last edited by bhowe on July 29th 2020, 7:41 pm; edited 1 time in total
    tikky
    tikky
    Forumember


    Posts : 922
    Reputation : 160
    Language : 🇵🇹

    Solved Re: Ultimate Forumotion Navbar

    Post by tikky July 29th 2020, 6:10 pm

    Hello @bhowe,

    Can you give me the script that you are use and a printscreen of the problem?
    avatar
    bhowe
    Forumember


    Posts : 55
    Reputation : 1
    Language : english

    Solved Re: Ultimate Forumotion Navbar

    Post by bhowe July 29th 2020, 6:16 pm

    Here is the Java script:

    var CopyrightNotice = 'UFN(tm) - Ultimate Forumotion Navbar for phpBB3 boards. Copyright 2011 by Dion Designs. All Rights Reserved. Use and/or modification of this script is allowed, provided this entire copyright notice remains in the original or modified script. Distribution is not allowed without written consent from Dion Designs.';

    $(function() {
    $('body').prepend('<div id="ddmenu"><div id="ddposhack"><div id="ddwrap"><div id="ddnavtoggle" onclick="$(\'#ddnavlinks\').slideToggle()">CLICK HERE for QuickJump Menu</div></div></div></div>');
    var x=document.createElement('div');
    x.style.display='none';
    x.id='ddnavlinks';
    var y=$('#page-header .navbar li > a').get();
    var z=y.length-1;
    for (i=z; i>=0; i--) {
    var mtitle=y[i].childNodes[0].title;
    var linktext=mtitle;
    var link=y[i].getAttribute('href');
    if (mtitle=='Home') {
    linktext='Forum';
    mtitle='Go to Forum/Index page';
    }
    else if (mtitle=='Portal') {
    linktext='Home';
    mtitle='Go to Portal/Home page';
    }
    else if (link.indexOf('privmsg')!=-1) {
    var newpm=mtitle.split(' ');
    if (newpm[2]=='no') {linktext='Inbox';}
    else {
    linktext='Inbox ['+newpm[2]+' New]';
    document.getElementById('ddnavtoggle').className='newpm';
    }
    }
    else if (link.indexOf('login?logout')!=-1) {
    linktext='Log Out';
    }
    else if (mtitle=='Profile') {
    linktext='UCP';
    mtitle='Go to your User Control Panel';
    }
    else if (mtitle=='Gallery') {
    mtitle='Go to Picture Gallery';
    }
    else if (mtitle=='FAQ') {
    mtitle='Frequently Asked Questions';
    }
    else if (mtitle=='Memberlist') {
    linktext='Member List';
    mtitle='View the board member list';
    }
    y[i].title=mtitle;
    y[i].innerHTML=linktext;
    if (i==z) {x.appendChild(y[i]);}
    else {x.insertBefore(y[i],x.firstChild);}
    }
    $(x).append($('#page-header .navbar li > a'));
    $(x).find('img').remove();
    $(x).append($('#search_menu'));
    $('#ddwrap').append(x);
    $('#page-header .navbar').remove();
    avatar
    bhowe
    Forumember


    Posts : 55
    Reputation : 1
    Language : english

    Solved Re: Ultimate Forumotion Navbar

    Post by bhowe July 29th 2020, 6:21 pm

    Ultimate Forumotion Navbar Untitl10
    tikky
    tikky
    Forumember


    Posts : 922
    Reputation : 160
    Language : 🇵🇹

    Solved Re: Ultimate Forumotion Navbar

    Post by tikky July 29th 2020, 6:39 pm

    It's a bit confusing the code above you should have used the BBCode code. Find in the code:
    Code:
    else if (link.indexOf('privmsg')!=-1) {
    var newpm=mtitle.split(' ');
    if (newpm[2]=='no') {linktext='Inbox';}
    else {
    linktext='Inbox ['+newpm[2]+' New]';
    document.getElementById('ddnavtoggle').className='newpm';
    }
    }
    replace to
    Code:
    else if (link.indexOf('privmsg')!=-1) {
                var newpm = mtitle.match(/[0-9]+/);
                if (!newpm) {
                  linktext='Inbox';
                } else {
                    linktext='Inbox ['+newpm+']';
                    document.getElementById('ddnavtoggle').className='newpm';
                }
            }

    Read also: New mark pm as read / unread!
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15391
    Reputation : 1709
    Language : English,Greek
    Location : Greece

    Solved Re: Ultimate Forumotion Navbar

    Post by skouliki July 29th 2020, 7:18 pm

    Please @bhowe use the code tags when you paste a javascript or a code

    avatar
    bhowe
    Forumember


    Posts : 55
    Reputation : 1
    Language : english

    Solved Re: Ultimate Forumotion Navbar

    Post by bhowe July 29th 2020, 7:21 pm

    That fixed it. Thanks.
    avatar
    bhowe
    Forumember


    Posts : 55
    Reputation : 1
    Language : english

    Solved Re: Ultimate Forumotion Navbar

    Post by bhowe July 29th 2020, 7:22 pm

    skouliki wrote:Please @bhowe use the code tags when you paste a javascript or a code

    Will do. Thanks.
    Draxion
    Draxion
    Helper
    Helper


    Male Posts : 2518
    Reputation : 321
    Language : English
    Location : USA

    Solved Re: Ultimate Forumotion Navbar

    Post by Draxion July 29th 2020, 7:50 pm

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules

      Current date/time is November 12th 2024, 1:31 am