How to contact site users via SMS in the Joomla 1.5
Ozeki SMS Contact Component presented on this page makes it possible to contact
the users of your site via SMS. This solution is based on Ozeki NG SMS Gateway
that is a software product and it provides the SMS functionality to your system.
After you have installed and configured this component, website visitors will be able to
give their phone numbers (e.g. on the registration form). Learn more about this
SMS solution on this page which also provides a requirements list as well as step
by step setup instructions with video tutorials.
To keep contact with the users of your Joomla website, you need to let them provide their
phone numbers at the registration form or at the edit form of their own settings.
The forms should contain a section where they can give their phone numbers.
The phone number will be stored at the database. This way the Administrator
will be able to keep contact with them by sending messages with the help of
Ozeki NG SMS Gateway (see Figure 1).
Figure 1 - How the Administrator sends SMS to registered users
Note:The Administrator can only send SMS to those users
who not only register but give their phone numbers, as well.
Configuration of Joomla SMS solution
To be able to send SMS to your contacts from Joomla with SMS
Contact component, follow the installation steps in this guide and watch
the video tutorial for further help.
Installation Steps
Joomla is a CMS (Content Management System) web designer used
for creating and operating websites. With Joomla you can install and use components
which help you in creating contact with users of your Joomla website. You
are able to keep in touch with users with the help of SMS Contact component. SMS
Contact is a great help in informing or helping your contacts via SMS.
You can configure the SMS Contact module in Joomla! with the help
of Ozeki NG SMS Gateway. Follow the installation steps shown in this section.
You are supposed to have installed both Ozeki NG SMS Gateway (you can find the
installer on this page) and Joomla (it is not necessary to have both installed
on the same computer). To install the component, you need to log into the
back-end of Joomla as Administrator. You are enabled to manage or edit your
Joomla website from the back-end. Give the Administrator user name and password
and click on the "Login" button as the example shows in Figure 2.
Figure 2 - Log in to Joomla back-end
After logging in, enter the Install/Uninstall page in Extensions
menu, then browse and install the
com_smscontact component file (Figure 3).
Figure 3 - Install com_smscontact file
This way Joomla adopts the Contact site user via Joomla! component.
To be able to provide the phone number section start Windows
Explorer and open the user.php through joomla\libraries\joomla\database\table
path (Figure 4).
Figure 4 - The user.php in table folder
You need to insert an optional field, "phone" in the user.php.
To do so, find the first function in the JTableUSer class in this php file and declare a variable before
as shown in Figure 5.
Figure 5 - Insert phone variable
Variable
for the user.php
var $phone = null;
Afer inserting the variable save an close the user.php file.
The next step is to edit the from.php file through the
joomla\administrator\components\com_users\views\tmpl path (Figure 6).
Figure 6 - Enter the form.php in tmpl folder
After opening the file, find line 132 as shown in Figure 7.
Figure 7 - Line 132
Insert an additional table row as shown in Figure 8. Use the table row definition under the
picture.
When you inserted the table row definition save and close the form.php file.
Return to your Joomla website and enter the User Manager menu
(Figure 9).
Figure 9 - Joomla! User Manager
You can check the results of editing the two .php files. At the
user properties section you can find the additional phone field. Now you can edit
the users' phone number from the back-end as shown in Figure 10.
Figure 10 - Edit phone number in User Manager
Entering Contact site user via SMS component, the user and the related
phone number is appeared in the list as a potential recipient.
Figure 11 - Administrator's phone number in Contact site user via SMS menu
To enable users to add their own phone numbers on the registration
form other files have to be edited. This time edit default.php file through
the joomla\components\com_users\views\register\tmpl path.
Figure 12 - Enter default.php file
After opening to the file, find line 73 as shown in Figure 13.
Figure 13 - Find line 73 in default.php
Insert a table row definition under line 73 as shown in Figure 14. You can
find this table row definition under Figure 15.
As a result, the visitors of your website are enabled to give
their phone numbers during the registration. In the example I register a test user as
you can see in Figure 15. I give a phone number as well.
Figure 15 - Registering user with phone number
After registration, the registered users will
appear in the SMS Contact menu.
The next step is to enable the users to change their phone numbers.
Enter joomla\templates\[Template_Name]\html and create com_user folder as
shown in Figure 16.
Figure 16 - Create com_user folder
Enter com_user folder and create a register folder in it
(Figure 17).
Figure 17 - Create register folder
Copy and paste the components\com_user\views\register\tmpl folder's
content here as shown in Figure 18 and 19.
Figure 18 - Copy the content from tmpl folder
Figure 19 - Paste the content to register folder
Create a new user folder in com_user folder
(Figure 20).
Figure 20 - Create user folder
Copy the content from components\com_user\views\user\tmpl folder
as shown in Figure 21.
Figure 21 - Copy the content of tmpl folder
Paste the tmpl folder content in user folder (Figure 22).
Figure 22 - Paste the content in user folder
Open the form.php file for editing. Find line 70 in the file
as shown in Figure 23.
Figure 23 - Line 70 in form.php file
Insert the table row definition you can find under Figure 24 after line 70.
Figure 24 - Table row definition after line 70
Table row definition
for form.php file in user folder
These configuration steps enable the users to edit their phone numbers in the
Edit Your Details form (Figure 25).
Figure 25 - Edit phone number
The configuration came to an end, so the SMS Contact component gained
full functionality. To test it, you can send a test SMS to your users. First, open
the SMS Contact component and select the users you want to send a message for.
Type your message into the Message box as shown in Figure 26 and click on the
"Send" button.
Figure 26 - Test message to contacts
After sending the message you can check if it is delivered in
Ozeki NG SMS Gateway (Figure 27).
Figure 27 - Sent contact messages in Ozeki NG SMS Gateway.
The configuration demonstrated in this section enables you to
provide SMS Contact solution without changing core files. With this solution
you become able to keep in touch with your users and inform them about important
events, news immediately. It also helps you maintain your a list of your contacts
and attain your business plans.