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.
  • 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 Options -> 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 :
    • WP 2.7 and above : Go to Settings -> Permalinks and click “Save Changes”.
    • Older versions of WP : Go to Options -> Permalinks and click “Update Permalinks”.

Download

Version 1.3 : link-cloaking-plugin.zip (9 KB)

Requirements :

  • WordPress 2.2 – 2.8.4
  • 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
Related posts :

438 Responses to “Link Cloaking Plugin for WordPress”

Pages: « 15 6 7 8 9 10 11 [12] 13 14 15 » Show All

  1. [...] Problem loest das Link Cloaking Plugin fuer Wordpress. Es schreibt automatisch alle Links oder nur markierte Links in einem Post um und [...]

  2. 320
    Neal Walters says:

    Not sure what to do on this install step:
    Go to *Options -> Permalinks* and click *Update Permalinks*. This ensures the plugin’s link redirection code is added to WordPress .htaccess file.

    I’m running 2.7.1 and don’t know where the “*Options” is. I went to “Settings/Permalinks”.

    What shoudl the .htaccess look like after the update?

    Thanks,
    Neal

  3. 321
    ian says:

    Hi, sorry to ask but im not sure whats happening with the plugin. It does not cloak my text links and they wont click through. If you look at my homepage you will see this, however, it does cloak the last couple of text links on the page. I hadn’t checked to see if the links were working for some time so i dont know when this happened or why. i have tried deactivating all other plugins and it appears they have no impact on this problem. Any ideas?

  4. 322
    ian says:

    Ok, so it appears that your plugin does not cloak html text links from affiliate windows deep linking tool. I have just made them myself to overcome this. Not sure if this is just a problem with my site? anyone else had the same difficulties?

  5. 323
    White Shadow says:

    I’m guessing the deep linking tool is a plugin, right? The cloaker doesn’t work with links that are dynamically added by other plugins; this is by design and not easy to change.

    I might change this eventually, but currently there’s no workaround.

  6. 324
    White Shadow says:

    @ Vicky :
    Yes, you can edit the wplc_link_cloaking_plugin.php file and insert this code before line 102 (the one that says “return $link;”) :

    $link=str_replace('<a ','<a target="_blank" ', $link);

    @ Neal :
    Indeed, “Settings/Permalinks” is the right page in WP 2.7.x. The .htaccess file should contain a new code block that begins with “# Link Cloaker Plugin BEGIN” and ends with “# Link Cloaker Plugin ENDS”; the actual rewrite rules will vary depending on your blog’s configuration.

    The code should be above the WordPress’ own code in the file.

  7. 325
    Vicky says:

    Thanks White Shadow… it worked

  8. 326
    Neal Walters says:

    So back to the instructions “Go to *Options -> Permalinks* and click *Update Permalinks*. This ensures the plugin’s link redirection code is added to WordPress .htaccess file.”.

    I go to Settings/Permalink Settings and the only button is “Save Changes”. I don’t get what I’m supposed to do here. Does just clicking “Save Changes” do something magical if I don’t change anything on the screen?
    So my .htaccess is not getting changed. It simply contains this:
    # BEGIN WordPress

    # END WordPress

    So I went to Tools “Static Cloaked Links” and it build this link:
    http://freecsharptutorials.com/goto/LearnVisualStudio/

    I put that link on the home page for you to see as “Test Link: Learn Visual Studio”.
    It gives a 404 page not found.

    So what am I missing here?

    Thanks
    Neal

  9. 327
    White Shadow says:

    Yes, it should update the .htaccess even if you don’t actually change anything. It worked that way in older versions and it works on my WP 2.8-bleeding-edge install, so most likely that’s not the problem.

    However, your .htaccess looks suspiciously empty; did it really contain just those two lines, or did my comment filters eat the rest?

  10. 328
    Neal Walters says:

    Yes, the .htaccess is empty except for the two lines that start with the pound sign.
    Is there something I can manually type in there to get this up and running?
    I’m still confused how clicking “Save Changes” would know how to update the .htaccess file.

    Thanks,
    Neal

  11. 329
    Neal Walters says:

    Ok, if I change the Permalink Settings to “Day and Name”, then the htaccess is updated and the cloaking works fine. However, if I change it back to “Default”, then the .htaccess goes back to the two line file. So it appears that the Default settings don’t work with the cloaking? Is that correct? Or a new issue?

    Thanks,
    Neal

  12. 330
    White Shadow says:

    Oops, so it appears WP will ignore plugin-created .htaccess rules if you set the permalinks to “Default”. I’d say this is a WP bug.

    For now, select any other permalink setting to get around this problem. Hopefully I’ll be able to add a more transparent workaround to the plugin … eventually.

  13. 331
    volcomjon says:

    hi there, can you tell me how I can cloak links that dont appear in the post body – but are part of custom keys added to each post? I see the plugin reads through the actual body of posts and pages etc – but I have constructed my aff links using custom keys – and am calling them in the single post page.

    I cant add static cloaks for all my links, so how do I get this to work?

  14. 332
    volcomjon says:

    oh – and just to add, im sure its pretty important – im trying to cloak a link which is an image – NOT text.

    how can I do this in single.php (I am using custom keys as mentioned in my previous post)

  15. 333
    White Shadow says:

    Short answer : Can’t be done.

    Long answer : A feature like this has been suggested several times, but I’m presently too lazy to update this particular plugin. I’d need to completely rewrite the cloaking algorithm to let it support cloaking arbitrary custom fields.

    That said, if you only wan’t one specific field then it’s doable (but not easy). You might even find some relevant code examples in one of the older comments here. Basically, you need three things :

    * A piece of code that grabs the link from the custom field and displays it in a special cloaked form (e.g. http://example.com/goto/custom/field_name/ ).

    * An appropriate rule in .htaccess that ensures wplc_redirector.php will be called when a link like that is clicked (you can use the two existing cloaker rules as a starting point).

    * Modify wplc_redirector.php to fetch the field name from the request, load the post in question, get the field value and redirect the user to that URL.

    Good luck ;)

  16. 334
    volcomjon says:

    hi, thanks for the reply, im afraid all of that is way above me and wouldnt have the first clue where to start (regardless of your tips :) ) if anyone can help me out – in terms of supplying instructions or code, that would be great. Im using a standard name throughout all posts for the custom key (deeplink) – and it never changes

    fingers crossed

  17. 335
    Brandon says:

    This is a seriously awesome plugin!

    Thank you sooo much!

  18. 336
    Michiel Ebberink says:

    @ sebastian If you want to exclude a category you can replace some code in wplc_link_cloaking_plugin.php and leave the include on page unchecked.

    Its just my simple hack, Its probably not the best way to do t, but saves time.

    Replace:

    function content_filter($content){
    if (is_page()){
    if(!$this->options['is_page']) return $content;
    }

    else if(!$this->options['is_post']) {
    return $content;
    };

    with:

    function content_filter($content){
    if (is_category(’YourCategoryslug’)){
    if(!$this->options['is_page']) return $content;
    }

    if (is_page()){
    if(!$this->options['is_page']) return $content;
    }

    else if(!$this->options['is_post']) {
    return $content;
    };

  19. [...] Das Link Cloaking Plugin von und Janis Elts kann automatisch alle Links oder nur bestimmte Links “versteckt” werden. So können zum Beispiel Links von Partnerprogrammen “getarnt” werden. Das Plugin ist getestet bis WordPress 2.7.1 VN:F [1.2.3_620]Bitte warten…Rating: 0.0/10 (0 votes cast) Bookmarks setzen: Diese Icons verlinken auf Bookmark Dienste bei denen Nutzer neue Inhalte finden und mit anderen teilen können. [...]

  20. 338
    Roger says:

    Hi
    I have been using the link cloaking plugin successfully in the post body etc. However I would like to use it in the sidebar as well using a text widget. I haven’t been able to get it to work so far. Is there a way to do this.
    Thanks for your help. Roger

  21. 339
    White Shadow says:

    At this time, you can only use static cloaking in the sidebar. That is, manually create a cloaked link in Tools -> Cloaked Links and then use the cloaked URL in the widget.

  22. 340
    Rainer says:

    Das sollte man beachten!!
    Links in der Sitebar werden mit diesem Plugin nicht gecloakt.
    Downloadlinks die z.B. auf eine externe zip Datei zeigen, funktionieren gekloakt nicht mehr.
    Wer solche Links in seinem Blog anbietet, sollte die Funktion „einzelnes cloaken“ wählen.

  23. 341
    Deaw says:

    I ‘m using piwik.
    How to track outlinks from link cloaking?

    Now, no track link cloaking in actions –> outlinks by piwik

  24. [...] redirect. For each cloaked link I use a plugin called Link Cloaking Plugin. You can get it here: ø Link Cloaking Plugin for WordPress | W-Shadow.com ø Once it has been installed I cloak all links I want to use and then place the cloaked link in any [...]

  25. [...] you use Wordpress, there is a good plugin for cloaking affiliate links, called ’Link Cloaking Plugin for Worpress’ (surprisingly!) which you can download for [...]

  26. [...] Link Cloaking Plugin by Janis Elsts ‘Tis a dastardly contraption for fooling your visitors into thinking your [...]

  27. [...] Affiliate link cloaking with Wordpress I am using this one on a WP 2.7.1 install ø Link Cloaking Plugin for WordPress | W-Shadow.com ø Perfect and [...]

  28. 346
    saiful says:

    cool plugin. i heard this is one of the useful plugin for seo purpose

  29. 347
    Your Netbook says:

    I’ve been using this plugin for a while now and it’s always worked well.

    This week I had to re-install my site due to a plugin crash (not yours) and when I re-installed the Link Cloaker all my links started to go to my most recent post and not to the merchants page.

    I have had to de-activate the plugin now so as not to lose sales but do you have any idea what has gone wrong?

    Phil…

  30. 348
    White Shadow says:

    You probably need to update your .htaccess with the cloaker’s rules. To do that, go to Settings -> Permalinks and click “Save Changes”.

    If that doesn’t help, open the .htaccess and make sure the plugin’s code is at the top of the file. It’s the part that begins with “# Link Cloaker Plugin BEGIN” and ends with “# Link Cloaker Plugin ENDS”.

Pages: « 15 6 7 8 9 10 11 [12] 13 14 15 » Show All

Leave a Reply