Support » Plugins and Hacks » automatic adding wp-highslide to image links

  • if you dont want to add the <highslide></highslide> tag on each image when posting, just add these lines on the JavaScript Settings, on the wp-highslide options:
    Add under the ‘hs.preloadImages();’ method, inside the ‘window.onload = function() {‘ function:

    var elements = $A(document.getElementsByTagName('a'));
            if(element.href.endsWith('jpg') || element.href.endsWith('png') || element.href.endsWith('gif'))
                element.className = 'highslide';
                        var element = Event.element(event);
                        return hs.expand(this);

    You need prototype loaded for this to work, so be sure to load it before (you can add the js link on the top of the wp-highslide settings).
    With this script all image links on your blog will use the highslide thumbnail viewer.
    I posted a portuguese tutorial here.

  • The topic ‘automatic adding wp-highslide to image links’ is closed to new replies.