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') ) );
    ?>

  • 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?

  • 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?

  • 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

    Einmal editiert, zuletzt von Jarredja (5. Juli 2009 um 21:42)

  • 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...

  • 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*

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!