WordPress.org

Ready to get started?Download WordPress

Forums

WP Photo Album Plus
[resolved] Title Tags on non-wppa images (7 posts)

  1. pburns
    Member
    Posted 7 months ago #

    Appreciate the hard work on your plun-in thanks. On non wppa images with a href link the images is ignoring my title="xyz" (tag) and shows the (title tag) of the page the image is on, on mouse over. Making it very confusing to a visitor.

    Example my Contact-Us button title tag on mouse over should say "Click to Contact Us" not "Home"

    When I unchecked IV G 5 in settings the problem goes away put it is a nice touch to have non wppa images open in light box when linked to a media link url.

    It would also be nice if the Magnifying glass zoom tool would work on non wppa imagines. Thanks hope you can assist. Paul
    If you need to see the page go to bathrenovationhq.com and hover over the contact button

    http://wordpress.org/plugins/wp-photo-album-plus/

  2. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 7 months ago #

    Please try this:

    Edit wppa-filter.php.

    From line 402 it reads:

    function wppa_lightbox_global($content) {
    global $wppa_opt;
    global $post;
    
    	if ( wppa_switch('wppa_lightbox_global') && $wppa_opt['wppa_lightbox_name'] == 'wppa' ) {
    		$pattern ="/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
    		$replacement = '<a$1href=$2$3.$4$5 rel="wppa" title="'.$post->post_title.'"$6>';
    		$content = preg_replace($pattern, $replacement, $content);
    	}
    	return $content;
    }
    
    add_filter('the_content', 'wppa_lightbox_global');

    Change to:

    function wppa_lightbox_global($content) {
    global $wppa_opt;
    global $post;
    
    	if ( wppa_switch('wppa_lightbox_global') && $wppa_opt['wppa_lightbox_name'] == 'wppa' ) {
    		$pattern ="/<a(.*?)href=('|\")(.*?).(bmp|gif|jpeg|jpg|png)('|\")(.*?)>/i";
    		$replacement = '<a$1href=$2$3.$4$5 rel="wppa" $6>';
    		$content = preg_replace($pattern, $replacement, $content);
    	}
    	return $content;
    }
    
    add_filter('the_content', 'wppa_lightbox_global');

    The change is in one line only: $replacement = ...
    If it works, i will put it into the next version.

    The magnifying cursor can be solved by css ( put in any css file:

    img {
    cursor: url ("http://bathrenovationhq.com/wp-content/plugins/wp-photo-album-plus/images/magnifier-small.png") !important;
    }
  3. pburns
    Member
    Posted 7 months ago #

    Hey Jacob the PHP change worked perfectly, thanks. The css for the Magnifier would not work. I put the css in my custom css area (Genesis Theme) I added .img and tried adding the id="2240" to the css. tested in firefox and IE8 and IE9. Any thoughts? been playing with the css for a couple of hours now.

  4. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 7 months ago #

    Pls stop playing with css. I will put the magnifier cursor in too.

  5. Jacob N. Breetvelt
    Member
    Plugin Author

    Posted 7 months ago #

    This is the trick:

    $replacement = '<a$1href=$2$3.$4$5 rel="wppa" style="'.' cursor:url('.wppa_get_imgdir().$wppa_opt['wppa_magnifier'].'),pointer;'.'"$6>';
  6. pburns
    Member
    Posted 7 months ago #

    Your the man, nice fix. Paul

  7. pburns
    Member
    Posted 6 months ago #

    Hi Jacob nice fix, one question for you, the zoom tool is showing on images being used for jump links e.g. a button with a contact form picture that is linked to jump to the contact form. Might make it a little confusing to folks is this something that can be address in your php. or can I address it in how I'm doing the html in my markup.

    this is my anchor(<div>id="form"</div>)

    this is my link: it show an image with caption and both are links to the contact form and shows a zoom tool instead of the pointing finger

    ([caption id="attachment_1367" align="alignleft" width="65"]<img src="http://bathrenovationhq.com/wp-content/uploads/contact-us-button-75.png" alt="Go To Our Contact Form" width="65" height="65" class="size-full wp-image-1367" /> Click For Contact Form[/caption])

    You can see the page at bathrenovationhg.com/contact-us
    funny thing is this doesn't happen when an image is linked to another page? Appreciate your assistant. Paul

Reply

You must log in to post.

About this Plugin

About this Topic