Ultimate Forumotion Navbar Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

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.
4 posters

    Ultimate Forumotion Navbar

    avatar
    bhowe
    Forumember


    Posts : 55
    Reputation : 1
    Language : english

    Solved Ultimate Forumotion Navbar

    Post by bhowe Wed 29 Jul - 17:53

    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 Wed 29 Jul - 19:41; edited 1 time in total
    tikky
    tikky
    Forumember


    Posts : 922
    Reputation : 159
    Language : 🇵🇹

    Solved Re: Ultimate Forumotion Navbar

    Post by tikky Wed 29 Jul - 18:10

    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 Wed 29 Jul - 18:16

    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 Wed 29 Jul - 18:21

    Ultimate Forumotion Navbar Untitl10
    tikky
    tikky
    Forumember


    Posts : 922
    Reputation : 159
    Language : 🇵🇹

    Solved Re: Ultimate Forumotion Navbar

    Post by tikky Wed 29 Jul - 18:39

    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 : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Ultimate Forumotion Navbar

    Post by skouliki Wed 29 Jul - 19:18

    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 Wed 29 Jul - 19:21

    That fixed it. Thanks.
    avatar
    bhowe
    Forumember


    Posts : 55
    Reputation : 1
    Language : english

    Solved Re: Ultimate Forumotion Navbar

    Post by bhowe Wed 29 Jul - 19:22

    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 Wed 29 Jul - 19:50

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