Topic: Parameter passing via the address

Would it also be possible to pass a parameter so that you can link directly to a certain picture in the simpleviewer/autoviewer stream?

http://www.site.com/album1/index.php?pic=3

then either simpleviewer or autoviewer could just show the album, just with photo 3 being the starting point?

Re: Parameter passing via the address

That would be a nice feature, however it would require some PHP (or similar) code to read the parameter from the quesry string and pass it to the swf. This is not something that I would want to document or support sad

Felix Turner
SimpleViewer Support Team.

Re: Parameter passing via the address

yes, i think so... smile

Re: Parameter passing via the address

It would be a great feature to be able to pass a parameter to the swf file for setting the first picture.

People with server side scripting (php, cgi, servlets, jps, asp, ...) could then easily implement a page that has a parameter and passes its value to the swf file.

People without server side scripting could use a javascript (client side) function to set a cookie containing the image they want to show as the first image. Then in the page with the swf, they could use javascript (client side) to read the cookie and pass its value to the swf. Such javascript isn't difficult at all. See http://techpatterns.com/downloads/javas … ookies.php Of course, for visitors of the website that have cookies turned off, it won't work.

Re: Parameter passing via the address

That would be a nice feature, however it would require some PHP (or similar) code to read the parameter from the quesry string and pass it to the swf. This is not something that I would want to document or support sad

If you would agree upon integrating a parameter like "First_Picture", I would figure out the php code to get it from the url and to build it randomly as well. (solving my request for a random picture...) I am pretty sure to find someone to do the same in javascript.

Regards
Michel

Re: Parameter passing via the address

Hey guys and ladies if there are,

It's a nice request, but what's your opinion about the reverse of this.

It would be great to my opinion if clicking the image name, the picture or the thumnail (or all of them) would result in parsing this name to any other HTML or PHP document.

Then, at least I think, it will be posible to integrate in a simple way with a custom made or maybe even with a commercial shopping module.

I look forward to your comments.

met vriendelijke groet,
Berend

Re: Parameter passing via the address

If you would agree upon integrating a parameter like "First_Picture", I would figure out the php code to get it from the url and to build it randomly as well. (solving my request for a random picture...) I am pretty sure to find someone to do the same in javascript.

In javascript, to generate a random integer between 0 and 100:
var i = Math.round(100*Math.random())
It couldn't be any easier!

Re: Parameter passing via the address

In javascript, to generate a random integer between 0 and 100:
var i = Math.round(100*Math.random())
It couldn't be any easier!

Thats nice, we do howewer need the first step to get a parameter to be passed on.

Regards

Re: Parameter passing via the address

Hey guys and ladies if there are,

It's a nice request, but what's your opinion about the reverse of this.

It would be great to my opinion if clicking the image name, the picture or the thumnail (or all of them) would result in parsing this name to any other HTML or PHP document.

Then, at least I think, it will be posible to integrate in a simple way with a custom made or maybe even with a commercial shopping module.

I look forward to your comments.

That meets my request for an URL upon clicking in the centre of the picture....

Re: Parameter passing via the address

Thats nice, we do howewer need the first step to get a parameter to be passed on.

Indeed, it would be great if it were provided in the future versions of simpleviewer.
And as a developer, I don't think that it is a difficult thing to implement for the developers of simpleviewer. Just a parameter that can be passed to the flash containing the sequencenumber of the picture that has to be shown as the default picture when the simpleviewer starts.

Re: Parameter passing via the address

Hi guys and girls,

I figured it out for SV Picasa template V 1.8 with the exellent help of "s5vi" ! Most probably this will also work for normal SV 1.8 with or without source code.

In SV Picasa template it is possible to parse any parameter to a link in the <CAPTION> tag and get it included in the "galery.xml", which controls the SV ("viewer.swf").

I had to reprogram the SV Picasa template V1.8 to fully PHP, but it works and is well tested.

I'm considering together with "s5vi" if we should relaese this to Felix or make it public through this forum.

Note:
I still face a minor problem with the lenght of the URL parsed to the next page. It is cut of after 179 characters. I have to find out if this is because of limits set to "max_url_len" in the source code of SV or if it has to do with the configuration of the webserver (MS IIS). IIS seems to have some minor problems with long URL's.

Anyone any experience/ knowledge about this issue?

met vriendelijke groet,
Berend

Re: Parameter passing via the address

Direct linking to specific images is supported in SimpleViewer v1.8.5

Felix Turner
SimpleViewer Support Team.