There is a new version of this plugin. Please download it from the plugin page
After the first release of the Hidden affiliate Links plugin some bloggers wanted to know if this plugin would be able to automatically replace some keywords in posts and turn them into affiliate links.
John Chow bought a plugin for wordpress that does something like that from DealDotCom (yes it's an afiliate link and it was created automatically ) but I know it wouldn't be that hard to add such a functionality to my plugin. So here's the real deal they should put on DealDotCom:
Now my plugin will let you define keywords and it will replace those keywords (when you save/update a post) with a new link you can specify. And it will still work for adding such links manually as the first version does (just don't put anything into keywords or Link fields ) .
The keywords field is actually a field where you can specify a regular expression ( so make sure you escape special characters like - or . (dot ) by placing a \ ( backslash ) in front of them.
Example Use
Let's say you write a post and you want this plugin to replace both the keywords/phrases DealDotCom and "Deal Dot Com" then the content of the keywords column should look like DealDotCom|Deal Dot Com . The "Match slug" field can be go/dealdotcom and the "New link" should be something like "/go/dealdotcom" or "http://patchlog.com/go/dealdotcom" ( without the quotes ) - this is what it looks like on your blog.
Download new version
Hidden Affiliate Links v0.2 zip file / tar.gz file
Installation
If you have already installed version 0.1 you will have to deactivate from wp-admin -> Plugins and delete the table wp_hal_links then just install the new plugin like any other plugin.
Notes
Because the plugin allows you to specify regular expression for the " Match Slug" field you will have to escape some special characters like . (dot ) , _ , - and / by placing a backslash in front of them . I could make the plugin so that this will not be necessary but that would make it lose the great flexibility that regular expression matching can offer.
ToDo:
- make it configurable so that the user can chose to match case sensitive or insensitive keywords and link slugs. At the moment the match is case sensitive but some users may not like that. It would also be nice to be able to specify this for each link.
- give the user the option to replace the keywords at runtime (every time the post is rendered). This has the advantage that the keywords on all posts will be replaced ( not just the ones you update after you install the plugin ) but has the disadvantage that it can slow down your blog
- Anything else you would like ? feed free to let me know in the comments...
Plugin uploaded and activated, now where can I find the options to enter the keywords and related URLs?, I cant see that anywhere..
go in wp-admin -> Manage -> Hidden Affiliate Links tab
I’m there.. I run through some values corresponding to those you have above, click the “Add hidden link” button, and absolutely nothing happens, in FF and IE6. No errors, no values added, nada
Getting the same problem here, any solutions?
what wordpress version are you running ?
The plguin uses wordpress ajax api to for adding those links so it may be incompatible with your version of wordpress.
The exact same thing happens for me and I am running the RC for 2.3,
My best guess is that there are some browser security settings that prevent this from working. Do other ajax apps work for you ? go into wordpress admin and edit a post, at the bottom of the page there is a section named : “Custom fields” try to add a custom field… does it work? If it works does it reload the page ?
The add customs field works and the ajax runs fine and doesnt reload the screen. I tried the add hidden link IE and FF and it wont allow me to click in either.
could you install firebug ( https://addons.mozilla.org/en-US/firefox/addon/1843 ) in firefox and then try the plugin again , and see if firebug reports any errors ( the firebug icon on the status bar would be red, if you click it you should see more about the error messages )
The Problem is in your plugin. Please change $hal_version=0.1; in your plugin file: hidden-affiliate-links.php to $hal_version=0.2;
This is the only problem, why people are not able to add a redirect link.
very nice NSpeaks! i checked this scripts online via cpanel and live editing with this, i try to replace $hal_version=0.1 with $hal_version=0.2; and this plugin responds my clicked! nice now im working with new hal. anyone have the same problem try to read from the top and botton this comment list, backup your files and try to edit, use full.
something that i want to warn anyone who using this scripts from old version into new version, before updating your script, make some backup of you database from wp_hal_links database table, if something goes wrong.
anyway thanks for the plugin, nice !
Using v 2.2.2 at the time, about to be 2.3
Very nice plugin, could you tell me how different this is from the aLinks Plugin?
Also, does this replace keywords in comments?
I haven’t really used Alinks, from what I know alinks automatically creates affiliate links from your keywords but does not hide the affiliate links. ( I may be wrong )
At firts I just wanted a simple solution to manually add hidden affiliate links. but then some wanted to automatic replace feature and since it wasn’t hard to add I just added it
Does this provide any clickthrough stats? The cloaking aspect is nice, but the stats are also important for knowing what’s working and what isn’t.
I does not provide any stats yet. Maybe there will be stats in a new version.
another idea if you want stats quickly is that you can modify the redirect code ( actually just a html page ) so that the redirect is done fully from javascript ( right now it’s done from meta and js ) and before the redirect you execute some javascript tracking code ( think google analytics code ) … google for something like “tracking rss subscribers with google analitytics ” and you shold find the solution…Maybe I’ll write a post about how you can do this …
This sounds great, I’ll have to try it out! (I just downloaded it)
Nice work on the WordPress Plugin, so you are basically using regular expression to replace these words?
Thanks. Yes it’s using regular expressions to replace them. Actually what you put in the “Keywords” field is considered a regular expression not just a keywords list. So this is very powerful cause you can match a lot of stuff with it.
Thanks for the quick reply, does this replace keywords in comments too? The way it is setup, I would think not – since it doesn’t determine it in run-time?
Also, could you tell me if this is compatible with the aLinks plugin at all? The reason being that I would like to use the deep linking module of alinks and your plugin for everything else – is that possible?
Again, nice plugin – stumbled the post š
It doesn’t replace keywords in comments but I added that to my todo list. Watch out for the new version.
I don’t know if it’s compatible with alinks because I never used alinks. If you try it let me know. In theory it should work…
Thanks for stumbling the post!
Having the same problem as a few others. Installed fine, but when I complete the fields, nothing happens when clicking on the ADD HIDDEN LINK button.
I’m using IE7 and WordPress is 2.2.1
Any ideas?
I have the exactly same problem
I just tested it on IE7 and wp 2.2.1 and it worked without any problems.
Maybe you have some security settings that don’t allow AJAX calls.
Is it my own problem or what? nothing happens when I pressed the button, “Add hidden Link”, I can’t add any link or do anything
Mihai, thanks for the great plugin and support!
I was wondering if the plugin works on WP 2.3 too?
I tried on WP2.3. managed to install but it does not work š
i’m having problem as well with wp version 2.3. it doesn’t add the link in.
I was having the same problem as most of the people here and then I looked at my 404 stats and noticed it was looking for a .js in the old versions folder, which I only had version 0.2 so I looked at the hidden-affiliate-links.php and found the version was still set to 0.1 if you change that to 0.2 it will work
I did what you said and it works!
Thank you
Well, I’m getting closer. I got it to accept a new link by implementing LazyBux’s suggestion (Thank You).
I still don’t know if what I’m typing into each field is correct. If someone has some examples, I’d really appreciate it. Right now, I’m not messing with the keywords. I just want to create a hidden link for one of my affiliate links, not switch certain key words into affiliate links.
Any suggestions and/or help is appreciated.
The first field defines what will be redirected
for example if the firs field is go/tla every link that matches that like http://patchlog.com/go/tla will be redirected
The second column defines the keywords you want to replace . if you don’t want to replace any keywords automatically just leave it empty.
The third column makes sense only if you fill in the keywords. Any matched keyword will be linked to the link defined in this third column
The forth ( Redirect to Link/Code ) column defines the actual affiliate link where the visitor will be redirected if he clicks any of the nice looking links . This can be a link or some javascript code ( like the one you use for google adsense )
The description is not that important but it is used on the pages that do the actual redirection so in case for some reason ( broken browser/network ? ) the redirection does not succeed this is what the visitors will see in the titlebar of their browser…
I hope this clears things a bit…
Thanks LazyBux It is working for me now. Cheers. š
I have it to where it replaces the keywords etc but when I click on them it gives me a 404, so I have been going into my cpanel and creating redirects. Am I missing something with it automatically redirecting?
FYI, both versions of HAfL are incompatible with Headspace 2, a meta-data management plugin from urbangiraffe.com. I may poke around to see if I can get them working together, and will report back.
I’m not using the keyword facility, just simply replacing affiliate links but I am having a bit of a problem.
When I add a link such as go/link123 it doesn’t take immediate effect and causes my blog to send users to a 404 page for a good couple of hours. Any idea why this is?
this seems like a caching problem.
Do you use any cache on your blog ?
Don’t use any caching as far as I am aware, however I have managed to find a solution. If I create a link, save it then go edit and update it works. Bit of a pain as it creates double work for me, but get there in the end.
I have just come across another issue however;
I create a link and call it “go/link3” this works fine. However later on I have created another link and called it “go/link30”. When I then use “go/link30” in a post for some reason it sends people to the URL listed in “go/link3” and NOT “go/link30”.
I’ve tried this on different numbers and find “go/link20” doesn’t go to the required link, but sends people to “go/link2”.
Is this a known issue?
ok, I love the concept here. but I’d like some clarification if I can get it?
what I think is supposed to happen is this.
post in my wordpress blog, include a link to something, with a title ref, ala
fakecat
set the title ref, >fakecat in the first field to link to someother link that I’m promoting, like http://www.loliticz.com.
So I’m thinking the text in the post should look like this?
blah, blah, blah, fakecat blah, blah, blah… When you click on the fakecat link it should not take you to http://fakecat.wordpress.com/, but rather to http://www.loliticz.com
Am I right? Is this what’s supposed to happen? If I’m just being too stupid for words, please feel free to tell me that, but also point me to what I’m doing wrong… kthxbai…
ok, I like the concept of this. having some real issues making it work.
my take on the process is:
create post with link and title href and title tags
use hafl to tag the link with new destination link? original link “some link” will now redirect click to “new link” and not show what the code is?
If I’m correct so far, let me know? if I’m totally clueless, let me know the exact process, please.
I’m running wp 2.3, I have HeadSpace2 turned off
thanks.
I get this error, Mozilla, 2.3.1 wordpress?
WordPress database error: [Unknown column ‘keywords’ in ‘field list’]
insert into wp_hal_links (slug,keywords,new_link,link,description)values (‘go/shareapic’,”,”,’http://www.shareapic.net/ref.php?owner=kimtiaz’,’Shareapic’)
0
Hi, I can’t active the plugin (I am in a local network WP for now), it says:
Parse error: parse error, unexpected $end in C:\Program Files\EasyPHP 2.0b1\www\wp-content\plugins\hidden-affiliate-links\hidden-affiliate-links.php on line 340
Can you help me? Thanks!
I get a fatal error when I attempt to activate it.
Installed. Applied fix as suggested in comments (why not just fix the download and save us all some time?) And lo and behold, hidden links just 404. Nice idea. Needs to work though (or have some clearer instructions)
Hi,
i want to replace all my links in the blog with match like “http://www.weblink123.de” to “http://www.weblink123.de/?aff=321432”. How does it works? I try, but without any result…
I’ve tried the fix and it now reads version .2, however I still click the “add hidden link” and nothing happens. I’m using WP V. 2.3.2. Please help tried for hours to get to work.
“I still click the “add hidden link†and nothing happens.”
Me too I’m using WP V2.3.3 and had the same problem…
To bad. Thats not working with WP 2.5 I still click the “add hidden link†and nothing happens. Older versions of WP works fine with the plugin.
A re-write that works with 2.5 would be much appreciated!
coming soon. I’m working on it.
Hello, 3 months gone since your message, any luck?
Hiya,
Any news on the update??
Thanks and looking forward to using this plugin!
it’s not working for me either – and I’d love it to! I am not a techie so the fix above it outsid of my knowledge base? Please fix – I would love to tell more blogger friends about it once the bugs are gone!
This has been the best affiliate link cloaker I’ve ever used — even among “professional” non-Wordpress cloakers. It’s quite possible I’ve come to rely on it TOO much.
I really, REALLY hope you update this soon to work with WP 2.5!
Thank you so much for your time and effort!
Please update this plugin to work with WP 2.5.1!!!!!!!!!!!!!!!
I’m also very keen to use this with version 2.5, would be happy to make a donation in return. Clicking on the ‘Add Hidden Link’ button gives no response at the moment
i’m using WP 2.6
Not work.
Any updated, please…?
Thanks
Has anyone got this to work on 2.5 or 2.6
I almost got it working on 2.6, but it’s hard to find time to finish it.
Mihai, Will surely wait for 2.6 version eagerly
Can't wait to for the new version! I really want to install this on my blog
This still isn’t working with the new version of WordPress.