Topic: Previously viewed images

Hello,

Is there any way to show the user previously viewed images rather than right back to the index page? I have a link to my test site below. When you click on a bike, it takes you to a detail page. But when you click the return to road bikes link, it takes you back to the index page, and right back to the first bike. Is there a way to return it to the previous bike thumbnail? If a person clicks through 12 bikes, I would like them to see what bike they left off, or at least previously view ones ... Or is there another solution??

Thanks!

Here's the example:

http://www.steelpen.com/westhillshop/road/road.html

Re: Previously viewed images

Take a look at the 'Direct Linking and Back Button Support' example in the SimpleViewer-Pro API: http://simpleviewer.net/simpleviewer/pr … tml#direct

Steven Speirs
SimpleViewer Support Team.

Re: Previously viewed images

Steven Speirs wrote:

Take a look at the 'Direct Linking and Back Button Support' example in the SimpleViewer-Pro API: http://simpleviewer.net/simpleviewer/pr … tml#direct

Sorry, I just can't figure this out! How do I get the # in the url? I tried using the code in the page you sent but I can't get that # to start the direct linking ...

Re: Previously viewed images

In your gallery's HTML page, you'll need to include the file 'swfaddress.js' and use the following embedding code:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="svcore/js/simpleviewer.js"></script>
<script type="text/javascript" src="swfaddress.js"></script>
<script type="text/javascript">

var svAPI;

function svComplete() {
    svAPI = document.getElementById('svInstance');        
};        

function svImageChange(index){
    document.location="#" + (index + 1);
}

SWFAddress.onChange = function(){             
    if(svAPI != null && svAPI.getImageIndex() != getLocationIndex()) {
        svAPI.showImage(getLocationIndex());
    }
}

function getLocationIndex() {
    return location.hash.substr(1) - 1;
}

var flashvars = {};
flashvars.enableAPI = "true";                     
flashvars.firstImageIndex = getLocationIndex();

var params = {};            
params.allowfullscreen = true;
params.allowscriptaccess = "always";
params.bgcolor = "222222";

var attributes = {};
attributes.id =  "svInstance"; 
attributes.name = "svInstance";

jQuery(document).ready(function () {
    SV.simpleviewer.load('sv-container', '100%', '100%', '222222', true, flashvars, params, attributes);
});

</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

On each of your 'details' pages, you have a 'Return to road bikes' link.
You can make each of these links return to a specific image in your gallery by using a hyperlink such as:

<a href="index.html#12">Go to 12th image in gallery</a>
Steven Speirs
SimpleViewer Support Team.

Re: Previously viewed images

Thank you for your reply. We're getting warm but it's still not working right. I have the #s in the url but when it goes back to the bike's landing page, the URL always rolls back to #1. If I manually enter #2 and #3 into the url, it works. Any thoughts on why it just defaults back to #1.

Here's the url for your reference:

http://0339684.netsolhost.com/cyclotest/cyclocross.html

Thanks for your help!!

Re: Previously viewed images

I notice you are using SimpleViewer Pro v2.1.0.
Try upgrading to v2.1.3.
You can download the latest version using the link in your purchase email (upgrades are free within the same major version number).
If you cannot find the email or your link has expired, please fill in this form to receive a new link: http://simpleviewer.net/support/admin/upgrade.html
Once you have the new version:
(1) Replace the 'svcore' folder in your gallery with the 'svcore' folder from the SimpleViewer Pro download package ('simpleviewer_pro_213/web/svcore')
(2) Change the embedding code in your HTML document from:

jQuery(document).ready(function () {
SV.simpleviewer.load('sv-container', '100%', '100%', '222222', true, flashvars, params, attributes);
});

... to:

simpleviewer.ready(function () {
simpleviewer.load('sv-container', '100%', '100%', '222222', true, flashvars, params, attributes);
});
Steven Speirs
SimpleViewer Support Team.

Re: Previously viewed images

Sorry. I upgraded. Changed the code. And it still doesn't work right ... Can you please see what I'm missing or doing wrong?

Thanks!

Re: Previously viewed images

This might help ....

http://0339684.netsolhost.com/cyclotest/cyclocross.html

Re: Previously viewed images

Try removing firstImageIndex="0" from your gallery's XML file.

Steven Speirs
SimpleViewer Support Team.

Re: Previously viewed images

GENIUS!!! Thank you! It works perfectly ... thank you! I appreciate your prompt help ...