Topic: Hotlink Problem?

Hi there,

I've set up the SimpleViewer to work locally or with the .html and .swf etc in the same website directory.


But when I tried to link the swf from another site, then I got "gallery not found"  error.

The files are located at, say:

http://website1.com/gallery/

,which is not accessible if you browse it from outside of the domain.



And here's my script put in the .html on another website:

        <script type="text/javascript" src="http://website1.com/gallery/swfobject.js">
        </script>
        
        <div id="flashcontent">This content requires JavaScript and the Flash Player.
        <a href="http://www.macromedia.com/go/getflashplayer/">Get Flash.</a>
        </div>
        
          <script type="text/javascript">
          var fo = new SWFObject("http://website1.com/gallery/viewer.swf", "viewer", "500", "500", "8", "#dddddd");
          fo.write("flashcontent");    
          fo.addParam("wmode", "transparent");    
          </script>


Here's my gallery.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<simpleviewergallery maxImageWidth="500" maxImageHeight="400" textColor="0x333333" frameColor="0x999999" frameWidth="0" stagePadding="0" navPadding="10" thumbnailColumns="6" thumbnailRows="2" navPosition="bottom" vAlign="top" hAlign="center" title="website1.com" enableRightClickOpen="false" backgroundImagePath="" imagePath="" thumbPath="">

<image>
    <filename>img_01.jpg</filename>
    <caption>stuff</caption>    
</image>

</simpleviewergallery>


If i put on rewrite url:

          RewriteEngine on
          RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?website1.com [NC]
          RewriteCond .(jpg|jpeg|png|gif)$ [NC]

Then i got the message: "this content requires flash player and javascript"


I'm a bit frustrated, please help.

Thanks a lot.

Regards,

Cipher

Last edited by Cipher (2009-11-20 10:24:12)

Re: Hotlink Problem?

fo.write("flashcontent");  should come after fo.addParam("wmode", "transparent");  other then that the code looks ok. I would double check that all of your files are in the right location, also you could try using relative paths. Beyond that I would need to see it in action.

Mike Richards
SimpleViewer Support Team.

Re: Hotlink Problem?

Thanks for your reply.

I could not use relative path, as this .html is on another domain, so I have to specify the full URL.

Which brings me to think,  maybe it's because the .swf did not know where the .xml file is?

Is there a way for me to specify full url for the xml file?

Thanks

Re: Hotlink Problem?

Add fo.addVariable("xmlDataPath", "gallery.xml");   before  fo.write("flashcontent");

Mike Richards
SimpleViewer Support Team.

Re: Hotlink Problem?

Thanks soooooooooooo much!

Now it's working!