Step 1.
I first added 2 columns to MYSQL and I used this code:
ALTER TABLE jos_users ADD business VARCHAR (100) NO NULL AFTER name;
and
ALTER TABLE jos_users ADD phone VARCHAR (100) NO NULL AFTER business;
Verfied the columns existed.
Step 2: I use dreamweaver for modification to php code so I will list it the way I did it. I modified 3 files:
libraries/joomla/database/table/user.php
Found this part of the code from file above and added what is business and phone: (below)
Code: Select all
var $name = null;
/**
* The login name
*
* @var string
*/
var $business = null;
var $phone = null;
var $username = null;
/**
* The email
*
* @var string
*/
var $email = null;
components/com_user/views/register/tmpl/default.php
Found this part of the code from file above and added what is business and phone: (below)
Code: Select all
<tr>
<td width="30%" height="40">
<label id="namemsg" for="name"><?php echo JText::_( 'Name' ); ?>: </label> </td>
<td>
<input type="text" name="name" id="name" size="40" value="<?php echo $this->user->get( 'name' );?>" class="inputbox required" maxlength="50" /> * </td>
</tr>
<tr>
<td width="30%" height="40">
<label id="businessmsg" for="business"><?php echo JText::_( 'Business' ); ?>: </label> </td>
<td>
<input type="text" name="business" id="business" size="40" value="<?php echo $this->user->get( 'business' );?>" class="inputbox required" maxlength="50" /> * </td>
</tr>
<tr>
<td width="30%" height="40">
<label id="phonemsg" for="phone"><?php echo JText::_( 'Phone' ); ?>: </label> </td>
<td>
<input type="text" name="phone" id="phone" size="40" value="<?php echo $this->user->get( 'phone' );?>" class="inputbox required" maxlength="50" /> * </td>
</tr>
Found this part of the code from file above and added what is business and phone: (below)
Code: Select all
<tr>
<td width="120">
<label for="name">
<?php echo JText::_( 'Your Name' ); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" id="name" name="name" value="<?php echo $this->user->get('name');?>" size="40" />
</td>
</tr>
<tr>
<td width="120">
<label for="business">
<?php echo JText::_( 'Business' ); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" id="business" name="business" value="<?php echo $this->user->get('business');?>" size="40" />
</td>
</tr>
<tr>
<td width="120">
<label for="phone">
<?php echo JText::_( 'Phone' ); ?>:
</label>
</td>
<td>
<input class="inputbox" type="text" id="phone" name="phone" value="<?php echo $this->user->get('phone');?>" size="40" />
</td>
</tr>
If you like to add please feel free to add as you please.