You are not logged in.

1

Tuesday, October 6th 2009, 11:16pm

XML various bugs in Drupal

Hi, I am using scrolling thumbs plugin and in tradition of KR-PANO i have more than one .xml file, and if you have ever tried linking those xml files in drupal you will know it can be a hassle with clean URLs. (let me explain) drupal adds the word node in to clarify that you are looking at a page, then the number of that page: www.drupalsite.com/node/2 meanwhile your flash and xml is contained in www.drupalsite.com/sites/default/files/krpano and the server eventually ends up looking for the .xml in www.drupalsite.com/node/script.xml

long story short; i managed to keep most of the .xml files in their directory using %SWFPATH% exept one instance. which is:
url="as3Thumbsforkrpano.swf?TheXML=./gallery1.xml" look at ./gallery i can not ad the function %SWFPATH% because it is invalid xml code. Here is my biggest pickle, if it wasn't for Internet Explorer I would of been sleeping right now, because firefox can read the ./ command just fine. Here is the website in development (remember to use IE to view the bug)

If anyone is experiencing problems with drupal's flash & xml, or someone thinks they can help and would like to know how i got this far, i could give a breakdown of events.

I really tried to be as clear and brief as possible.
thanks, Nick

Shanti

Intermediate

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

2

Wednesday, October 7th 2009, 1:32am

use absolute paths :)

url="as3Thumbsforkrpano.swf?TheXML=http://slyraccoon.dot5hosting.com/villabc/gallery1.xml"


the problem is not IE, its drupal, but luckily for you is a known problem and an easy fix

Source code

1
2
http://slyraccoon.dot5hosting.com/villabc/gallery1.xml?nocache=10237
http://slyraccoon.dot5hosting.com/villabc/sites/default/files/virtualtour/as3Thumbsforkrpano.swf?TheXML=../gallery1.xml


those are the locations for the files, as you can see having ../gallery.xml will only drop you one folder back which would look for the xml on

Source code

1
http://slyraccoon.dot5hosting.com/villabc/sites/default/files/


Don't know why it works on FF, but it general it should not work :)

try using absolute paths like I said :)

3

Thursday, October 8th 2009, 4:29am

Thanks for your input

Hey Shanti, thanks I tried to use absolute paths as you said... and this time KRpano gave me an error...
url="as3Thumbsforkrpano.swf?TheXML=http://slyraccoon.dot5hosting.com/villabc/gallery1.xml"
but i figured i haven't tried "basepath" in the embedding of the flash...and combined with your help it now works...

here is my markup:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
<div style="text-align: center;">

<object id="myMovieName" height="500" width="100%" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param value="sameDomain" name="allowScriptAccess"/>
<param value="true" name="allowFullScreen"/>
<param value="/villabc/sites/default/files/virtualtour/villabc.swf" name="movie"/>
<param value="high" name="quality"/>
<param value="pano=http://slyraccoon.dot5hosting.com/villabc/sites/default/files/virtualtour/villabc.xml" name="flashvars"/>
<param value="/villabc/sites/default/files/virtualtour/" name="base"/>
<embed height="500" align="" width="100%" pluginspage="http://www.macromedia.com/go/getflashplayer" base="/villabc/sites/default/files/virtualtour/" type="application/x-shockwave-flash" name="myMovieName" flashvars="pano=http://slyraccoon.dot5hosting.com/villabc/sites/default/files/virtualtour/villabc.xml" quality="high" allowfullscreen="true" allowscriptaccess="sameDomain" src="/villabc/sites/default/files/virtualtour/villabc.swf"/>
</object>

</div>


I don't understand all the bugs, and as much as i want to dig down and finally figure everything out, im going to go with the philosophy of: "if it works don't fix it".

but the reason for jumping back a folder ../ was because it was looking for /node/ i tried to hack it that way, and it did for some reason work and for some even stranger reason only in FF.

thanks for your help, i just have one question how did you get this code?

Source code

1
2
http://slyraccoon.dot5hosting.com/villabc/gallery1.xml?nocache=10237
http://slyraccoon.dot5hosting.com/villabc/sites/default/files/virtualtour/as3Thumbsforkrpano.swf?TheXML=../gallery1.xml
i can see it in drupal, but what did you use to find this code?