WordPress.org

Ready to get started?Download WordPress

Forums

Auto ThickBox Plus
[resolved] request - clickable caption (6 posts)

  1. thomask
    Member
    Posted 2 years ago #

    i love this plugin, i just miss one feature - it would be great if it would be possible to make clickable the full wp-caption div, not only the image.

    http://wordpress.org/extend/plugins/auto-thickbox-plus/

  2. attosoft
    Member
    Plugin Author

    Posted 2 years ago #

    Hi thomask,

    Thank you for using Auto ThickBox Plus.

    I have no idea what "the full wp-caption div" is. wp-caption is class attribute value?

    ThickBox window closes by clicking an image by default. So do you want to close the window by clicking TB_caption div? Or you want to jump to another page?

  3. thomask
    Member
    Posted 2 years ago #

    if you add the image with caption, it creates something like

    <div id="attachment_544" class="wp-caption aligncenter" style="width: 310px"><a href="http://money.mediacentrum.cz/wp-content/uploads/money-s3_money-dnes.png" class="thickbox no_icon" title="money-s3_money-dnes"><img class="size-medium wp-image-544" title="money-s3_money-dnes" src="http://money.mediacentrum.cz/wp-content/uploads/money-s3_money-dnes-300x232.png" alt="Money S3: úvodní obrazovka Money Dnes" width="300" height="232"></a><p class="wp-caption-text">Money S3: úvodní obrazovka Money Dnes</p></div>

    problem is, that for opening thickbox, i need to click that a href, but very often it would make more sense, if it would be possible to click the whole div, so even the caption text

  4. attosoft
    Member
    Plugin Author

    Posted 2 years ago #

    HTML code above is generated by [caption] shortcode. So your request is about not Auto ThickBox Plus but WordPress feature. I guess you use "Insert into Post" button in "Add Media".

    To open href URL by clicking wp-caption div, you need to modify img_caption_shortcode() function in wp-includes/media.php file, or to hook img_caption_shortcode filter with add_filter() function.

  5. thomask
    Member
    Posted 2 years ago #

    yes, it is via standard insert into post.

    i know i could use img_caption_shortcode filter, actualy i was doing it for standard opening images, but i was wondering that it would be much better to just modify your script, so it will not hook on jQuery('a.thickbox'), but (also) on jQuery('a.thickbox').parent('wp-caption') selector.

  6. attosoft
    Member
    Plugin Author

    Posted 2 years ago #

    Well, you resolved the problem in your blog.

    I wonder whether other users want clickable caption. I often use right-click search in Google Chrome. But it is hard to highlight texts if texts are clickable. I may implement the feature if there is same request from other people.

    Additionally, I don't want to write codes for WordPress to thickbox.js. I intend to keep thickbox.js standalone as much as possible.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic