Category Archives: Tips

Localization and Styling Of The Datepicker in Hostel and HostelPRO

From version 1.5.9 the HostelPRO WordPress plugin and version 0.8.9 of the free Hostel plugin  there are a couple of settings that will let you easily localize and style the datepicker (calendar).

Here is how. Go to the HostelPRO Settings page and scroll near the bottom where you’ll see the following:

datepickerThe first box is blank by default. If you leave it blank, your calendar will be in English. If you want to have the datepicker in your language you need to enter localization file URL in the box.

All the jQuery UI Datepicker localization files are available at this URL. Pick the one that you need and click on it. Then click on the “Raw” button:

raw-githubThis goes to a javascript file that will be shown directly in your browser. Although you can copy the URL from the address bar of your browser and use it directly (like on our screenshot), we don’t recommend this. It’s better to save the file in your computer and then upload it to your blog. You can use the “Media” menu in your WordPress dashboard and upload the file, then get its URL. Save it in the box and that’s all – your datepicker is now going to be in your desired language.

For best performance it’s recommended that your whole blog is also localized.

The CSS theme URL defines how your datepicker is styled. We load the “smoothness” theme by default but you can change this by entering different CSS URL. Many ready themes are available on the CDN here. Just select one and feel free to copy the URL and save it. (Or download the file if you prefer, like with the localization file).

That’s it, the theme will be changed after saving. Of course you can also use the Theme Roller to create your own CSS.

Note that If you run both Hostel and HostelPRO for some reason, these settings are shared. Whatever you set in one of the plugins, affects the other one just like it is with rooms, rates etc. This ensures that when users upgrade from Hostel to HostelPRO there is no need of any manual data transfer.

Internal Server Error on PHP Scripts

Sometimes when trying to run or install a PHP script you’ll see a screen with heading “Internal Server Error”. People usually rush to contact the script developer but this is the worst thing to do. Internal Server Error means server misconfiguration and the developer is unlikely to be able to help you.

Here is what to do:

1. Check file permissions. In  more than 90% of the cases the error is caused by wrong permissions on the uploaded file.

2. Check your server error log. Poorly configured servers will often output Internal server error when there is fatal PHP error for some reason. Fortunately these errors are recorded in the server error log. Even if you don’t know what the errors mean you’ll have some useful information to send to the script developer instead of asking them to guess out the reason for the Internal server error.

3. Contact your hosting support. You should contact your hosting support before contacting the software developer. They are responsible for your server setup and you are paying them every month to keep things running smooth.