Feature for the next release : code emancipation !

Yes, that’s the word : emancipation !

As a (humble) plugin developer and based on some of the work I’ve done to help friends get started in the affiliation business, I’ve got to say, the default affiliate searchbox is outdated in many aspects.

The code

Once you’ve looked at it, I think one of the worst part is the code. Not that it is poorly coded, but it is simply poorly documented and beyond everything else, it has not been updated in 5+ years. The result ? When you load the default searchbox on your site, on an average, you add a whooping 1309 lines of code to your page. This includes about 200 lines of HTML, about 100 lines of CSS and about 1000 lines of javascript. With the current state of this plugin, I’ve only managed to reduce the code by about 10%. That’s still wayyy too much for what it does. For those of you that are curious, you can check the code here.

As several plugin users commented over the last few months, there is an SEO cost to having such a poor code on your site. Page weight and page load time could  be also mentionned but only in a marginal manner.

With today practices, moving the old HTML / CSS into HTML5 would save a couple of lines, for sure. However the saving wouldn’t be major. Now if you look at the javascript code that runs the date calculation and the calendar rendering, there’s a great opportunity for something more impactful.

The user experience

Here I’m not going to talk about color scheme, gradients or anything about how the searchbox LOOKS. day_then_the_restI’ll save that for another day. As a visitor of your own site, did you ever find relevant to start selecting a DAY (a number actually) from a dropdown and then proceed with month and year ?

Another fun one is the calendar. old_calendarNot only the random popup location has certainly driven a few of you nuts (I’m with you on that one) but simple things like previewing 2 months instead of one have become a standard practice. I mean it is certainly a nicer option than having to key in manually your checkin / checkout dates with the dropdown seen above… but really, there’s room for improvement.

Lastly, once you’ve selected your dates in & out, what shows up in the searchbox ? Parameters ! Gone are the actual days in plain language (if your language is covered), you’re back with a first dropdown that shows you checkin day, and another that shows the month and year. People like words better than numbers.

What day am I leaving again ?

Done with the bitching ? What’s the point ?

Here comes the fun. By bringing in some industry standard into the picture, I’ve been able to elegantly get rid off the default scripting for the searchbox. What that means is instead of these ~1000 lines of old school JS code, you’ll be down to about 50 lines enabling a lot of customization… and with that customization comes a series of great user experience improvements !


  1. Look at the date display ! It’s finally only one box and it speaks in your language. You’re no longer leaving on the 27th of July 2013 : You are now leaving on Saturday, 27th of July 2013. Feels reassuring for the vast majority of your users.
  2. Only one box means it’ll take less space on the screen while maximizing the info displayed. I’ve also included the calendar icon into the field to (1) free up some space (2) make it easier for you to change the background colors without thinking about color-matching the calendar icon.
  3. Ultimately the bigger improvement resides in the calendar itself. While this example isn’t styled yet, I wanted to share that you can now display 2 months in one click -which is great for your users- and the calendar will now ALWAYS show up where it’s meant to show up. No more fancy behaviour.

At this stage, this is a very much working example but I’ve not integrated it into the DEV version of the plugin yet. I’ve got some freetime on my hands this weekend and I should be able to make some good progress.

Also, I still have a number of things to improve, like the actual LOOK of the widget, for instance. It’s a much smaller / simpler thing to do, the backend rewrite remains the priority now. After this update, the next one will most probably feature a role restriction option so ONLY the site admins can access the admni panel for this plugin.

– To stay on top of what’s coming next and the future release dates, subscribe to the newsletter here.
– You have more ideas around what could be the next big thing to be added, let me know.




Stay on top of the news : sign up to the newsletter


A number of plugin users have asked for a lazyer better way to stay in touch. While there’s always the RSS option, I figured the good old newsletter was probably the less intrusive way for everyone to remain synced.

SO, if you want to receive updates about the future functionalities & releases of this plugin, please subscribe. It’ll take a second, it’s free and I’m not asking anything personal 🙂


Feature for the next release : Greek


I’ll start a new post category to announce where I stand on the development of the plugin. I’ll warn in advance what are the features I have added and that are already being tested. They might not always be sufficient to justify a new public version, but at least people will know better what to expect in advance.

So, what have we got here ? Greek !

User Yiannis sent me not only the translation in Greek, but also all the code pieces so I only had to add it to the core. I have to say, this is not the first time it happens: Paulo submitted Portuguese and an unknown contributor sent me Turkish.


That kind of things HAVE to make you love the web.

Anyway, more to come soon.

Efkaristo poli !


Minor release : V1.0.1 is out

Hey folks,

Time for a little upgrade !

1. Widget

Based on the feedback I received, I re-introduced the Booking.com affiliate widget. Just go in your Appearance > Widget page and drag and drop it where you want it to show. Hope you’ll appreciate the dropdown menu, dynamic integration at its finest 😉

If you are using a text widget with a Shortcode with it, no worries, it’ll still work absolutelly fine.

2. Admin panel

A long time user made me realize there was no way back from categorization. You can now deselect your categorizations instead of having to recreate a searchbox. No brainer !

Good good… and what’s coming next ?

A major upgrade is on its way and it’ll start impact the design, finally. I’ve managed to have a good clean and stable code to move away from the original javascript & css from booking.com. Remember, the code they recommend affiliates to use has not been updated in 5 years… For those that have been looking into their html output, you’ll love how clean and concise the future version looks.
Over time this’ll open the door to themes or CSS theming, eventually.

But for now, just one thing to do : go to your WP install and upgrade to the latest version of the plugin !