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. 349
    Your Netbook says:

    The first suggestion worked perfectly. It’s something that I know I should have thought about but you tend to panic and think it’s something else though.

    Thanks for your help.

    Phil…

  2. 350
    3dogs says:

    Does this problem have issues with sub-domains in urls (other than www)? Everything is working perfectly except for some rover.ebay.com urls. I’ve put echo’s and var_dumps in strategic places within the script to see what goes where, and the rover.ebay.com urls never even get to the rewrite_link function. Could this be a regex issue (which is like a foreign tongue to me)?

  3. 351
    3dogs says:

    Boy, I fat -fingered (or perhaps fat-brained) that post. Change “Does this problem” to “does this plugin”.

  4. 352
    White Shadow says:

    I don’t think sub-domains are the problem here – in fact, a link pointing to “http://rover.ebay.com/” gets cloaked just fine on my test site.

    Could you post the full HTML for one of the problematic links (i.e. the entire “<a href= …. </a>” code) so I can test it myself?

  5. 353
    Michael says:

    Hi J – ,

    Editing this behind a password…I have Ad boxes for my affiliate marketing. Pulling my hair out trying to get this to work. Here is a live demo of the WP Theme I’m using: http://www.gabfirethemes.com/demos/blognews/.

    I have ads placed in the header, footer, the right sidebar (iTunes one) and the top Ad Spot 125×125 box so far. None are cloaked although I’ve got the Plugin installed.

    Do I need to design a widget for this to work? I’ve tried to use the cloaked URL in the code that I need to upload, but that doesn’t work.

    Do I need to go “static” or use in the affiliate code?

    thanks for your help.

    Michael

  6. 354
    Michael says:

    The last sentence should read….

    Do I need to go “static” or use “” in the affiliate code?

    I didn’t put quotes around “cloak” and it disappeared!

  7. 355
    White Shadow says:

    In this case you should use the so-called “static” links which can be defined in Tools -> Cloaked Links. Enter your normal affiliate URLs in that tab and then click on “show cloaked url” to get a cloaked URL for each link. Then use those cloaked URLs in your ads.

  8. 356
    rogersnz says:

    Hi

    I have been using your plugin for some time and it works really well in posts and pages.
    However I need to create a cloaked link in the sidebar. I have created a static link under Tools/Cloaked Links. However I am not sure exactly where or what to put it in my code in the sidebar.
    Have looked on this site for some examples but haven’t seen any so far.
    Can you please provide a couple of examples? That would be really great.

    Thanks, Roger

  9. 357
    White Shadow says:

    Just use the cloaked URL (the one you see when you click “show cloaked url” on that page) in the same way as you would use the original affilate link. There is nothing more to it.

  10. 358
    Michael says:

    Static Cloak did not solve the issue I’m having. I know it is not the plugin though. Trying to cloak some Amazon Affiliate html code, for example the hypothetical below. This is the entire html code.

    Tried cloaking the following:

    http://rcm.amazon.com/e/cm?t=gigfy-04&o=1&p=26&l=ur1&category=kindle&banner=8675309ad=ifr

    with and without the question marks and several other variations.

    To make things more challenging, when you do a “mouse-hover” the redirect shows “http://www.amazon.com/andsfkadskfa;sldkjfaksjdf;kajsdf” which I’ve also tried to cloak.

    Do I need to create a subdomain or subdirectory for this? I’ve tried a simple .php script where it went something like:

    mydomain/index.php?title=new page name

    where “new page name” ‘cloaked’ the above html code from Amazon.

  11. 359
    White Shadow says:

    I’m afraid I don’t quite understand what you’re trying to say. This may be because some HTML code was automatically stripped from your comment. If you want to post code, try surrounding it with <pre></pre>

    Did you try to cloak an entire HTML code block using this plugin? That would not work; the plugin isn’t designed for that. It only cloaks links, or – more specifically – URLs. It doesn’t deal with link titles, HTML code, JavaScript, Iframes or anything else like that.

    If the hypothetical HTML code contains an URL, you could take that URL, make a cloaked version of it, and modify the HTML to use the cloaked URL instead.

  12. 360
    Tor Gunnar says:

    Will you at a later time update the plugin so it will work inside your template aswell?

    That will be awsome and im sure your donate button will get 100% more used ;)

  13. 361
    White Shadow says:

    I’ve thought about it, but it would be very tricky to do and probably cause conflicts with some other plugins like WP-SuperCache. Perhaps someday :)

  14. [...] This is done through the use of a Wordpress plugin. [...]

  15. 364
    Michael Hartzell says:

    Rick,

    All the way from http://www.internetmarketingforums.net.

    This is great information. You have a knack.

    Just a shout out and will give it a tweet too!

    mike

  16. [...] To use the plugin, get the zip file from this link -> Installation -> Download the link-cloaking-plugin.zip file. Then, upload and activate the [...]

  17. 368
    tomron says:

    i dowloaded your plugin sometime ago and im using it all the time. its great so far so thanks a lot for it…now here comes the question:there is a simple tracking implemented in this plugin, it shows you how many times cloaked link have been clicked.unfortunately it shows you overall number of clicks for a link…what if i want to see how many clicks were made daily?so lets say i have these 50 links, i would like to see some kind of general DAILY summary how many times links have been clicked.i know it may be too much to implement it in the plugin but maybe you have some idea how to track it using some analytics or other tracking plugin…i was trying to figured it out but wasnt luck yet…any ideas would be much appriciated!
    so how do you daily track your cloaked links?anyone happy to help?

  18. 369
    White Shadow says:

    I think there might be a way to do it with Google Analytics. The “/goto/” (or whatever prefix you have) should look like a normal directory to GA and thus the details should be available in GA -> Content -> Content Drilldown. Unfortunately I can’t test this myself, as I have very few cloaked links on this site.

    If it doesn’t work right away you can probably force GA to track those clicks using something similar to the code that this plugin uses to track outgoing links.

  19. 370
    Paul Palmer says:

    Does anyone get an Internal Server Error when the plugin is activated? Mine does and I don’t know whats wrong.

  20. 371
    tomron says:

    thanks a lot for your fast response.
    Unfortunately /goto/ doesnt show in content drilldown…i tired to find it there before and no no :( ga doesnt track /goto/ at least for me…its something to do with “outbound” links (although your links are outbound as they are cloked they seem to be inbound)
    so tehre is a solution for outbound clicks and you kind fo mention it…you need to tag all your links with onclick parameter.The problme is that i have quite a lot of cloaked links all over the place, and tagging them manually seems like a waste of time. i havent tried oratranslplant plugin yet, i was trying to do the same with yoast – ga for wordpress plugin that is supposed to tag all outbound links automaticlly but it seems it doesnt like links your plugin create…so i dont know really…i thought you may have some solution you are using yourself or other people figured out how to do that. ill try plugin you mentioned and see what happens.thanks anyway!

  21. 372
    White Shadow says:

    You might also be able to adapt this script for your needs.

  22. 373
    Larry says:

    I am having a similar problem to Your Netbook above, but the solution seems to be different. I have resaved the permalinks and the code appears in the htaccess file as it is supposed to (code appears below). The links are cloaked in the status bar, but when you click one, it redirects to my homepage.

    Does it matter that the affiliate links use this format already?:

    ?url=

    (as in this CJ affiliate link:) http://www.anrdoezrs.net/click-(feed-id)-(my-aff-id)?url=http://www.merchant-site.com/

    # Link Cloaker Plugin BEGIN

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

    # Link Cloaker Plugin ENDS
    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

  23. 374
    White Shadow says:

    The plugin redirects to the homepage when it can’t find the original link in the source post. Links in the “?url=” format should be fine (I checked).

    This problem usually happens when the link is added by another plugin. Does that give you any clues?

  24. 375
    Larry says:

    Thanks White Shadow. I think it might.

    I am using ExecPHP, which allows me to put php inside the post and executes it for me. The affiliate links are generated dynamically by the php script inside the post or pulled directly from the database.

    Any way to get the cloaker to work anyway?

  25. 376
    White Shadow says:

    This has been a common request and will be added in a future version. However, that version may very possibly be commercial.

  26. 377
    Richard says:

    Hi,
    Please can you help.
    I have spent many hours trying to get the link cloaking plugin to work.
    I have read all of the recent forum posts and have done all the things that are talked about. Updated permalinks , checked htaccess files they are all OK and still no success.
    I have tried creating posts in two different domains that I have. One is on wordpress version 2.8.1 and the other on 2.8.2. They have different themes – one is dateless sniper and the other is on Semiologic. But there is no difference.
    I do not know which way to turn next. When I am creating a post should I be able to see the cloaking process within the link because at the moment the link just looks like a normal link when viewed in the html window.
    I await your comments.

  27. 378
    White Shadow says:

    So what exactly doesn’t work? Is it that links don’t get cloaked, or that they don’t redirect properly?

    A cloaked link will look the same when creating or editing a post. The actual cloaking happens when the post is displayed on the blog (this should also work in the post preview, if you use that).

    If you can’t get any links to cloak, check the settings page – maybe you’ve got selective cloaking turned on when what you really want is the “cloak everything” option. Or maybe the exclusion list contains something that it shouldn’t.

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

Leave a Reply