Как добавить поля, определенные модулем profile, на страницу добавления комментариев для анонимного пользователя?

Главные вкладки

Аватар пользователя qman qman 4 ноября 2006 в 22:20

Всем привет,
настраиваю сайт на drupal 4.6.10
использую модуль profile
определено 2 поля сайт и ICQ

посоветуйте в каком файле какие функции модифицировать чтобы для анонимного пользователяпри добавлении коментариев были поля ввода сайт и ICQ???

Всем спасибо за любые мысли.
P.S. буду смотреть модуль comment.module

Комментарии

Аватар пользователя qman qman 4 ноября 2006 в 23:21

нашел, не совсем правильный способ.
Решил отказаться от модуля profile и добавить поле icq в таблицу comments.

в файл comment.module
нашел строки
else if (variable_get('comment_anonymous', 0) == 1) {
$form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 20, 60);
$form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 20, 64, t('The content of this field is kept private and will not be shown publicly.'));
$form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 20, 255);
}
else if (variable_get('comment_anonymous', 0) == 2) {
$form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 20, 60, NULL, NULL, TRUE);
$form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 20, 64, t('The content of this field is kept private and will not be shown publicly.'), NULL, TRUE);
$form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 20, 255);

изменил на

else if (variable_get('comment_anonymous', 0) == 1) {
$form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 20, 60);
$form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 20, 64, t('The content of this field is kept private and will not be shown publicly.'));
$form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 20, 255);
//begin my code
$form .= form_textfield(t('ICQ'), 'icq', $edit['icq'], 11, 11);
//end my code
}
else if (variable_get('comment_anonymous', 0) == 2) {
$form .= form_textfield(t('Your name'), 'name', $edit['name'] ? $edit['name'] : variable_get('anonymous', 'Anonymous') , 20, 60, NULL, NULL, TRUE);
$form .= form_textfield(t('E-mail'), 'mail', $edit['mail'], 20, 64, t('The content of this field is kept private and will not be shown publicly.'), NULL, TRUE);
$form .= form_textfield(t('Homepage'), 'homepage', $edit['homepage'], 20, 255);
//begin my code
$form .= form_textfield(t('ICQ'), 'icq', $edit['icq'], 11, 11);
//end my code

но есть вопрос какой файл править, чтобы новое поле было сохранено в таблицу ????