Forums

[Plugin: Deviant Thumbs] Different target for links (4 posts)

  1. sylaan
    Member
    Posted 2 years ago #

    Hi,

    I am using your plugin on my blog, works perfectly. One request though: can you add an option for the widget to specify a different target for the image links ? Like "_blank" for example, to open the deviantart page in a new window/tab.

    Or where exactly would I edit the code to do this ?

    Thanks,
    Stefan

  2. scribu
    Member
    Posted 2 years ago #

    See deviant-thumbs/deviant-thumbs.php around line 127:

    $thumbs[] = str_replace(' rel="nofollow" target="_blank"', '', $data['value']['items'][$i]['content']);

    Replace it with this:

    $thumbs[] = str_replace(' rel="nofollow"', '', $data['value']['items'][$i]['content']);

  3. sylaan
    Member
    Posted 2 years ago #

    Hi Scribu,

    Thanks for the quick answer. I replaced the line but I see no difference, the links still open in the same window. I tried to delete the cache but under wp-content/uploads I have no deviant-thumbs folder.

    And if I look in the generated page, the hrefs for the pictures don't contain the _blank target which explains the behavior. You can see this for yourself at http://www.nektulos.de. Refreshing and deleting browser cache didn't help much.

    Any ideas ?

    Thanks,
    Stefan

  4. scribu
    Member
    Posted 2 years ago #

    Try emptying the cache directory:

    wp-content/uploads/deviant-thumbs

Topic Closed

This topic has been closed to new replies.

About this Topic