I finally got it working in my site..
Thanks to all who had helped me...
i really hope the XOOPS team to consider to include basic info like sex, age, birthday in XOOPS next version
as i said previously in an
another thread the reason i don't want to use profile module available is because i just need one extra field (sex)...that's all..
any members that would like to do the same .......
here's how i did it in XOOPS 2.0171
-------------------------------------
** Change user_icq to sex drop down menu and include it
as a required field in registration from
** 4 files need to be edit - register.php, edituser.php, include/registerform.php & modules/system/templates/system_userinfo.html
First Step......
1. in include/registerform.phpadd this
$icq_text = new XoopsFormSelect("Sex", 'user_icq', $user_icq);
$icq_text->addOptionArray(array(1=>"Male", '0' =>"Female"));
$reg_form->addElement($icq_text, true);
after
$reg_form->addElement(new XoopsFormText(_US_WEBSITE, "url", 25, 255, $myts->htmlSpecialChars($url)));
2. in register.phpadd this
$user_icq = (isset($_POST['user_icq']) && intval($_POST['user_icq'])) ? 1 : 0;
after
$url = isset($_POST['url']) ? trim($myts->stripSlashesGPC($_POST['url'])) : '';
add this
<input type='hidden' name='user_icq' value='".$user_icq."' />
after
<input type='hidden' name='user_mailok' value='".$user_mailok."' />
add this
$newuser->setVar('user_icq', $user_icq, true);
after
if ($url != '') {
$newuser->setVar('url', formatURL($url), true);
}
3. in edituser.phpfind
$icq_text = new XoopsFormText(_US_ICQ, 'user_icq', 15, 15, $xoopsUser->getVar('user_icq', 'E'));
replace with
$icq_text = new XoopsFormSelect("Sex", 'user_icq', $xoopsUser->getVar('user_icq'));
$icq_text->addOptionArray(array(1=>"Male", 0 =>"Female"));
4. in modules/system/templates/system_userinfo.htmlfind this
<tr valign="top">
<td class="head"><{$lang_icq}>td>
<td class="odd"><{$user_icq}>td>
tr>
and replace with
<tr valign="top">
<td class="head">Sextd>
<td class="odd"><{if $user_icq == "1"}>Male<{else}>Female<{/if}>td>
tr>
Finish...clear templates_c/update system
there are maybe incorrect format of code used here so if anyone of you spotted a mistake please help me to correct it
thanks once again for those who had helped me..i appreciate it a lot