Link Cloaking Plugin for WordPress

I’ve created a plugin for WordPress that can cloak outgoing links in your posts and/or pages.

Features

  • Choose what to cloak – all links, only the links you specify or no links at all.
  • Choose where to cloak – posts, pages or both.
  • Configure the URL – you can set the “prefix” part of the URL (see examples below).
  • Exception list – links pointing to domains in this list will not be cloaked. For example, this is useful if you have chosen to cloak all links but don’t want to cloak the links to your own domains.
  • Compatible with all browsers – the link cloaker plugin doesn’t use JavaScript so it will work even for visitors that have disabled JS.
  • “Smart” cloaking – relative, ambiguous or malformed URLs will not be cloaked. Better safe than sorry.
  • As of version 1.1, static link cloaking.

New! The premium version of this plugin is now available and includes several new features :

  • Cloak links in any part of your site, including the comment section and the sidebar.
  • Works with plugin-created links.
  • Five new cloaking types – for example, you can display the cloaked URL in a frame, or use a special redirect that hides the referrer.
  • Improved link management and click statistics.
  • Free automatic updates.
  • And more. Check out EclipseCloaker.com for complete details.

Examples

Here’s a link explicitly tagged for cloaking -
<a href="http://evil-guide.tripod.com/"><!--cloak-->A Cloaked Link</a>
And here’s what it looks like in the post – A Cloaked Link
If you have configured the plugin to cloak all links (the default) you don’t need the <!–cloak–> tag inside your links.

Installation

  1. Download the link-cloaking-plugin.zip file.
  2. Unzip the file.
  3. Upload the `link-cloaking-plugin` folder to the `/wp-content/plugins/` directory.
  4. Activate the plugin through the ‘Plugins’ menu in WordPress.
  5. (Optional) Go to Settings -> Link Cloaking and modify the default settings to your liking.
  6. Re-save your permalink settings to insert the plugin’s link redirection code to the WordPress .htaccess file : go to Settings -> Permalinks and click “Save Changes”.

Download

Version 1.8.2 : link-cloaking-plugin.zip (10 KB)

Requirements :

  • WordPress 2.8 – 3.0.1
  • mod_rewrite. If “pretty permalinks” work on your blog then you probably have this already.
Share :
  • Reddit
  • del.icio.us
  • Digg
  • StumbleUpon
  • DZone
  • Ping.fm
  • Sphinn
  • Twitter
Related posts :

594 Responses to “Link Cloaking Plugin for WordPress”

Pages: « 19 10 11 12 13 [14] 15 16 17 18 1920 » Show All

  1. 385
    White Shadow says:

    My mistake, it should be apply_filters(“the_content”, $output). do_action is almost the same thing but it doesn’t return any output.

  2. 386
    Walt says:

    That did the trick. Thanks!

  3. 387
    Walt says:

    However… I have a new problem. I have 2 links on the same page that (should) point to the same destination. The first one looks like:

    /goto/visit_the_product_s_homepage_/4561/1

    That one works

    The second link, which is associated with an image looks like

    /goto/link/4561/2

    That one does not work. It just goes back to the blog’s home page. I tried to remove the /link part but that made no difference.

    Any ideas?

  4. 388
    White Shadow says:

    I’ve uploaded another update; maybe it will work now.

  5. 389
    Walt says:

    I downloaded the release. It still seems to work the same. Here’s some clues (I hope).

    I turned off the plugin completely. All (original) links worked as expected. When I turned it back on, the same thing as reported earlier was happening. The first rewritten link was working, the second with the /link in the URL was not.

    Now, here’s the weird part. That particular post had a URL in the post plus a linked image. A similar post, that only had a single linked image, worked just fine. And, that linked image also had the /link in the URL.

    So, it would appear that it’s not the /link that is throwing everything off, but the /2 that is doing it.

  6. 390
    White Shadow says:

    Well, the plugin will redirect a cloaked link to the homepage when it can’t find the original URL in the post. In this case, although it found and cloaked the image link at first, for some reason it couldn’t find the link again when it was time to redirect the user to the target page.

    This usually happens when one of the links in the post is created by another plugin. Does that ring any bells?

  7. 391
    Walt says:

    Hmmmm. I see where you’re going with this. Yes, there is a plugin that adds the first link when the post is rendered. So, in the rendered post your plugin finds 2 links, but in the original version of the post there is actually only one.

    The two displayed links are actually identical, but the link cloaker apparently just counts links regardless of what it finds.

    I’m not entirely sure how to handle it other than just drop the automatic insertion of the first link.

  8. 392
    Walt says:

    OK. So, I tested it out. You were correct. Does this mean that any modifications to templates could have the same result?

  9. 393
    White Shadow says:

    Links inserted via template manipulation wouldn’t get cloaked at all.

    Stuff like this will be fixed in the “Pro” version – among other things, it will be able to cloak any link, regardless of how it was added and where it’s located – but that version will be commercial (though the price will probably be relatively modest).

  10. 394
    Walt says:

    Will it be handled via database in the Pro version? Or some other mechanism?

    Any thoughts as to when pro might be available?

  11. 395
    White Shadow says:

    Yes, all the links the plugin encounters and needs to cloak will be stored in a database. That is, both the automatically cloaked links and cloaked links that are explicitly defined by the user will be stored in one place. The analytics will be slightly improved, there will four or five redirection mechanisms, etc.

    This version should be feature-complete and usable in a week or so, but I’m not sure how long the other stuff associated with this release will take – e.g. updating documentation and maybe even coming up with something akin to a sales page.

  12. [...] You can download the plugin and get more information here: WordPress Link Cloaking Plugin [...]

  13. 397
    Walt says:

    Hi, me again. Got another “mystery” for you (or, maybe it won’t be for you :) .

    I have some feeds that are posting to my blog. One of the links won’t cloak. You can view the format of it in the website link I posted.

    Anyway, it is formatted as

    http://www.avantlink.com…………..&url=http://www.fetchdog.com……..

    Since it is the only type of link I have that has two domains inside the url, I’m wondering if that is throwing the cloaking off?

  14. 398
    White Shadow says:

    The URL shouldn’t matter, unless it’s invalid. I tested the cloaker with URLs that contain two domains and it worked fine for me. Can you show me the full URL, or, better yet, the entire <a href=….>…</a> tag?

  15. 400
    White Shadow says:

    It still cloaks correctly in my tests. Maybe it’s not the URL itself but rather something in the tag that’s causing this? Is the URL properly quoted? Are there any additional parameters in the tag, like rel=”nofollow” or target=”_blank”?

  16. 401
    Walt says:

    Hmmm. I copied and pasted it as it shows up. When I view the source, there are no other tags associated with the href. I dunno – I’ll put some echo’s in and see where it’s dropping out. Maybe there’s another filter that’s doing something before it gets to the link cloaker.

  17. 402
    Sue says:

    Your plugin works fine on my site. everything except the affiliate link I have placed on the sidebar – on the home page. I think it may be because there is a configuration page for the theme that I am using which allows be to place the image location and re-direct link. I have set to cloak all pages by default. I tried adding at the end. did not work. any help? thanks.

  18. 403
    White Shadow says:

    The plugin doesn’t currently cloak links outside of post content (e.g. sidebars, comments, page header of footer). But due to popular demand, this feature will be added in the next version.

  19. 404
    Carl says:

    I am having the same problem with 2.8.4.

    I have checked the .htaccess and the code is above the wordpress code.

    I am getting 404′s aswell – does it conflict with phplinkdirectory?

  20. 405
    White Shadow says:

    I’m not aware of any conflicts with that plugin. Have you tried deactivating phplinkdirectory temporarily and seeing if you still get 404 on cloaked links?

  21. [...] Link Cloaking Plugin for WordPress [...]

  22. 407
    Ricardo says:

    Hi,
    I use the plugin about a year but never had cloak a link from ebay.
    After having made it the plugin crashed and will not let me delete the link with the cloak i had before.
    I uninstalled the plugin and reinstall again and everything was equal. I can no longer use the plugin at this site.

    Someone can help me.

    Regards

  23. 408
    White Shadow says:

    Unfortunately this version of the plugin doesn’t delete the saved cloaked links when you uninstall it. You need to manually remove the link from the wp_cloaked_links table in your database (this can be done with something like phpMyAdmin).

    If you could post the eBay link here, I might be able to find out why it crashes the plugin, and fix the bug.

  24. 409
    OneMoreGadget says:

    I just have to thank you for writing such a great and simple to use application. More people should know about this. I have spent hours and hours trying all sorts of cloaking plugins, you name it I downloaded it and isntalled it.

    Basically every single plugin for wordpress I have tried and yours is the best.

    The only flaw was that it didn’t open links in a new window, but that simple code that White Shadow posted does the trick, and it wasn’t scary at all to do. Phew.

    Thanks again, great job.

    OneMoreGadget

  25. 410
    OneMoreGadget says:

    Now if I could only find a plugin that automatically fixes typos…ahem.

  26. 411
    janPeter says:

    hello,

    What can i do by custom_fields?

  27. 412
    mike says:

    When i mouse over the link it is cloaked, but I get a 404. I deactivated all plug ins and still get 404. Any ideas?

  28. 413
    White Shadow says:

    Do you have a caching plugin installed? It might be serving the old cached version of the page.

    Try going to the target (uncloaked) URL directly; maybe it’s simply down?

  29. 414
    Chelle says:

    Sidebar links would be nice :) Other than that, a nice handy plug-in.

Pages: « 19 10 11 12 13 [14] 15 16 17 18 1920 » Show All

Leave a Reply