Making HotelDruid Responsive

Post here you suggestions and wished features for hoteldruid development.

Moderator: marco

Post Reply
blackdog
Posts: 4
Joined: Mon May 12, 2014 11:11 pm

Making HotelDruid Responsive

Post by blackdog »

Just a quick tip to make your HotelDruid installation responsive in a few clicks
Using php development environment that has recursive find and replace capabilities e.g. NetBeans, Eclipse, Dreamweaver
From the base directory of your HotelDruid source code recursively
Find

Code: Select all

<head>
Replace with

Code: Select all

<head>
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1,  maximum-scale=1\">
The backslahes (\) are used initially to escape the " characters because most of the html code in HotelDruid is echoed using php. These then prevent these characters from terminating the echo strings.

Unfortunately not ALL the html is echoed so we now have to go and find those files where it is not. We have only found the template files in the /dati directory to contain raw html that is not being echoed via php.

So you must go through any templates you have created here and in each one remove the forward slashes in any RAW html code that is not being echoed by php. For example the first few lines of availability_tpl.php will now look like this

Code: Select all

<?php if (!@$framed and !@$_GET['framed'] and !@$_POST['framed']) { ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1\">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
In order for this code to work correctly the forward slashes need removing.

Of course always check your alterations before moving them to a live environment. We use Opera Mobile Emulator to do this as it has a variety of devices to choose from to test your 'mobile friendly' website.
Image
marco
Posts: 1332
Joined: Tue Jul 05, 2005 6:00 pm
Location: Roma, Italia

Re: Making HotelDruid Responsive

Post by marco »

Hello,
thank you, something similar should be integrated in next version.

Regards,
Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Post Reply