Announcement

Collapse
No announcement yet.

Generating an HTML page for enlarged images

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Generating an HTML page for enlarged images

    Over the weekend I found the Hotlink Protection facility on my cpanel and tried switching it on. It did a great job of blocking the myspace and ebay hotlinks, however it also blocked my own 'Click to Enlarge Image' feature. Presumably this is because I use some Javascript to generate the following HTML:

    Code:
    <A HREF=\"javascript:ShowPopUp("../acatalog/image_filename.jpg", 800, 800)\"><span class=\"actxxsmall\">Click to enlarge image</span></A>
    I'm guessing that he problem is that I am linking to the image file directly, and the Hotlink protection prevents that, requiring the image to be referenced from an html page on the website.

    Any clever ideas on generating the HTML on-the-fly, when provided with an image filename as a parameter?

    Alan Compton
    www.greenknightgames.co.uk
    Great board games and cards games you won't find in the High Street

    #2
    Alan - does cpanel allow you to assign "friendly" zones into which you can add your own URL?


    Bikster
    SellerDeck Designs and Responsive Themes

    Comment


      #3
      Originally posted by jont
      Alan - does cpanel allow you to assign "friendly" zones into which you can add your own URL?
      Yes, the sites URLs are already added (otherwise the site wouldn't be able to display the images). I think it doesn't like the 'direct' access to a jpg - effectively displayed the jpg in a browser window, without any surrounding html.

      Gut feel: this is going to need a small perl script to generate the html.

      Alan

      Comment


        #4
        D'Oh

        After fiddling about with a perl script for two hours, I discovered a checkbox in the cpanel called:
        "Allow direct requests (ie. entering the url to an image in your browser)"

        - problem solved

        Alan

        Comment

        Working...
        X