Joomla Installation

Joomla Installation

To perform the installation on Joomla 1.5, it is necessary to make small modifications to the .PHP file of the template in order to dynamically inject the JavaScript library and the environment variable. We have prepared a brief guide, however for more information, you can find a lot of documentation on the internet.

Installation of the Hotelrsv.js Library


As seen in the installation guide, it is necessary that the hotelrsv.js library is placed in the <head> </head> segment of every page where the booking engine will run, in Joomla, ideally it should be injected from the same template.

Determine the "Name" of the Active Template


Login to the Joomla Administrator
Click on Administrator (left column on the main page)
In Extensions ->Template Manager, you will find a list of templates, usually, there is one marked as ADMINISTRATOR and another as Site. The one marked as Site is the active template, and therefore, that is the name of the template.

Edit index.php of the Active Template


Connect via FTP or SFTP to the server where the Joomla installation is located.
Open the template directory, normally from the Joomla root, the template directory is located in PUBLIC_HTML_ROOT/JOMLA_ROOT/templates/mi_template
Download the index.php file open the index.php file in a text editor, for example Notepad++.
Locate the line of code with the single </head>.
In the line immediately above, add these lines of code:

Code Snippet

  1. <!-- HOTELRSV code -->
  2. <script type="text/javascript" src="https://app.hotelrsv.com/app/js/hotelrsvplugin/hotelrsv.js"></script>
  3. <script> INCLUIR_AQUI_EL_OTRO_CODIGO_INDICADO_POR_EL_EQUIPO_DE_SOPORTE </script>
  4. <!-- END HOTELRSV code -->
The final result should be:

Final Snippet Outcome

  1. <head>
  2. ...
  3. <!-- HOTELRSV code -->
  4. <scripttype="text/javascript"src="https://app.hotelrsv.com/app/js/hotelrsvplugin/hotelrsv.js"></script>
  5. <script> INCLUIR_AQUI_EL_OTRO_CODIGO_INDICADO_POR_EL_EQUIPO_DE_SOPORTE </script>
  6. <!-- END HOTELRSV code -->
  7. </head>
Save the index.php file
Upload it to the same directory.
Close FTP
Notes
It is recommended to save a copy of the original index.php
With these instructions, the hotelrsv.js library will always load on all pages of your Joomla site. Now you can follow the installation guide for the buttons or read the instructions below to learn how to install in Joomla menus.

Joomla Menu Button Installation (Class Injection)


In order to place one of the buttons in the Joomla menu, the following instructions must be followed.

Find ID of the Menu Item


The steps are the following ones:
Login into Joomla
Click on Administrator (left column of the main page)
Go to Menus->Menu Manager on the backend.
Find the corresponding menu (for home page menu is “Main Menu”) and press “Menu Items”
Find the corresponding menu name that you want to be the one associated to the widget, let’s take for example “Reserve”
On the right of the table copy the corresponding Id (in the case of “Reserve” it’s 41) under the column ItemID.

Inject Class in the Menu Item


1.- Connect through ftp to your joomla 1.5 server
2.- Locate the folder of the menu module, which usually from the joomla root installation folder is under JoomlaRoot/modules/mod_mainmenu/tmpl
3.- Download the file default.php
4.- Open it with any text editor, and locate the line with “if (isset($path) && $node->attributes(‘id’) == $path[0]) {“
5.- Just above it paste the following lines of codeCode Snippet Menu Item.
  1. if(($node->name() == 'li') && ($node->attributes('id') == 41)) {
  2.     if($node->attributes('class')) {
  3.         $node->addAttribute('class', 'rsv-app-launcher '.$node->attributes('class'));
  4.     }
  5. }
6.- Replace the 41 with the id that you found in the previous section
7.- The final outcome should like the following:
  1. ...
  2. if(($node->name() == 'li') && ($id= $node->attributes('id'))) {
  3.         if($node->attributes('class')) {
  4.             $node->addAttribute('class', $node->attributes('class').' item'.$id);
  5.         } else{
  6.             $node->addAttribute('class', 'item'.$id);
  7.         }
  8.     }
  9.      
  10.     if(($node->name() == 'li') && ($node->attributes('id') == 41)) {
  11.         if($node->attributes('class')) {
  12.             $node->addAttribute('class', 'rsv-app-launcher '.$node->attributes('class'));
  13.         }
  14.     }
  15.     if(isset($path) && $node->attributes('id') == $path[0]) {
  16.         $node->addAttribute('id', 'current');
  17.     } else{
  18.         $node->removeAttribute('id');
  19.     }
  20. ...
8.- Save the file index.php
9.- Upload it in the same path from where it was downloaded
10.- Close ftp
Since now on in each menu we will have the class applied to the menu voice.

    • Related Articles

    • Installation Guide hotelrsv.js

      hotelRSV is a 100% web application created with HTML, JS, CSS that can be installed quickly on any page without programming knowledge. You can install it on any CMS (Drupal, Joomla, Wordpress, Wix, SquareSpace), or on any PHP, HTML, Ruby ...
    • Wix Installation

      hotelrsv.min.js Library To implement the hotelrsv.min.js library in Wix, follow these steps: In the Dashboard → Settings → Custom Code → Head option (official Wix guide), place the installation code in the Head, but you must separate the essential ...
    • Installation in WordPress – Plugin

      The new hotelRSV plugin for WordPress allows you to install with a single click the hotelrsv.js libraries and perform basic configurations such as application language. Avoid Errors! Avoid duplicate libraries or installation. If you use the WordPress ...
    • Quick Start Guide

      If you are a Partner Company or Tourism Agency and wish to make reservations for the hotel with an agreement, please visit Partner Company, Agencies. Before you start using hotelRSV on your website, it is recommended that you read this quick start ...
    • Responsive, Mobile Web Application (Webapp)

      With hotelRSV, users visiting the hotel website from a mobile device can be redirected to hotelRSV's responsive, mobile-friendly booking engine with: -Complete information of the hotel and direct telephone number. -Maps of the hotel and how to get ...