Lieber Besucher, herzlich willkommen bei: krpano.com Forum.
Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert.
Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können.
Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang.
Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.
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?
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') ) );
?>
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/
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?
Either put the XML and your folders in your current drupal file directory or add the "base" parameter in your tag
I have problems setting a height... doesnt seem to work, does setting a height work for you?
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?
Hi viewinz,
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
Hope this can help.
Salut
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..
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
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?
Hi,
are you maybe using percent values for the height?
best regards,
Klaus
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
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
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Jarredja« (5. Juli 2009, 21:42)
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.
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...
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
Just use drupal_add_js instead.