Sie sind nicht angemeldet.

designsubway

Anfänger

  • »designsubway« ist der Autor dieses Themas

Beiträge: 40

Wohnort: York, UK

Beruf: Graphic Designer

  • Nachricht senden

1

Mittwoch, 12. Juni 2013, 10:20

Code appearing after upgrade

Hi
I have just used the update tool to upgrade a 1.0.8.15 pano to 1.16.4 (swfkrpano.js and pano.swf).
The problem is that I now have some extra code displaying on the page underneath the pano:

Quellcode

1
c;c++){var d=(this[c]-0).toString(16);a.push(1==d.length?"0"+d:d)}return b?a:"#"+a.join("")}" />


If I revert back to the old swfkrpano.js file then this disappears. You can view it at http://www.scarborough360.co.uk

designsubway

Anfänger

  • »designsubway« ist der Autor dieses Themas

Beiträge: 40

Wohnort: York, UK

Beruf: Graphic Designer

  • Nachricht senden

2

Mittwoch, 12. Juni 2013, 10:58

Hi
It seems there was a conflict with MooTools which I have now disabled.

designsubway

Anfänger

  • »designsubway« ist der Autor dieses Themas

Beiträge: 40

Wohnort: York, UK

Beruf: Graphic Designer

  • Nachricht senden

3

Donnerstag, 13. Juni 2013, 15:19

Hi

Unfortunately this issue has come back, it seems that it wasn't anything to do with MooTools.

4

Dienstag, 18. Juni 2013, 08:53

Hi,

that would be extremely strange...
Sure that no other scripts are involved?

Can you please post a link where the problem can be seen and describe what need to be done to see it.

Best regards,
Klaus

designsubway

Anfänger

  • »designsubway« ist der Autor dieses Themas

Beiträge: 40

Wohnort: York, UK

Beruf: Graphic Designer

  • Nachricht senden

5

Mittwoch, 19. Juni 2013, 13:34

Hi Klaus

The site is a Joomla site. I have found that if I turn off the cache then this code no longer appears. This is fine but it does mean that pages load a little slower.

The problem is that before I upgraded the panos on the site the cache was also turned on and this code didn't appear. It is being added by javascript because if I look at the page source it isn't there (it's phantom code).

You can go to http://www.scarborough360.co.uk but the code is not appearing now because I have turned off the cache.

6

Montag, 17. März 2014, 18:57

such problem

I have joomla site version 3.23 and Krpano version 1.16.9
c;c++){var d=(this[c]-0).toString(16);a.push(1==d.length?"0"+d:d)}return b?a:"#"+a.join("")}" min="function (){return Math.min.apply(null,this); }" max="function (){return Math.max.apply(null,this);}" average="function (){return this.length?this.sum()/this.length:0;}" sum="function (){var b=0,c=this.length; if(c){while(c--){b+=this[c];}}return b;}" unique="function (){return[].combine(this);}" shuffle="function (){for(var c=this.length;c&&--c;){var b=this[c],d=Math.floor(Math.random()*(c+1)); this[c]=this[d];this[d]=b;}return this;}" rgbToHsb="function (){var c=this[0],d=this[1],k=this[2],h=0;var j=Math.max(c,d,k),f=Math.min(c,d,k);var l=j-f;var i=j/255,g=(j!=0)?l/j:0; if(g!=0){var e=(j-c)/l;var b=(j-d)/l;var m=(j-k)/l;if(c==j){h=m-b;}else{if(d==j){h=2+e-m;}else{h=4+b-e;}}h/=6;if(h<0){h++;}}return[Math.round(h*360),Math.round(g*100),Math.round(i*100)]; }" hsbToRgb="function (){var d=Math.round(this[2]/100*255);if(this[1]==0){return[d,d,d];}else{var b=this[0]%360;var g=b%60;var h=Math.round((this[2]*(100-this[1]))/10000*255); var e=Math.round((this[2]*(6000-this[1]*g))/600000*255);var c=Math.round((this[2]*(6000-this[1]*(60-g)))/600000*255);switch(Math.floor(b/60)){case 0:return[d,c,h]; case 1:return[e,d,h];case 2:return[h,d,c];case 3:return[h,e,d];case 4:return[c,h,d];case 5:return[d,h,e];}}return false;}" />


Where can I download the old version 1.08.15? Or how to fix this error?

7

Dienstag, 18. März 2014, 14:30

There must be some very very wrong on that html page when such happens and normally that should be not related to krpano.

Btw - that code there is not from any krpano script.

Best regards,
Klaus

8

Mittwoch, 30. Juli 2014, 09:23

The same problem as described by the author in the first message. (CMS Joomla! 3.3.1, Mootools 1.4.5, krpano Embedding Script krpano 1.17.4)

This conflict mootools and function createPanoViewer.

The problem starts in the cycle after the line o = '<embed name = "' + h + '"' + u + 'type = "application / x-shockwave-flash" src = "' + e.swf + '"';

How to solve this problem?

Begins even earlier, when assigned values. That's what happens with the included mootools.
»qwekaa« hat folgendes Bild angehängt:
  • mootools_methods.png

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »qwekaa« (30. Juli 2014, 10:54)


9

Mittwoch, 30. Juli 2014, 12:04

Began to work with such amendments:

Quellcode

1
for(i in l)f!=""&&(f+="&"),f+=encodeURIComponent(i)+"="+encodeURIComponent(l[i]);


replace

Quellcode

1
2
3
4
5
for (i in l)
{
if (typeof c[i] !== 'function')
f != "" && (f += "&"), f += encodeURIComponent(i) + "=" + encodeURIComponent(l[i]);
} 


___________________________________

Quellcode

1
o='<embed name="'+h+'"'+u+'type="application/x-shockwave-flash" src="'+e.swf+'" ';for(i in c)o+=i+'="'+c+'" ';


replace

Quellcode

1
2
3
4
5
      	o = '<embed name="' + h + '"' + u + 'type="application/x-shockwave-flash" src="' + e.swf + '" ';
                    	for (i in c) {
                        	if (typeof c[i] !== 'function')
                            	o += String(i) + '="' + c[String(i)] + '" ';
                    	}


___________________________________

Quellcode

1
o="<object"+u+'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="'+e.swf+it;for(i in c)o+='<param name="'+i+'" value="'+c[i]+it;


replace

Quellcode

1
2
3
4
5
o = "<object" + u + 'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="' + e.swf + it;
                    	for (i in c){
                        	if (typeof c[i] !== 'function')
                            	o += '<param name="' + String(i) + '" value="' + c[String(i)] + it;
                    	}

10

Mittwoch, 30. Juli 2014, 21:13

Hi,

this is a known problem - Mootools and some other JS frameworks are extending the default Array type and this breaks 'for in' loops over Arrays and the current krpano embedding script is using this case (the krpano HTML5 viewer itself not).

There would be an easier fix - search the embedding .js file for '[]' and replace it with '{}' (this should be occur 2 times).

For the next krpano version this was already fixed.
Attach here a copy of the new embedding script:
embedpano.zip

Best regards,
Klaus

11

Donnerstag, 31. Juli 2014, 03:49

Thank you. Your solution is better.