• Resolved pmdci

    (@pmdci)


    This plug-in is great, as it can be just used in conjunction with existing WordPress festures, such as the gallery shortcode. However, there is a major feature missing. Users simply can’t navigate through galleries when using highslide.

    As a universal solution which would greatly extend the plug-in not only for highslide but possibly to other scripts, I suggest a feature where users should be able to specify code to be added to the anchor or image <img>.

    For example, I would like to add the following into the anchor of each picture in my gallery: onclick="return hs.expand(this, config1 )">

    For example:

    <a href="highslide/sample-images/thumbstrip01.jpg" class="highslide" 
    
    			title="Caption from the anchor's title attribute" 
    
    			onclick="return hs.expand(this, config1 )">
    		<img src="highslide/sample-images/thumbstrip01.thumb.jpg"  alt=""/>
    	</a>

    If each item in a WordPress gallery have the onclick attribute, then the gallery works fine!

    https://www.ads-software.com/extend/plugins/highslide-integration/

Viewing 1 replies (of 1 total)
  • Thread Starter pmdci

    (@pmdci)

    Here is how I resolved this issue by myself.

    First, I am using both the gallery-plus plug-in and the highslide-integration plug-in. The changes that really matter for me were in the gallery-plus plug-in. However, here is what you should look for in the highslide-integration.php file:

    return str_replace('<a', '<a class="highslide"', $html);

    As you can see, it is looking for the <a tag (that is, the beginning of the anchor) and replacing <a with <a class="highslide", thus adding the class <strong>highslide to the anchor.

    edit this line so it looks like this:

    return str_replace(‘<a’, ‘onclick=”return hs.expand(this, config1)”‘, $html);

    Basically, this should instruct the plug-in to append not only <a class="highslide" into the anchor, but also onclick="return hs.expand(this, config1)"

    As for the config1 value, this is optional, and is the value representing a configuration in the highslide plug-in.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Highslide Integration] Needs a way to add onclick into the <A> (anchor)’ is closed to new replies.