Link Cloaking Plugin Update

Some time ago I created a WordPress plugin that can cloak affiliate links automatically. Today I’m releasing a new version, with all-new feature(s)!

The main improvement I’ve implemented is “static link cloaking”. The previous version of the plugin could only cloak links that you’ve actually used in a post, which is inconvenient if you want to use the cloaked link anywhere else, like forums or e-mails, because the cloaked URL might change or stop working if you edited the post. This is still true for automatically cloaked links, but now there’s a new feature available – static links.

Static Links Are Different

  • Independent from the rest of your blog’s content – add any links and use them anywhere!
  • No numbers tacked on the end.
  • The number of hits is tracked!

Here’s an actual example of how a (static) cloaked link’s URL looks –
http://w-shadow.com/goto/GTrends/ (goes to my keyword research tool).

Using Static Links
You can add, remove or view the links in the Manage -> Cloaked Links tab. This page contains a form for adding new links and a list of existing cloaked links, if any. The list also shows the number of hits for each link. Note that the plugin counts all hits, including those generated by search engines and the like. This means that the number will probably be a bit higher than the actual amount of clicks the link received.

A link is defined by a name and a destination URL. The name is what you’ll see in the cloaked URL – in the example above it’s “GTrends”. The name shouldn’t contain any special symbols, like spaces, question marks, non-latin characters and so on. For best compatibility, use only latin letters, numbers and underscores in the name field. The name is case-insensitive and must be unique for each link.

The destination URL indicates the address to which the visitor will be redirected when he clicks the link. No surprises here – just make sure the URL is correct.

Adding static cloaked links is easy – just enter the name and URL in the corresponding boxes and click “Add”. The resulting cloaked URL will look similar to this – http://your_blog_address.com/more/MyLink/. “more” is a prefix that you can set in Options -> Link Cloaking and “MyLink” is the link’s name. You can also view the cloaked URL by clicking the “show cloaked url” thingy near each links destination URL.

To delete a cloaked link, click the “Delete” link in the corresponding row.

Download : WordPress Link Cloaking Plugin, ver. 1.1 (9 KB)

Installation Notes
After you’ve uploaded and activated the plugin, you must go to Options -> Permalinks and click Update Permalinks. This is necessary even if you have the previous version installed. The cloaked links won’t work if you don’t do this! Complete installation instructions and more information about this plugin are available in the original post.

Share :
  • Reddit
  • del.icio.us
  • Digg
  • StumbleUpon
  • DZone
  • Ping.fm
  • Sphinn
Related posts :

83 Responses to “Link Cloaking Plugin Update”

Pages: « 1 [2] 3 » Show All

  1. 24
    White Shadow says:

    Yes, it uses “301 Moved Permanently” redirects.

  2. 25
    Walt says:

    Hi. Great idea for a plugin.

    I loaded the latest version and followed the instructions, but I’m getting… well.. unpredictable results. Although the redirects seem to wok fine for the posts, links on pages all redirect back to the “home page”. And, not all of the links in pages get cloaked. Not seeing a pattern, so I’m not quite sure what to tell you.

    It there any way to “fine tune” the plugin a bit more? For instance, can I tell the plugin I only want Clickbank and/or Amazon links to get cloaked, and let everything else just sail through like normal?

  3. 26
    White Shadow says:

    The plugin uses the same exact algorithm for pages and posts, so there shouldn’t be any difference – unless there’s a conflict with another plugin.

    There’s the “Exclusions” feature to define which links you don’t want cloaked. There’s no “Inclusions” list, though you could use selective cloaking – adding the <– cloak –&gt tags – to achieve a similar result. I might add that feature in a later version, but … don’t count on it :P

  4. 27
    earncow says:

    Ah cool tool bro :) recommended

  5. 28
    BigKahuna says:

    I am having some difficulty getting this plugin to work…I have it installed but several of the directions are in conflict with what I am seeing. For instance you say “go to Options -> Permalinks and click Update Permalinks.” I do not have any “Options” tab…is this the same as “Settings” (I am using wordpress(.org) 2.5. If I go to Settings->Permalinks there is no “Update Permalinks” setting; only a “Save Changes” at the bottom…please help…I have no idea what I am missing.

  6. 29
    White Shadow says:

    The instructions were written for WP 2.3, so in WP 2.5 it’s slightly different. In WP 2.5, “Settings” replaced “Options”, and you only need to “Save Changes” for the permalinks to be updated.

    The plugin works with WP 2.5, but you may need to manually move the cloaking-related redirection code to the top of your .htaccess file.

  7. 30
    BigKahuna says:

    I did figure out that the site didn’t have an htaccess file so I added one. I also chanced the permissions to 766. Unfortunately whatever I am doing is not updating the htaccess file with whatever code it needs to be able to utilize this plugin…hopefully I am getting closer…any help would be greatly appreciated.

  8. 31
    BigKahuna says:

    Here is what my current htaccess file looks like:

    Options All

    # BEGIN WordPress

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

    # END WordPress

  9. 32
    White Shadow says:

    Try changing the permalink structure, saving the canges, and then changing back to the initial structure. This should update the file.

    Are you sure you looked in the right place for the .htaccess? In most cases, .htaccess would already be present on a WP blog.

  10. 33
    BigKahuna says:

    Ok…I tried to do what you said to do and that didn’t work. When I go to Manage -> Cloaked Links and fill in the 2 fields and select “add” a messed up version of my site shows up where I am assuming the new link should be showing. I tried to deavtivate the plugin and reactivate it but no luck.

    I am not sure about the htaccess file. I had always thought it would be in the “public_html” folder. When I looked for it there using Filezilla I didn’t see it. I found a post claiming that some WP versions omitted it and gave directions on how to include one (which I did in the “public_html” folder). Root directory (using Filezilla) looks like this:

    -Site (folder)
    -logs (folder)
    -public_html (folder)
    -home (folder)
    -wordpress (folder)
    -.htaccess (file)
    -index.php (file)

    Hope any of this helps…thx for everything thus far!

  11. 34
    BigKahuna says:

    Sorry for being such a pain…I realized something while I was typing my last response…I uploaded a file called htaccess.txt. Once I changed it to .htaccess it disappeared from the directory in Filezilla…thinking it was something I did I readded htaccess.txt, changed the permissions and renamed it to .htaccess…the file disappeared again. Now I am thinking that there are 3 copies of the file in my directory but that they are hidden…how can I unhide them?

  12. 35
    White Shadow says:

    So is your blog installed in the root directory, or the “wordpress” directory? I’m guessing it’s the second, though you might have some kind of different, advanced setup. Maybe the .htaccess should be in the “wordrpess” directory.

    Regarding the “Add” bug, it sounds like something that might be caused by an unusual site structure, but I’m not sure…

  13. 36
    White Shadow says:

    Filenames starting with a dot (”.”) are treated as “hidden” on Linux/Unix systems. You can probably make them visible by changing some settings in Flexzilla, but I’m not familiar with that software, so I can’t help you there.

  14. 37
    BigKahuna says:

    Ok found the right htaccess file and here are the contents…it looks right but I am still not getting the right results…what do you think?

    # BEGIN WordPress

    # Link Cloaker Plugin BEGIN

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

    # Link Cloaker Plugin ENDS

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

    # END WordPress

  15. 38
    White Shadow says:

    Interesting. Those lines shouldn’t look like “/plugins/plugins/”… why are they like that? Either the .htaccess file is wrong, or the plugin is installed incorrectly. The plugin files should be located inside “wp-content/plugins/link-cloaking-plugin/” – in their own directory inside “plugins”.

  16. 39
    BigKahuna says:

    Thanks a ton for helping me diagnose the problem…it looks like the files got uploaded but were not in a folder…my web guy removed the plugin and reinstalled it in the folder and it worked like a charm.

  17. 40
    White Shadow says:

    @BigKahuna – Congratulations :)

  18. 41
    jan says:

    I got an error when trying to add a static link. The “hits” field in the db needed to have a default value. If you have this problem then the following sql query will solve it :

    alter table wp_cloaked_links change hits hits int(10) unsigned default 0;

    Very cool plugin though. Congrats.

  19. 42
    Pushkar says:

    How to make it work for subdirectory ? my wordpress is in /blog directory and the links are just not redirecting. So a page link like /goto/afflink don’t redirects anywhere, eventually showing 404 error as page example.com/blog/goto/afflink do not exist on my site.

  20. 43
    White Shadow says:

    @Pushkar – The plugin shouldn’t have problems with subdirectories provided .htaccess is set up correctly (and is located in that same subdirectory). I have tested it on another blog running in a second level subdirectory (like example.com/stuff/blog/) and it worked fine.

    See what’s in your .htaccess file. There’s an example of how the file should look a few comments below (except your paths will be different, of course).

  21. 44
    Pushkar says:

    Hi Thanks alot :) I got it working. I had to move the code at the top (it was at the bottom before) and things are working like a charm. Great plugin.

    Thanks again

  22. 45
    Michiel says:

    Somehow my links are not getting tracked in the manage cloaked links. I can add a link and remove it. But i thought ALL clicks where tracked? I tried turning off all plugins. no luck.
    I’m using 2.6.1 of wordpress, maybe thats a problem?

  23. 46
    White Shadow says:

    @Michiel – Tracking works for me on WP 2.6.2 (I don’t have a 2.6.1 handy). Just to make sure we’re on the same page : only links you add on that tab (Manage -> Cloaked Links) will be tracked.

    In general if a (static-cloaked) link works – i.e. redirects correctly – it should be tracked. However, the plugin might miss some clicks because if you click the link several times your browser might decide to cache it and go to the target page right away, without accessing the cloaked link again. In this case the click wouldn’t be tracked.

  24. 47
    Ryan says:

    Thank you for the plugin.
    2 suggestions for a future release (if there will be one):

    1. Ability to edit/change static links in Wordpress Admin (including destination url).

    2. Ability to use keywords with static links. Enter certain keywords and those keywords will be turned into cloaked links anywhere they appear. For example anytime “Amazon.com” appears on your site it would automatically be converted into a link using one of your static cloaked links.

    Just suggestions, but I think they could be useful! Thanks again!

  25. 48
    White Shadow says:

    Originally Posted By Ryan
    2. Ability to use keywords with static links. Enter certain keywords and those keywords will be turned into cloaked links anywhere they appear. For example anytime “Amazon.com” appears on your site it would automatically be converted into a link using one of your static cloaked links.

    This has been suggested already, but I probably won’t add it because I don’t feel like reinventing the wheel – there are already existing plugins that can do this, and you could configure them to use the cloaked URLs as the automatic links.

    Overall, there aren’t any updates planned in the near future (for this plugin), just bugfixes – if necessary. Sorry :)

  26. 49
    Andrew Clapham says:

    The plugin works great on other sites, however for this one when you click a link it redirects back to my site. I changed the theme but still does the same thing.

    I am using WordPress 2.6.2, but that version is fine on other sites.

    Any ideas?

  27. 50
    White Shadow says:

    @Andrew Clapham – This is sometimes caused by a conflict with another plugin. Are you using any plugins that add or modify links in the posts?

  28. 51
    Patrick Curl says:

    Question – will you still get credit for trackbacks when writing posts? Pingbacks are very important to the success of my blog.

    Thanks.

  29. 52
    White Shadow says:

    @Patrick Curl – Yes, trakbacks should still work fine if you mark links with <!–cloak–> or set the cloaking mode to “Cloak all”. On the other hand, trackbacks probably won’t work with statically cloaked links (i.e. the links you define in Manage -> Cloaked Links).

  30. [...] Re: Anyone Using The MaxBlogPress Ninja Affiliate WP Plugin? Have you guys tried this free plugin? I just installed it last night and it looks pretty good to me. ø Link Cloaking Plugin Update | W-Shadow.com ø [...]

Pages: « 1 [2] 3 » Show All

Leave a Reply