Search…

X3 Photo Gallery Support Forums

Search…
 
mwr
Experienced
Topic Author
Posts: 84
Joined: 08 Sep 2009, 20:57

How to create html files that contain URL parameters?

11 Sep 2009, 11:15

I've seen here that a way to eliminate parameters from the URL that goes directly to a folder of images is to somehow embed those parameters into html files such as gallery1.html, gallery2.html, etc. I don't know enough to do that. I'm an OK monkey-see/monkey-do coder, but that's about it. I'd appreciate an example of what such an html file would contain.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

14 Sep 2009, 04:39

Yes, in your root gallery folder, there should be a file called index_example.html. First of all, you should use this as a base template for any html files you create for Imagevue.

Now in that document, scroll down until you see the following items:
Code
var flashVars = {
	foreground_color: 'EEEEEE',
	background_color: '222222'
};
Those are basically the default flashvars, and you can add other parameters there also. For example, if you want to go to a specific startfolder:
Code
var flashVars = {
	foreground_color: 'EEEEEE',
	background_color: '222222',
	startpath: 'content/folderpath/'
};
Now you have your own html file, that goes directly to a specific startpath of the gallery. PS! Keep in mind to have comma after every line, except the last line. This is ultimately an ARRAY, so really it looks like this:
Code
{foreground_color: 'EEEEEE', background_color: '222222', startpath: 'content/folderpath/'}
 
mwr
Experienced
Topic Author
Posts: 84
Joined: 08 Sep 2009, 20:57

14 Sep 2009, 07:38

Thanks! That worked like a charm.

One more question about this area. As a test to try to shorten the URL even more, I tried putting the start...html file into the root directory of my website (not in /gallery), but got "Oops! - This page requires javascript" message when I sent the browser to it. I'm curious why javascript wouldn't have been enabled in that root directory when it obviously is enabled in the /gallery folder.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 14452
Joined: 30 Sep 2006, 03:37

14 Sep 2009, 09:38

Well, if you are trying to avoid the "gallery" url, then you should have uploaded your entire imagevue folder into the root of your website in the first place instead of "gallery".

However, you should be able to do it your way also, but then you need to edit the PATH to the javascript also .... check the top of your document, you have something:
Code
<script type="text/javascript" src="imagevue/javascript/swfobject.js"></script>
<script type="text/javascript" src="imagevue/javascript/swfaddress.js"></script>
Should perhaps be...
Code
<script type="text/javascript" src="gallery/imagevue/javascript/swfobject.js"></script>
<script type="text/javascript" src="gallery/imagevue/javascript/swfaddress.js"></script>
 
mwr
Experienced
Topic Author
Posts: 84
Joined: 08 Sep 2009, 20:57

14 Sep 2009, 11:38

Thanks. I'm learning...