
1) добавляем поле skype после поля icq в таблицу cms_users
ALTER TABLE `cms_users` ADD `skype` VARCHAR( 30 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL AFTER `icq` ;
после
u.icq,
u.skype,
4)далее в шаблоне com_users_profile.tpl после
{if $usr.showicq && $usr.icq} <div class="field"> <div class="title">ICQ:</div> <div class="value">{$usr.icq}</div> </div> {/if}
<div class="field"> <div class="title">Skype:</div> <div class="value">{$usr.skype}</div> </div>
<tr> <td valign="top"><strong>{$LANG.NUMBER_ICQ} :</strong></td> <td valign="top"><input name="icq" class="text-input" type="text" id="icq" style="width:300px" value="{$usr.icq}"/></td> </tr>
<tr> <td valign="top"><strong>Skype :</strong></td> <td valign="top"><input name="skype" class="text-input" type="text" id="skype" style="width:300px" value="{$usr.skype}"/></td> </tr>
Но и теперь можно ввести его и при регистрации
1) в файле com_registration.tpl после
{if $cfg.ask_icq} <tr> <td valign="top" class=""><strong>ICQ:</strong></td> <td valign="top" class=""> <input name="icq" type="text" class="text-input" id="icq" value="{$item.icq}" style="width:300px"/> </td> </tr> {/if}
{if $cfg.ask_skype} <tr> <td valign="top" class=""><strong>Skype:</strong></td> <td valign="top" class=""> <input name="skype" type="text" class="text-input" id="skype" value="{$item.skype}" style="width:300px"/> </td> </tr> {/if}
находим
находим
'ask_icq' => 1,
'ask_skype' => 1,
находим
$cfg['ask_icq'] = cmsCore::request('ask_icq', 'int');
$cfg['ask_skype'] = cmsCore::request('ask_skype', 'int');
<tr> <td><strong>Запрашивать ICQ при регистрации:</strong> </td> <td> <label><input name="ask_icq" type="radio" value="1" <?php if ($cfg['ask_icq']) { echo 'checked="checked"'; } ?>/> Да</label> <label><input name="ask_icq" type="radio" value="0" <?php if (!$cfg['ask_icq']) { echo 'checked="checked"'; } ?>/> Нет</label> </td> </tr>
<tr> <td><strong>Запрашивать skype при регистрации:</strong> </td> <td> <label><input name="ask_skype" type="radio" value="1" <?php if ($cfg['ask_skype']) { echo 'checked="checked"'; } ?>/> Да</label> <label><input name="ask_skype" type="radio" value="0" <?php if (!$cfg['ask_skype']) { echo 'checked="checked"'; } ?>/> Нет</label> </td> </tr>
а также ждем данное чудо в виде плагина)))
в виде "это заменить на это, тут добавить это" я могу.
через конструктор форм было бы сложнее считать информацию.
1) сначала добавляем новое поле в phpmyadmin
после строки
после
вместо
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT `0` AFTER `showicq`' at line 1
вот так верно