In my efforts to add VR tours to my collection of many hundreds of panoramas, I want it so that when a user clicks "next" the panorama they go to next is decided by an external program. That's because I will have many possible tours you can take through the collection, with "best of" and subset and "360 only" or "2009" as possible tours. As such, the order of the tours will change and can't easily be stored inside the XML files for the panoramas.
At first, I think I got confused because the term "url" is used for both the arguments of openurl (which takes and http URL for the browser) and openpano. From the look of things the latter does not take a URL. Sadly, before realizing this, I made a CGI which does a redirect to the (web) URL of the xml of the panorama that is next or previous in the tour.
So if that won't work, what's the best way to do this? I have a few options I can keep in mind, hand-generating a special custom XML including the definition of variables with the tour, but I would have to do that for each user on the site. I could also generate a large stream of XML files for each tour which include the underlying base XML and only define the next/prev values for this particular tour. All pretty messy, so I hope there might be a better solution. I would have to make scripts to rebuild these tour files with every change.
If one doesn't exist, aside from the ability to invoke outside code in an XML, another option would be a function to use something like gdbm. Then you could make a dbm query for "file,tourname,next" and it would provide the XML of the next file (tourname would be a variable fed into the start of the tour and preserved so the XML files do not need to be duplicated.
Any other ideas on how best to do this?
Still interested as well in how to get 360 degree flat panos with no attempt at rectilinear distortion when zooming out, but still wrapping around and working in VR and the other issues from my prior thread, but I thought this question should get in a new thread in case somebody else searches for it.