NGMenu helknas i Google Chrome!

Diskutera tredjepartsutvecklade komponenter, moduler m.m. avsedda för Joomla! 1.0.

Moderators: chrille, Zello

Forum rules
Forumregler
Locked
staffeman
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Tue Oct 11, 2005 5:20 am

NGMenu helknas i Google Chrome!

Post by staffeman » Tue Sep 09, 2008 4:05 pm

Har den nya webbläsaren i officiell version 1798 /0.2.149.29
Jag använder komponenten NGMenu och min huvudmeny blev helkonstig med dubblar knappar av allt.
Se ex. http://luleabs.nu

Jag vet att Chrome fortfarande är Beta, men det vore intressant att höra om någon annan har liknande problem..

User avatar
Zello
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3869
Joined: Wed Jan 10, 2007 11:23 am
Location: Västerås - Sweden

Re: NGMenu helknas i Google Chrome!

Post by Zello » Tue Sep 09, 2008 6:31 pm

Ja den ser skum ut. Men jag testade en annan sida med samma template och den fungerade. Så... jag började titta lite på den genererade koden. Crome tolkar det så att det blir www. på alla referenser utom på den till css'en i templaten. Tror att det är en bit kvar till skarp version på denna annars ganska "kuliga" uppstickare.

Vet inte om du på något sätt kan påverka detta.
Olle Zettergren
Freelance Senior Joomla developer
Moderator Swedish forum

songwriter66
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Oct 31, 2009 12:31 pm

Re: NGMenu helknas i Google Chrome!

Post by songwriter66 » Sat Oct 31, 2009 12:35 pm

Hello!

This is a Solution concerning the Problem with ngmenu and Chrome.
I solved the problem. Do the following:
Unpack ngmenu.js with a tool like:
http://jsbeautifier.org/

Look for the Function dm_getBrowser()

Add the following lines beneath the Apple quest:

if (a.indexOf("Chrome") >1) {
b_MZ = 1;
b_VER = pf(a.sb(a.io('Chrome/') + 7, a.ln()));
return
}

Update ngmenu.js on your server. You don't have to pack it again if you don't like.

Then it works. Chrome was recognized as Netscape 6 and that was the Problem. Now it is recognized as part of the Mozilla family.

Holger

User avatar
Zello
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3869
Joined: Wed Jan 10, 2007 11:23 am
Location: Västerås - Sweden

Re: NGMenu helknas i Google Chrome!

Post by Zello » Sat Oct 31, 2009 7:15 pm

Nice!
The last post is 14 month ago.

På svenska:
Kanon!
Den förra postningen av för 14 månader sedan. :)
Olle Zettergren
Freelance Senior Joomla developer
Moderator Swedish forum

ibd2004
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Nov 23, 2009 1:13 pm

Re: NGMenu helknas i Google Chrome!

Post by ibd2004 » Mon Nov 23, 2009 1:21 pm

Hi,
I have tried your solution here:
on my site http://www.management.tizmon.com

but the top NG menu just desapired in Crhome and all ather browsers as well.

I have added the code like this:

var b_VER = 0;
var d_o = document;
var _un = 'undefined';
var dmZOrder = 1000;
dm_getBrowser();
if (a.indexOf("Chrome") >1) {
b_MZ = 1;
b_VER = pf(a.sb(a.io('Chrome/') + 7, a.ln()));
return
}
var addedScripts = [];
if (typeof(dmWorkPath) == _un) var dmWorkPath = '';

function dm_addScript(fname) {
for (var i = 0; i < addedScripts.ln(); i++) if (addedScripts[i] == fname) return;
addedScripts[addedScripts.ln()] = fname;
d_o.write('<SCR' + 'IPT SRC="' + dmWorkPath + fname + '.js" type="text/javascript"></SCR' + 'IPT>')

i am rely despret and dont know what to do next i will
realy be thankfull if you can say what i did wrong and what sould i do insted.

Thank you very much in advance for your big help
Itai

email: itai@tizmun.co.il

songwriter66
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat Oct 31, 2009 12:31 pm

Re: NGMenu helknas i Google Chrome!

Post by songwriter66 » Mon Nov 23, 2009 8:06 pm

Hi!

You put the suggested code into the wrong line. You need to place it "into" the function dm_getBrowser().

It would look like that:

function dm_getBrowser() {
var nv = navigator;
var a = nv.userAgent;
var n = nv.appName;
var v = nv.appVersion;
var ns = 'Netscape';
var gk = 'Gecko';
var pf = function (r) {
return parseFloat(r)
};
b_MAC = v.io("Mac") >= 0;
b_DOM = d_o.getElementById ? 1 : 0;
if ((parseInt(nv.productSub) >= 20020000) && (nv.vendor.io('Apple Computer') != -1) && (nv.product == gk)) {
b_NS = 1;
b_VER = 6;
b_SAF = 1;
return
}
if (a.indexOf("Chrome") >1) {
b_MZ = 1;
b_VER = pf(a.sb(a.io('Chrome/') + 7, a.ln()));
return
}


......... (further code).....


Then it works, as you can see here:
http://www.asb-bw.de
https://www.placestogrow.ca/index.php?lang=eng

Best regards

ibd2004
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Nov 23, 2009 1:13 pm

Re: NGMenu helknas i Google Chrome!

Post by ibd2004 » Mon Nov 23, 2009 9:11 pm

Woow thank you very much
really myou dont know how thankfull i am
you made my day, week and month.

Thank you man.
Itai.


Locked

Return to “Komponenter, moduler och Mambots”