You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

1

Friday, July 3rd 2009, 2:39am

Embedding krpano into Drupal website using SWFtools

Hello,

I'm having problems trying to embed krpano into Drupal 6 website. I'm attempting to use SWFtools which should automatically provide SWFobject and carry out those functions.

The error message i'm getting is "You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly."

The syntax I am using to embed is - <swf file="panotest/krpano.swf" flashvars="pano=panotest/krpano.xml"> and I've tried using absolute paths.

Anyone any ideas or experience using this method?

2

Friday, July 3rd 2009, 4:02am

First, I think its better to use these brackets [swf file=""] or php.
Then, the default swftools base path is your files directory. There it looks for your XMl file.
So you have to define your base path first

for example something like this works

<?php
global $base_path;
print swf( 'http://localhost/xy/panorama/pan01/pano.swf', array( 'params' => array('width' => '860', 'base' => $base_path . 'panorama/pan01') ) );
?>

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

3

Friday, July 3rd 2009, 6:02am

Hi Tobias,

Cheers for you reply. I tried that and still same error message. I can get it to work by scripting the HTML in a post like this -
http://viewinz.com/content/krpano-test

However I would rather be using the swftools. I am still getting this error message on here -
http://viewinz.com/

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

4

Friday, July 3rd 2009, 8:38am

Right, got it to see the file with - <swf file="pano/krpano.swf">

Now I need to point it to the xml file which is in the same folder with the same name i.e. krpano.xml

Any ideas?

5

Friday, July 3rd 2009, 9:50am

Either put the XML and your folders in your current drupal file directory or add the "base" parameter in your tag

6

Friday, July 3rd 2009, 10:41am

I have problems setting a height... doesnt seem to work, does setting a height work for you?

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

7

Friday, July 3rd 2009, 12:42pm

I put the xml named krpano.xm seemzl in the Swftools specified folder (sites/default/files) along with krpano.swf and it loads krpano.swf but can't see the xml. Not sure what's going wrong there.

I had a problem with heights when I got it working by pasting the html from the example, with swfobject. It works fine in IE but won't go above 200px or so in Firefox. Weird.

Did you get it to work using Swftools?

michel

Professional

Posts: 1,153

Location: ANDORRA

Occupation: TV

  • Send private message

8

Friday, July 3rd 2009, 2:37pm

Hi viewinz,

Quoted

I put the xml named krpano.xm seemzl in the Swftools specified folder (sites/default/files) along with krpano.swf and it loads krpano.swf but can't see the xml. Not sure what's going wrong there.
It seems there is a mistake in your base path...... your Krpano.swf is in http://viewinz.com/sites/default/files/pano/krpano.swf *attention*

Hope this can help. ;-)

Salut

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

9

Saturday, July 4th 2009, 3:40am

Thank you. That doesn't seem to be the problem and I've made some progress - now I'm getting a white box with no errors so I seems it can see the swf and there's no xml error, just nothing showing.

And I'm still getting this height problem in firefox..

panogio

Beginner

Posts: 5

Location: Stockholm

  • Send private message

10

Saturday, July 4th 2009, 9:35am

Hi Viewinz

I have not tried to use the swftool module in Drupal but I have used Drupal to build Panogio.com . Perhaps the swftool module has some special feature you need but I used a few lines of custom code in a tpl.php file to place the krpano flash on the webpages. Looking at your site and all the tests you made I'm sure you tried a lot of alternatives. But if you think I can be of any help to you please let me know and I will tell you how I have done.

Best Regards
/ted @panogio

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

11

Saturday, July 4th 2009, 11:52pm

Ted,

That's brilliant! Very similar to what I'm trying to do however I'm focused purely on tourist attractions in New Zealand. SWFtools isn't doing anything particularly useful appart from making the coding easier. The only way I've got it to work on the site is using the generic html and javascript with swfobject as recommended by Klaus. If I can't get it to work so be it, apparently the guy above did but is having the same height issue.

Any chance you want to tell me how you do it?

Also, I'm not checked in Firefox but did you manage to get around the height issue?

12

Sunday, July 5th 2009, 12:03pm

Hi,

are you maybe using percent values for the height?

best regards,
Klaus

viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

13

Sunday, July 5th 2009, 12:19pm

Yes and it works fine in IE. However not at all in Firefox. It always comes up at around 200px.

Seems a common problem from my searches on the internet, and is to do with the container heights being set to 100%. I've tried it through the CSS everywhere and can't get it work.

It must be possible ted@panagio has managed to do it!

Cheers tho Klaus

14

Sunday, July 5th 2009, 7:49pm

I don't use drupal but thought this might somehow help you. I also know that there are a few unneeded items in this css code, but it came from a template and works for me so I have not made any adjustments. I added this to my css and it seems to work well for me. I too had the short and wide view before adding this.

I use this in the body of the html

<div id="krpano">
<noscript><table id="inner" width="100%" height="100%" ><tr valign="middle"><td valign="middle" align="right">ERROR:<br><br>Javascript not
activated<br><br></td></tr></table></noscript>
</div>

and this is the css info that I use.

#krpano {float:left; line-height:1.5em; margin:0; padding:0; height: 90%; text-align:left; width:100%;}


#footer {border-top:4px solid #dadada; clear:both; color:gray; font-size:0.9em; height:10%; line-height:1.6em; margin:0 auto; padding:0px 0; padding-right:15px; text-align:right;}

The reason I use height 90% is to give room for the footer.

I also have the height of the footer at 10%. 100% completely fills the window.

Good luck, hope it helps.



Jarredja

This post has been edited 1 times, last edit by "Jarredja" (Jul 5th 2009, 9:42pm)


viewinz

Intermediate

  • "viewinz" started this thread

Posts: 145

Location: Wellington, New Zealand

Occupation: Trying to build an entire walkthrough of NZ for tourists

  • Send private message

15

Monday, July 6th 2009, 12:26am

Jarredja,

Thanks for your advice - I tried it but am still getting this height problem in Firefox. It's bound to be somewhere else in the Drupal CSS but I'm having the usual problem of you change one thing and something goes wrong somewhere else.

http://viewinz.com/content/krpano-test-3

THe obvious answer is to fix the height but I really wanted it to be fluid.

panogio

Beginner

Posts: 5

Location: Stockholm

  • Send private message

16

Wednesday, July 8th 2009, 11:23pm

Height

I have never had the need to set the height of the panorama in
percent so I can't be of much assistance when it comes to fixing the
problem in firefox (and safari as well I believe).

I've sent a private message to viewinz explaining how I used drupal on Panogio. Hopefully we will see his site working the way he intend soon...

17

Sunday, February 19th 2012, 4:44pm

Need help

Hi Viewinz

I have not tried to use the swftool module in Drupal but I have used Drupal to build Panogio.com . Perhaps the swftool module has some special feature you need but I used a few lines of custom code in a tpl.php file to place the krpano flash on the webpages. Looking at your site and all the tests you made I'm sure you tried a lot of alternatives. But if you think I can be of any help to you please let me know and I will tell you how I have done.

Best Regards
/ted @panogio
Hello, I have the same problem, I'm starting a new panorama site using drupal and I'm stuk with the same problem, could you tell me how have you done this, please.
Best regards and goog job at panogio *thumbup*

sachagriffin

Professional

Posts: 1,502

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

18

Monday, February 20th 2012, 5:43pm

Just use drupal_add_js instead.
KRPano Developer: Portfolio :: Facebook :: Twitter :: r/VirtualTour