1
Gollum
How to remove info fields for Profiles?
  • 2006/7/31 12:06

  • Gollum

  • Just popping in

  • Posts: 38

  • Since: 2005/9/23


How do I remove some of the fields where registered users can give their info in XOOPS 2.0.14? I tried to install the Usermanagement module from my older version of XOOPS, but when I want to go to it in the admin section it just show a blank page. I can't find a newer version of the Usermanagement module. What to do?

Btw. I want to remove the Website, Timezone, ICQ, AIM, YIM, MSNM, Location and occupation fields for every registered users profile (Only some groups should have some of the fields I want removed for registered users). The Usermanagement module were perfect for this, but it doesn't work on my XOOPS 2.0.14.

For me this is a big problem, because a lot of those informations isn't good to give to puplic on my site. They can be abused in a chat/game. So I need a solution asap.

Thank you on forehand for your answers.

2
exbanious
Re: How to remove info fields for Profiles?
  • 2006/7/31 14:39

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


i had to do pretty much the sam ething on a site.
heres how you can get rid of the website and timezone fields in the registration form:

"include/registerform.php"

find this code:


$reg_form->addElement(new XoopsFormText(_US_WEBSITE"url"25255$url));
$tzselected = ($timezone_offset != "") ? $timezone_offset $xoopsConfig['default_TZ'];
$reg_form->addElement(new XoopsFormSelectTimezone(_US_TIMEZONE"timezone_offset"$tzselected));

change to

//$reg_form->addElement(new XoopsFormText(_US_WEBSITE, "url", 25, 255, $url));
$tzselected = ($timezone_offset != "") ? $timezone_offset $xoopsConfig['default_TZ'];
$reg_form->addElement(new XoopsFormHidden("timezone_offset"$tzselected));



in edituser.php, you can comment out the fields you do not want shown in the form.

find this text minus the // tags and add those tags.

like this:


    
//$form->addElement($url_text);

    //$timezone_select = new XoopsFormSelectTimezone(_US_TIMEZONE, 'timezone_offset', $xoopsUser->getVar('timezone_offset'));
    //$icq_text = new XoopsFormText(_US_ICQ, 'user_icq', 15, 15, $xoopsUser->getVar('user_icq', 'E'));
    //$aim_text = new XoopsFormText(_US_AIM, 'user_aim', 18, 18, $xoopsUser->getVar('user_aim', 'E'));
    //$yim_text = new XoopsFormText(_US_YIM, 'user_yim', 25, 25, $xoopsUser->getVar('user_yim', 'E'));
    //$msnm_text = new XoopsFormText(_US_MSNM, 'user_msnm', 30, 100, $xoopsUser->getVar('user_msnm', 'E'));
    //$location_text = new XoopsFormText(_US_LOCATION, 'user_from', 30, 100, $xoopsUser->getVar('user_from', 'E'));
    //$occupation_text = new XoopsFormText(_US_OCCUPATION, 'user_occ', 30, 100, $xoopsUser->getVar('user_occ', 'E'));



next you can delete some things off modules/system/templates/system_userinfo.html

delete this:

<tr>
          <
td class="head"><{$lang_website}></td>
          <
td class="even"><{$user_websiteurl}></td>
        </
tr>
        <
tr valign="top">
          <
td class="head"><{$lang_location}></td>
          <
td class="even"><{$user_location}></td>
        </
tr>
        <
tr valign="top">
          <
td class="head"><{$lang_occupation}></td>
          <
td class="odd"><{$user_occupation}></td>
        </
tr>


now update your system module, and you shoudl be alright.
make sure you make backups of those three files before you do anything, just incase this doesn't work correctly for some reason.

3
Gollum
Re: How to remove info fields for Profiles?
  • 2006/7/31 17:21

  • Gollum

  • Just popping in

  • Posts: 38

  • Since: 2005/9/23


Ah thanks ! It works as wished.. I like the fast and helpfull replies on here . Thank you exbanious.

Can you tell me how I make the "Allow others to see my email" to be unchecked by default?

And "Always attach my signature" as checked by default?

Thanks again!

4
exbanious
Re: How to remove info fields for Profiles?
  • 2006/8/1 3:52

  • exbanious

  • Not too shy to talk

  • Posts: 113

  • Since: 2004/5/30


for the include/registerform.php

change:

$email_option->addOption(1_US_ALLOWVIEWEMAIL);


to:

$email_option->addOption(0_US_ALLOWVIEWEMAIL);



in edituser.php

make sure this line looks like this:

$sig_cbox_value $xoopsUser->getVar('attachsig') ? 1;



this should work. i was looking at code from a file that i had already done much editing to, so i forget what it was originally.

Login

Who's Online

67 user(s) are online (45 user(s) are browsing Support Forums)


Members: 0


Guests: 67


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits