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 :

433 Responses to “Link Cloaking Plugin for WordPress”

Pages: « 1 2 3 4 5 [6] 7 8 9 10 1115 » Show All

  1. 134
    Authcode says:

    This is a great plugin – thanks – but is there any way it can be modified to also mask links in the RSS feed? Can WP plugins even run on the RSS feed?

  2. 135
    White Shadow says:

    @Authcode – Yes, it probably can. I think you would only need to apply the plugin’s the_content filter to the_content_rss and/or the_excerpt_rss, too.

    I don’t know if that makes any sense to you ;)

  3. 136
    Authcode says:

    @White Shadow – Not really! :) But I’ll see what I can do (or break). Thanks again for a great plugin.

  4. 137
    bloggylicious says:

    Thank You!!

  5. 138
    gulflee says:

    The Plugin shows “could not be activated because it triggered a fatal error.”" in wordpress 2.3.1 ? is there any things have to be fix?

  6. 139
    gulflee says:

    the problem occur here
    WordPress database error: [Table 'localhost_name.wp_cloaked_links' doesn't exist]
    SELECT * FROM wp_cloaked_links ORDER BY name ASC
    any ideal ? tq

  7. 140
    White Shadow says:

    That SQL query is executed only on the static link management page, so it can’t be running at activation.

    I don’t know what, exactly, causes the crash on activation, but apparently the required table wp_cloaked_links doesn’t get created. You could try creating it manually :

    CREATE TABLE wp_cloaked_links (
    	id INT UNSIGNED NOT NULL AUTO_INCREMENT,
    	name VARCHAR( 150 ) NOT NULL ,
    	url TEXT NOT NULL ,
    	hits INT UNSIGNED NOT NULL,
    	UNIQUE KEY name (name),
    	PRIMARY KEY id (id)
    );
  8. 141
    affboy says:

    Here is a easy tool can cloak, even encrypt links.
    FYR
    http://Hide-Affiliate-Links.com/

  9. 142
    White Shadow says:

    @affboy – yay, shameless self promotion.

  10. [...] expert Hi I am currently experimenting with the ‘link cloaking plugin’ available here: ø Link Cloaking Plugin for WordPress | W-Shadow.com ø It automatically cloaks all links barr your own domain by default. Thats from memory but pretty [...]

  11. 144
    Authcode says:

    I’m running version 1.2.2 of this plugin which seems to have stopped working after I upgraded Wordpress to version 2.6. Is anyone else getting this? All my cloaked links goto my blog’s 404 page – I’ve had to deactivate for now.

  12. 145
    White Shadow says:

    @Authcode – I had some problems with this, but I think updating permalinks fixed it.

  13. 146
    Authcode says:

    @White Shadow – Managed to fix it by updating cloaking settings several times (strangely, didn’t work the first couple of times). I think the Wordpress Automatic Upgrade plugin screwed my plugin settings when it tried to restart them all unsuccessfully after the upgrade. I’ll remember to check my links next time! Cheers.

  14. 147
    Jeff says:

    I just installed the plugin on a couple of my blogs. The first blog the plugin worked great. The second one I had some problems with it. It was interferring with my other plugin “ALINKS” … a plugin to create links to certain keywords. I couldn’t figure out a way to fix the plugin for this page so I just deactivated it because I need the alinks plugin more… If you have a fix for this I’d love to hear about it!

    Otherwise great plugin!

  15. 148
    White Shadow says:

    @Jeff – It might be possible to make both plugins work together, but the links created by ALINK wouldn’t get cloaked anyway.

  16. 149
    Jeff says:

    Yeah, the links from ALINKS were getting cloaked correctly… However, all the links were off by 1. Meaning…. If I had three links in the page… the first link would direct to the second, the second would direct to the third and the third would direct to the associated tag.

  17. 150
    Ash says:

    Is is possible that this plugin can cloak urls in comments and custom fields (of posts)?

  18. 151
    Ash says:

    Found the solution to cloaking custom fields in the comments, thanks. Could’nt find anything regarding cloaking links within comments.

  19. 152
    White Shadow says:

    @Ash – Not at this time; not in the foreseeable future either :P

  20. 153
    Ash says:

    Thanks White Shadow, i’ll try and find another way around the comment links.

    I’m having difficulty cloaking banner ads i’m running from custom fields, your previous ‘hack’ for custom fields worked a treat where i had a plain url to cloak but can this be modified where the url is included within banner code in the custom field?

    Here is an example of the code (links removed) that i include in a custom field called banner468

  21. 154
    White Shadow says:

    @Ash – It’s doable, but would take a lot of thinking/hacking. I’m not up for it at the time, sorry.

    If you want to give it a try yourself, you could use the $url_pattern regexp to extract the URL from the banner and then modify the previous hack to handle these additional URLs.

  22. 155
    Hugo Santos says:

    and what about an option to automatic link insertion to a given keyword instead? :)

  23. 156
    White Shadow says:

    @Hugo Santos – There are already other plugins that can do that :P However, most of them would have compatibility problems with this plugin, unless you use them to insert “statically cloaked” links.

  24. 157
    minimaus says:

    @White Shadow

    Hi White Shadow,

    I put your plugin onto my website: http://nguyenngocminhhanh.com/

    But when clicking on cloaked link, it redirected to not_found.html.

    Could you please take a look and help me work out?

    Thanks

  25. 158
    White Shadow says:

    @minimaus – Looks like the plugin isn’t executed when you click the link. Have you updated the permalinks after setting up the plugin? If yes, check the .htaccess file and make sure the “cloaking”-related rules (they should be marked as such) come before the main WordPress rules.

    Addendum : I looked at your site more in-depth and it appears you are not using “fancy” permalinks. Might it be because mod_rewrite isn’t supported by your host? If that’s the case then this plugin will not work on your site.

  26. 159
    minimaus says:

    @White Shadow

    Many thanks. Could you please give me a recommendation of a script, plugin that overcome this host limitation.

    minimaus

  27. 160
    White Shadow says:

    @minimaus – I don’t have any specific recommendations, but you should be able to find something on Google.

  28. 161
    minimaus says:

    @White Shadow

    How the .htaccess file look like?
    Mine like this:

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    order deny,allow
    deny from all
    allow from all

    order deny,allow
    deny from all

    # BEGIN WordPress

    # END WordPress

  29. 162
    White Shadow says:

    @minimaus – Try adding these three lines between the lines that say “Begin WordPress” and “End WordPress” :

    RewriteEngine On
    RewriteRule goto/([^/]*)/([0-9]+)/([0-9]+)/? wp-content/plugins/link-cloaking-plugin/wplc_redirector.php?post_id=$2&link_num=$3&cloaked_url=$0 [L]
    RewriteRule goto/([^/]+)[/]? wp-content/plugins/link-cloaking-plugin/wplc_redirector.php?name=$1&cloaked_url=$0 [L]

    I’m not 100% sure it’ll work, but it could make the plugin function correctly.

  30. 163
    minimaus says:

    @White Shadow

    Big big thanks to your helps, White Shadow, even it turn out that the host do not support this plug-in. Maybe i would consider to change to another hosting service.

    bigmaus

Pages: « 1 2 3 4 5 [6] 7 8 9 10 1115 » Show All

Leave a Reply