Disable image hyperlinks (wordpress + photonic + zenfolio)

General questions on how to do things using Photonic.

This forum is not actively monitored. For support topics please post them to https://wordpress.org/support/plugin/photonic/.
Locked
hilarycam
Posts: 10
Joined: 30 Jan 2016, 06:43

Disable image hyperlinks (wordpress + photonic + zenfolio)

Post by hilarycam » 30 Jan 2016, 07:15

Just started testing out Photonic, love it - it could revolutionise my website workflow. But I am having a few issues - here is a major one:

Is there a way to disable the hyperlinks for images when displaying Random Tiled Gallery using the Zenfolio 'photosets' code. Also wanting to remove the cursor and image number/name that displays on mouseover.

Basically I want the images (thumbnails) to be static, with no interactivity or links. (I've already turned off the lightbox features, but the link and mouseover text remains)

Below is an example of the mouseover display I want to be able to disable (and the 'a href' itself of course).

Image

Is there a way to turn this off? If not is there some code I can remove or change within Photonic_Zenfolio_Processor.php or to prevent links occuring in zenfolio photosets?

Thanks so much - and keep up the good work with this plugin!

sayontan
Site Admin
Posts: 10210
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas
Contact:

Re: Disable image hyperlinks (wordpress + photonic + zenfoli

Post by sayontan » 02 Feb 2016, 17:47

You could try this:
  1. Go to photonic.js (under include/scripts)
  2. Look for this block of code, near the end of the file:

    Code: Select all

    						var anchor = $(this.anchor);
    						anchor.attr('title', photonicHtmlDecode(this.a_title));
    						anchor.data('title', this.a_title);
    						$(elem).append(anchor);
    
    						var img = document.createElement('img');
    						img.setAttribute('src', this.src);
    						$(anchor).append(img);
    
  3. Change it to:

    Code: Select all

    						var anchor = $(this.anchor);
    						anchor.attr('title', photonicHtmlDecode(this.a_title));
    						anchor.data('title', this.a_title);
    //						$(elem).append(anchor);
    
    						var img = document.createElement('img');
    						img.setAttribute('src', this.src);
    //						$(anchor).append(img);
    						$(elem).append(img);
    

hilarycam
Posts: 10
Joined: 30 Jan 2016, 06:43

Re: Disable image hyperlinks (wordpress + photonic + zenfoli

Post by hilarycam » 03 Feb 2016, 16:19

Thanks Sayontan! That worked an absolute charm! Perfect. :D

Really liking this plugin now.

Locked