I've made this simple panoviewer to give my customer a fast preview.
What it does is simply to look through a directory and sort and
display all jpg-files* as panoramas using ptviewer. It is restricted
to use same fov, tiltmin etc. for all pano in a tour.
NEW in this version:
- As an alternative to change the default parameters in the main script,
you can now put the variables in a text-file named 'param.inc'.
The script automatically looks for this file - and if present the
variables from this will be used.
- Added 'sz'-variable which holds thedirectory name
to different sized pano-files. Defalt to none. The new directory must
be inside the 'pano'-directory - You can name it what ever you like,
e.g. &sz=big, as long as it conforms to the path
standard of your server [ you should not use space though!] As the
script still collects the filename-list from the files in the root
of pano-directory, the filename must be the same as the standardsized
New in last update:
- Added 'pft'-variable for pano-extension. Default 'jpg' - can be
set to jpc / jpa / mov or other ext. [In the old version it would
try to display any file in the pano-subdir as panorama = red ptviewer
if not a picture-file]. If you use another format than jpg remember
to have the needed class-files in ptviewer.jar .
- CHANGE!! Now if you set the Url-variable
&usc=yes the filenames in the scroll-list are split at
first occurance of character '_' [underscore] , so that anything
before is removed. E.g. if you name your files 001_Exterior, 002_Garden_view,
etc. the list will discard the 001_ and 002_ and only show
. The default is now &usc=no. [ I had
to change it this way, as the former script would diplay empty items
in the listmenu if the filename didn't contain '_'. If you alway have
a number prefix with underscore you can change the default to 'yes'
- see below ]
Here is what you need:
PHP-installation [ download from www.php.net
- the foxserv-packages includes apache and mysql and is really
easy to install - works fine with Window XP Home ]
Your pano.jpg- files*** should be in a subdirectory
called "pano" of a subdiretory called
whatever you want***.
If you want your own wait-image [logo] it should be in a subdirectory
The first version listed and tried to display all files in the pano-dir,
even non picture files. It'll now only list files with the extension
'jpg' or the extension set by variable pft [se below].
** You need some kind
of server to run PHP and you have to web-share the main directory
- read more on www.php.net
- if you have window xp home [that won't work with MS Personal Webserver]
I'll recommend installing apache-server via www.foxserv.net.
***The panos will be
sorted in alphanumeric order, so if you want a certain order you
should name your panofiles with a numeric prefix [ like 01_exterior.jpg
]. As all jpg-files are listed, the pano-directory, should only
contain panorama jpg's.
**** The directory structure:
[main directory - PHP-shared]
e.g. "house104" ]---[subdirectory "pano"
- only contain panos-jpg*]
To run the simpleview.php you then have to provide at least
one URL-variable, the post-variable, like this:
the post-variable is the name of the first subdirectory.
Here is a full list of URL-variables you can set :
post: the name of the first subdirectory *** w and h: the width and height of the applet-window pID: first pano to show [used on where newPanoFromList doesn't
work and you have to reload entire page or if you want to make links
for individual panos - e.g from anexternal text-link or image map] fov: initial fov value tiltmin: e.g = -70 to hide tripod logo: name of the wait-image bgcolor: page backgroundcolor [for color you can use either
plain text like red, gray, .. or hex like 000000, AA00FF] tcolor: text color tbcolor: table backgroundcolor title: Title writen above the panoview - use %20 for space pft: extension for your pano - set this if you use compressed
jpa/jpc - if not set it looks for jpg. usc: set to 'yes' if you want to clean prefix number [001_]
from the listnames. sz: the name a subdirectory[of the pano-directory] for differnt
and here is an example URL with all variables set:
For the URL-variables not set some default are set in the php-script.
If you allways use the same values, you can change them to you own
default. Look for this code at the top of the simpleviewer.php [the
value to change are showed in red
You can also keep individual
variables in an include textfile named 'param.inc'
placed in each main subdirectories [e.g. 'house104'] . You can set
one or all of the variables above from $pID and down - The structure
of the text-file is like this:
If you don't have PHP on your online server you can grab and copy
the code from the webbrowser and save as html-file. Only thing that
won't work is the jump-menu on browser that won't allow communication
pID-variable - for these cases you have to save as individual html-files
TIP! You can make a simple customer login page to go to the simpleviewer.
All you need is a form with a field where the customer enter their
subdirectory as password and rest of the variables are set as hidden
fields. Here is en example [ you can copy the code as is and/or