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.

Ultimate Forumotion Navbar

4 posters

Go down

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
avatar
bhowe
Forumember

Posts : 55
Reputation : 1
Language : english

Back to top Go down

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?
tikky
tikky
Forumember

Posts : 922
Reputation : 160
Language : 🇵🇹

https://www.forumotion.com/create-forum/modernbb

Back to top Go down

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

Back to top Go down

Solved Re: Ultimate Forumotion Navbar

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

Ultimate Forumotion Navbar Untitl10
avatar
bhowe
Forumember

Posts : 55
Reputation : 1
Language : english

Back to top Go down

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!
tikky
tikky
Forumember

Posts : 922
Reputation : 160
Language : 🇵🇹

https://www.forumotion.com/create-forum/modernbb

Back to top Go down

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
skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

Back to top Go down

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

Back to top Go down

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.
avatar
bhowe
Forumember

Posts : 55
Reputation : 1
Language : english

Back to top Go down

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
Draxion
Draxion
Helper
Helper

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

https://www.talesoftellene.com/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum