Hostel PRO for WordPress

This is our new plugin for small hotels, hostels and BnBs. It deserves its own site so here it is:

The free version resides on WordPress:

Why another hotel plugin?

First, this is not a hotel plugin, it’s a hoStel plugin. The big difference is in the simplicity. Most hotel plugins are designed, well for large hotels and suffer from huge feature overload. Hostel and HostelPRO aim to the small hostel/hotel/BnB owner and serves two main purposes:

  • To let you set up quick and easy website for your hostel – with WordPress and the plugin
  • To let you manage your rooms and bookings

When you look closer you’ll quickly figure out there is no other plugin like this.

Who Supports It?

We do. I.e. the same folks who built WatuPRO, BroadFast for WordPress and Namaste! LMS. HostelPRO is in a good company and if you judge by our other plugins it’s here to stay and grow.

Questions and suggestions? Let us know!


WordPress: How To Properly Add Your Custom Post Type To Your Homepage

Does your WordPress plugin create a custom post type? Read on.

Sometimes you’ll want your custom post type to be displayed in the home page along with other posts. This is what we had to do with Namaste! LMS.  We wanted the courses user create to get included in the homepage.

The official Codex page offers some solution here. And it’s not good. The problems with solution are two:

  • It misses ‘nav_menu_item’ type which will cause problems with some designs
  • More important: it assumes you are the only one who wants to add their post type to the main query.

There are several other forum threads and blogposts which suggest nearly the same with a few extra configurations.

All these solutions may work if you work on a custom site but not if you want to release a plugin to the public. I quickly realized that when working on Daskal using the same advice and figured out Namaste!’s custom post type setting overrides Daskal’s custom post type setting in the main query. And this is to be expected because the solutions suggest that you simply have to hardcode all the required custom post types.

You shouldn’t do this.

The Proper Way To Handle This

You should add your custom post type to the existing post types. If there are other ones added in the main query, you shouldn’t be overwriting them.

So, here’s the code you need:

add_action( 'pre_get_posts', 'your_pre_get_posts_function' );

function your_pre_get_posts_function() {
   if ( (is_home() or is_archive()) and $query->is_main_query() ) {
       $post_types = @$query->query_vars['post_type'];

	// empty, so we'll have to create post_type setting			
	if(empty($post_types)) {
	   if(is_home()) $post_types = array('post', 'page', 
              'nav_menu_item', 'your_custom_post_type');
	   else $post_types = array('post', 'nav_menu_item', 
	// not empty, so let's just add it
	if(!empty($post_types) and is_array($post_types)) {				
	   $post_types[] = 'your_custom_post_type';
	   $query->set( 'post_type', $post_types );
   return $query;

That’s it. In the code above we check whether the use is on homepage or archive page, and whether it’s the main query.
Then we are getting the current post types. If they are empty, we’ll just create the array like most guides are suggesting.
However if it is not empty, we’ll add it to the array instead of assuming our plugin is the only one that wants their post type in the home page.

Comments welcome.

Learning Management System for WordPress

We have released another open-source project, this time a WordPress plugin. Namaste! LMS is a learning management system for WordPress, completely free and up to date with the latest versions of the blogging platform.

In short, this first public version can do the following:

  • Manage courses and lessons
  • Manage students
  • Enroll students in courses
  • Create assignments and approve/reject their solutions.

There are rather flexible rules which define when to consider a lesson or course completed depending on solved assignments, exams (via Watu/WatuPRO), visited lessons, manual approvals and so on. Check the site for more detailed info.

The plugin is still new and there’s a lot to do. It starts well though, with more than 100 downloads from the first few days. My goal is will turn into a very user-friendly and frequently updated free LMS.

(Why WordPress? Because there is Moodle as stand-alone solution, and WordPress is easiest CMS. This does not exclude the plans to make Joomla or other CMS based learning management system in the future).


This is my latest hobby project – a Javascript library for creating interactive drawing boards. RoCanvas is not new, but initially it was a HTML5 “component” which wasn’t a good idea, because integration is harder and has more constraints. So I decided to follow the approach of apps like CKEDITOR and make it a Javascript class. So you create an instance, call function on the class and this converts existing Canvas element into a RoCanvas board. Various settings are available. Have a look at the docs linked above so I don’t rewrite the same stuff here.

There is a lot to do, plenty of known issues, and lots of ideas for the future. Of course as it’s not a business project at this time I don’t know when I will have time to continue.

Sharing it here so more people can see it and maybe find it useful. If you have any suggestions or forks, they are most welcome.

Eventy For WordPress

Eventy was the first sell-able product I made about 8 years back. It was also the reason to start at all, and to choose that domain name for it.

The product is still selling but in general I see less interest in stand-alone scripts as opposed to plugins for most popular CMS like WordPress, Joomla, Drupal and so on. (I can confirm this with the release of WatuPRO  Wordpress pluginn which is selling better than the more feature-rich Watu Plus albeit the same price). The reason for this must be that systmems like WordPress gained a lot of popularity and finally became good enough for managing really dynamic sites. So many webmasters choose such a CMS and extend with free and premium plugins. It’s much easier to install several plugins than to try to install several completely independent PHP scripts and try to make to make them work together in a consistently looking site.

So here is in short Eventy PRO. It will remain here at PIM team because I want to try splitting the marketing over two sites (will write more about this soon).

Freelancers, Here Is The Best Way To Find Work

There are many discussions over Hacker News about how freelancers can find clients. Of course you have many options – from personal contacts, to sending cold emails, making cold calls, bidding on freelance sites, etc. But I think there is much better way, and it is fairly simpler. It comes from software developer’s perspective so I’ll talk mostly about developers. The approach should be applicable to other professions too.

Release. Ship.

Release and ship some software out there. Get real users. Some will contact you for customizing your stuff or for entirely custom development. The more people your stuff reaches, the more will contact you.

In some industries being blonde might be a better approach.

Of course your mileage will vary a lot depending on how you do it. Depending on who you ship your products for. This is the point where many developers fail. Think about this:


Who Is Your Customer?

Many developers who try this approach fail because they focus on building some technologically impressive piece that will show how great programmers they are. Doing this may work for building your impressive portfolio and eventually land you a job. Impressive portfolios by themselves do not bring contract work.

Instead of trying to shine with your genius think about who is your potential customer. I’ll give you some examples:

  • If you are a game developer looking for contract work, then the regular gamer is not your customer. Your customer is the small game studio or indie game developer who may need some help with programming. Releasing a game may eventually catch their attention but releasing stuff that game developers use (libraries, tools, whatever) is a lot more likely to do so.
  • If you prefer to develop utility desktop programs your customer is not the regular desktop user who downloads programs for free. Your potential customer are small businesses who develop software or may benefit by developing software. So create some stuff that may reach this kind of people.
  • If you are a web developer your customer is a webmaster who needs custom app developed for their websites. Create software for webmasters and you’ll get some of them contact you for customization. I’m talking personal experience here – I’m getting a lot of requests for customization or entirely custom apps from webmasters who use my scripts (I have to turn most of these offers down because I have no time for them).

Paid Works Better

I’ve got a lot more inquiries from users of our commercial products than from the ones who download our free ones. And I’m talking as absolute number here, not percentage, although you can imagine a lot more people have our free stuff. Why is that so? I’m not sure but here’s my “educated” guess:

  • People who paid for your product are more likely to pay for custom work (and pay a fair price) rather than people who use stuff for free. There are plenty of exceptions so don’t take this for granted. But the real numbers are in favor of paid users.
  • Business customers tend to take more serious developers who sell their stuff. If you have a website and sell a product you must know some business and be serious enough to handle support etc. On the other hand is the free: every kid releases free programs so there’s no guarantee that you aren’t some weirdo who just likes to program and aren’t easy to work with.

This is at least what I suspect. There might be other reasons too.

Releasing products to your target users requires creativity and hard work of course. But you don’t need to impress with amazing skills to land some freelance work. Just find out who is your target prospect and make sure you release stuff for them.

I’d be happy to hear about similar strategies from freelance writers, designers, photographers etc. I believe similar approach will work for them.

Why Not eInk Tablets?

I recently read news about nook touch rooted to Android 2.1. Seems like a great idea for someone like me who wants the benefit of eInk – long time working on batteries and eye-friendly display, but with the features that tablets provide.

I wonder why tablet manufacturers don’t look closer at eInk. Yes, it’s grayscale (yet), not good for watching video or playing games, but for everything else it could be good. Chatting, checking email, reading news, even writing code. Perhaps e-reader manufacturers should not lock them with reading-only software but have OS like Android and some good reading apps. People wouldn’t need to hack them then.

By the way if you are interested in ereaders it’s good to subscrive to Dani’s e-reader news site. It contains hand-picked news and articles. No noise, only the most interesting and most important news.

SEO-Friendly Ajax

Loading parts of your content with Ajax is cool, but the problem is search engines don’t quite follow javascript links.

Here is very simple way to solve this problem.

1. Use links with onclick attribute like this:

<a href=”some_url” onclick=”loadContent(page);return false;”>Load Page</a>

The search engines will follow the URL you have given to the “href” attribute. The browser will not follow it because of the “return false” statement in the onclick.

If you are using click handler with jQuery or similar library, follow the same logic.

Your ajax function (in this case called loadContent) should also call the same “some_url”

2. Make sure your system makes difference beetween calling some_url by ajax and calling it normally. This can happen very easy if you add a POST parameter to your ajax request. Then on the server side you can simply check whether the paremeter is there or not.

3. If the request comes by ajax, return only the piece of content that must be loaded in the ajax placeholder in your original page.

If the request does not come by ajax, load a full page with navigation and everything. Why is this needed? Because search engines may index these direct URLs and send traffic there. When real visitor lands on such page you want them to see your full site design with header, footer and navigation, and not just the piece of content that the ajax call needs to load.

I think there’s no need of examples, but if it’s unclear let me know in the comments.

Bulgaria Travel Hacker (Our latest info-site)

I have not had much time to post here recently due to work and other projects. One of them just went live yesterday. Bulgaria Travel Hacker is a site with practical information for people who want to visit my country. If you ever wondered how is everything like in it, the site will give you first-hand information about places to visit, food, safety and more.

The design is by Dani Velkova. The site is based on a simple custom CMS, which on the other hand is based on a variation of the Celeroo framework.

How To Ask For Tech Help

Here are some of the worst ways:

– “Hey, this software is giving me errors! Fix it ASAP!”
Comment: What errors? Which software? Don’t think that the tech guy is in your head.

– “Open this URL: xxxxxxxxxxxxx. Go to A. Then do B. Then click on the green triangle. Then login as XXX/YYY. Try to add ZZZ as a friend. See what’s happening!”
Comment: Why the heck didn’t you just tell me that you were seeing an error?

– “The feature XYZ is not working!!!”
Comment: What exactly is not working? Is it giving an error? Is the screen going blank? How did you understand it’s not working?

– “I’m doing this and that and then the program does that and this”.
Comment: So… why are you telling me this? Is there something wrong in what have happened and if yes, what is wrong?

– “I saw the code, you are using XYZ (recursion, global variable, function instead of class or whatever he thinks is wrong). This is not the right way, I have a friend in Oracle and they are using ZYX!”
Comment: just because the guys in Oracle use something, it doesn’t mean it’s good for your case.

Here is the right way to ask for tech help when there is a problem:

“I have a problem with XYZ. It should do A, but it does B. Here is how to reproduce:… (if asked)”

Or to elaborate a little bit: start with the problem. Don’t tell me to go somewhere and do this or that but tell me what exactly is wrong and why do you think it’s wrong. If there has been an error, copy it and send it to me. If the program is showing a blank screen, tell me it’s a blank screen. If the function is returning wrong result, tell me that and let me know what you think is the right result. Don’t just tell me “it doesn’t work”. This makes the tech support mad and doesn’t bring any useful information. If asked, be ready to explain how to reproduce the error.

Following this pattern you will get your problem solved quickly. Often the tech guys can fix a problem in a minute if you give them the SQL error you have seen on the screen and can lose hours trying to figure out what eventually you could have done so it resulted in some error.