Get KRPANO to read from a DATABASE

  • Hello there, I'm currently working in a big proyect to sell lots of properties and I need to develop a INFO PANEL which shows some data about them (Cost, details, area, etc). Right now my idea is to create separated .png images of the panel for each site but it would be much much better to get KRPANO to read them from a DATABASE, specially if I need to update the panel.

    I guess this must be a common need so, ¿Anyone has an idea of how to do it? specifically how to comunicate KRPANO whith the DATABASE and which format for the database is the best (excel chart, plain text, etc) I've read that whith PHP some of this can be done but I'm not a very skilled programmer and I don't have an idea of how to start. Your help is quite valuable!! Thanx in advance *g*

    Cheers!!

    Luis

  • why not use wordpress, there are many free and premium themes and plugins specifically for running a real estate site, & panopress can handle your panoramas :)

    otherwise rigging something up yourself to attach a panorama and whatever other data you like to a specific post should not be to tough, basically wordpress would be your database & krpano & other data would be stored within wordpress custom fields

    sam

  • Php arrays, you dont even need a db. Otherwise, any cms will do. You wont get anywhere unless you learn some basic programming or hire someone. You don't need a lot, but you do need to learn to access array, use loops, and manipulate variables.

    Hello there, I'm currently working in a big proyect to sell lots of properties and I need to develop a INFO PANEL which shows some data about them (Cost, details, area, etc). Right now my idea is to create separated .png images of the panel for each site but it would be much much better to get KRPANO to read them from a DATABASE, specially if I need to update the panel.

    I guess this must be a common need so, ¿Anyone has an idea of how to do it? specifically how to comunicate KRPANO whith the DATABASE and which format for the database is the best (excel chart, plain text, etc) I've read that whith PHP some of this can be done but I'm not a very skilled programmer and I don't have an idea of how to start. Your help is quite valuable!! Thanx in advance *g*

    Cheers!!

    Luis

  • -----> Sam

    Ok, I haven't thought about wordpress but right now it's not an option for me because I want to manage all the content inside the interfase, I would also develop an interactive map to navigate panos and I'd also love to manage everything in fullscreen. As far as I can see Wordpress works fine to manage panos alone, but, I'm not sure if it's the best way for my needs right now, are you?

    Even though I'll take your advice for a future, do you have any example of real state krpano aplication in WP, by now I haven't seen that and it sounds really good, if you could give me some example I'll appreciate it very much. Thanx!

    -----> sachagriffin

    Thanx for the PHP advice, it sounds the kind of programing skills I need. Maybe you're right about hiring someone for this task, it certainly would help me just that by now the budget is kindda short and I need to do it by my own. In a future I'll need a more professional advice for sure and with this "keywords" I may explain better what I need, meanwhile I'll google some of your answer to see what I can find. Cheers!

  • -----> Sam

    Ok, I haven't thought about wordpress but right now it's not an option for me because I want to manage all the content inside the interfase, I would also develop an interactive map to navigate panos and I'd also love to manage everything in fullscreen. As far as I can see Wordpress works fine to manage panos alone, but, I'm not sure if it's the best way for my needs right now, are you?

    Even though I'll take your advice for a future, do you have any example of real state krpano aplication in WP, by now I haven't seen that and it sounds really good, if you could give me some example I'll appreciate it very much. Thanx!

    here is a wordpress site using the geomashup googlemap & open street maps wordpress mapping plugin, krpano, pano2vr & panopress to display a map of panorama posts

    http://widelens.ru/

    and some info on the panopress forum

    http://www.panopress.org/forum/discussi…gin-integration

    and there are tons of wordpress real estate sites and articles about creating them, search google for wordpress real estate tutorials, videos, themes, plugins, etc

    the advantage of using wordpress over building it all yourself would be that you don't have to start from scratch

    but i think what you are saying you want is to manage everything through a flash interface in krapno ?

    sam

  • There are a few ways.

    One would be generating an xml with php (or serverside language of your choice) and let krpano include that. This is the fastest way for krpano to parse content. Downside is, you will run into caching, krpano will load an old xml from its cache instead of the latest from the database, there are hacks though to prevent this (time/version stamping it for example). This would just a simple mysql query

    content.xml.php

    In this example you only generate the id's, but it could be anything you have in the db. Then you have a normal krpano array. With some krpano magic/actions you can generate a map with spots.

    The other way is by creating a REST API, and then communicate through ajax to place information. Plus side is, no caching, no refresh needed (instant place information), downside: more time needed to setup and requires knowledge of php and javascript.

  • Quote


    "One would be generating an xml with php (or serverside language of your choice) and let krpano include that. This is the fastest way for krpano to parse content. Downside is, you will run into caching, krpano will load an old xml from its cache instead of the latest from the database, there are hacks though to prevent this (time/version stamping it for example). "

    This solves caching

    Code
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header('Content-Type: text/xml');
    header("Pragma: no-cache");
  • I tried that, did not work :( My experience is, that flash caching is a whole different kind of caching. The PHP is just a mediator.

    More info: http://willperone.net/Code/as3nocache.php

    And even if it works, it will download a new xml every time. Version stamping is better (or date modified stamping, that looks at the age of the file).

    <include url="global.xml.php?t=<?= $VERSION ?>"

    or better:

    index.php

    Code
    <script>
    var viewer = createPanoViewer({swf:"krpano.swf", xml:"tour.xml", target:"pano"});
    viewer.addVariable("version", '<?= VERSION ?>');
    viewer.embed();
    </script>


    in the xml:

    Code
    <include url="file.xml?v=%$version%" />
  • Been away a few days and I'm glad to see all this valuable help coming from you guys, I really appreciate that *thumbsup*

    Now...

    -----> Sam

    Thanx for all the info about wordpress, I'm really interested in learning more about it. I have heard about wordpress but till now I have been disconected from it but now that I googled as you suggested and I saw a lot of potential for future works in real state, specially with the use of plugins and templates you can get a nice site running in a suprising short time, i'ts worth a look and I'll be checking it.

    Anyway returning to my case, as I want to develop a marketing tool that can be run entirelly on fullscreen mode wordpress it's not an option right now, I'm more convinced to explore PHP options as Zephyr above sugests.

    -----> Zephyr

    It sounds the right option for my case to create XMLs dynamically, serverside, thanks for all the technical advice about caching as well. Right now I don't have the funds for hiring somebody to do all the coding but in a future it will be the best option because I'm not that expert in PHP or Javascript as a skilled programmer, and I'll let him(her) to know this good advice of yours. By now I'll be checking this info to see how far I can get with my actual skills.

    Best Regards

    Luis

  • i learned it a bit my self with just W3schools and some other tutorials and i must say it works like a charm.
    I start using it more and more slowly.
    It takes some time to learn though, but it is not very difficult.
    So a few nights and you will be there. Maybe you have somebody around that can help you when you get stuck.
    I had. But the main thing is try and error yourself… then you learn.

    I would advise try to learn the basics and try to get things to work.
    Then you can always, when you don't manage things yourself, hire or ask advise.

    Tuur *thumbsup*

  • Hello all!
    Somebody please tell me ...
    This works:

    Code
    echo "<hotspot name=\"$row[0]\" url=\"$row[1]\" ath=\"$row[2]\" atv=\"$row[3]\" edge=\"$row[4]\" visible=\"$row[5]\" />";

    And this does not work:

    Code
    echo '<hotspot name='".$row['name']." ' url='".$row['url']." 'ath='".$row['ath']." 'atv='".$row['atv']." 'edge='".$row['edge']." 'visible='".$row['visible']." ' />';


    What is wrong? I want a "normal" type code.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!