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.

3sfera

Intermediate

  • "3sfera" started this thread

Posts: 224

Location: Mexico City

Occupation: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Send private message

1

Tuesday, May 15th 2012, 2:52am

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

Sam Rohn

Trainee

Posts: 109

Location: Brooklyn, New York

Occupation: 360° VR Photographer

  • Send private message

2

Tuesday, May 15th 2012, 3:27am

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
Sam Rohn :: 360° Panoramic Photography :: Location Scout :: New York City :: www.samrohn.com

PanoPress :: WordPress Plugin for 360° Panoramas in Flash & HTML5 :: www.panopress.org

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

3

Tuesday, May 15th 2012, 4:01am

RE: Get KRPANO to read from a DATABASE

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
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

3sfera

Intermediate

  • "3sfera" started this thread

Posts: 224

Location: Mexico City

Occupation: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Send private message

4

Tuesday, May 15th 2012, 6:19am

-----> 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!

3sfera

Intermediate

  • "3sfera" started this thread

Posts: 224

Location: Mexico City

Occupation: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Send private message

5

Tuesday, May 15th 2012, 6:22am

¿Any idea of how to read content from an excel spreadsheet from KRPANO? My clients are used to manage all their data in this tables so it would be more than fine to get KRPANO in comunication with an excel spreadsheet, ¿would it be PHP again?

Cheers!! *thumbsup*

Sam Rohn

Trainee

Posts: 109

Location: Brooklyn, New York

Occupation: 360° VR Photographer

  • Send private message

6

Tuesday, May 15th 2012, 8:41am

wordpress panorama map

-----> 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/discussio…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
Sam Rohn :: 360° Panoramic Photography :: Location Scout :: New York City :: www.samrohn.com

PanoPress :: WordPress Plugin for 360° Panoramas in Flash & HTML5 :: www.panopress.org

Zephyr

Professional

Posts: 994

Location: Netherlands

Occupation: Web developer

  • Send private message

7

Tuesday, May 15th 2012, 10:57am

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

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<krpano>
<map>
<?php
$con = mysql_connect("localhost","peter","abc123");
if ($con)
  {
 
mysql_select_db("my_db", $con);

$result = mysql_query("SELECT * FROM Maps");

while($row = mysql_fetch_array($result))
  {
  echo '<spot id='".$row['id']."' />';
  }

mysql_close($con);
}
?>
</map>
</krpano>


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.
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

8

Tuesday, May 15th 2012, 1:34pm

Quoted


"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

Source code

1
2
3
4
5
6
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");
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

Zephyr

Professional

Posts: 994

Location: Netherlands

Occupation: Web developer

  • Send private message

9

Tuesday, May 15th 2012, 1:47pm

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

Source code

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

in the xml:

Source code

1
<include url="file.xml?v=%$version%" />
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

3sfera

Intermediate

  • "3sfera" started this thread

Posts: 224

Location: Mexico City

Occupation: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Send private message

10

Friday, May 18th 2012, 9:15pm

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

RedFox

Beginner

Posts: 3

Location: Moscow

  • Send private message

11

Friday, January 17th 2014, 9:41am

Hello all.
Do not quite understand how to add in xml file php elements.
What is the approximate order of actions?

Thank you for your attention.

Tuur

Sage

Posts: 3,190

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

12

Saturday, January 18th 2014, 11:33am

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*
http://www.virtualtuur.com
Skype:studiotuur

RedFox

Beginner

Posts: 3

Location: Moscow

  • Send private message

13

Wednesday, January 22nd 2014, 9:45am

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

Source code

1
   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:

Source code

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

Posts: 1,850

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

14

Wednesday, January 22nd 2014, 4:54pm

You don't need your variables in quotes. And see if your variables echo at all to check for proper key names.

Source code

1
   echo '<hotspot name='.$row['name']. ' url='.$row['url'].....
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

RedFox

Beginner

Posts: 3

Location: Moscow

  • Send private message

15

Thursday, January 23rd 2014, 11:56am

Unfortunately, does not work.
Even with the addition of screened quotes.

Similar threads