1
lmartinus
Checking the "Allow other users to view my email address" box
  • 2005/12/11 14:24

  • lmartinus

  • Just popping in

  • Posts: 6

  • Since: 2005/11/29


Hello !

I can't find how to modify the registration form in order that the "Allow other users to view my email address" box be checked by default...

Can someone help me out ?

Many thanks,

Martin.

2
zyspec
Re: Checking the "Allow other users to view my email address" box
  • 2005/12/11 14:30

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


Can you tell us which version of XOOPS you're using?

3
lmartinus
Re: Checking the "Allow other users to view my email address" box
  • 2005/12/11 14:48

  • lmartinus

  • Just popping in

  • Posts: 6

  • Since: 2005/11/29


Hello!

I'm using XOOPS 2.0.10...

Thanks,
Martin.

4
terrion
Re: Checking the "Allow other users to view my email address" box
  • 2005/12/11 14:52

  • terrion

  • Friend of XOOPS

  • Posts: 299

  • Since: 2004/9/19


In that version, you should be able to view/edit your profile from the user menu and the option to make your email address viewable is a checkbox.

Click on "edit account" from the user menu, and make sure the box labeled "Allow other users to view my email address" is checked.
Terrion
Purchase, renew, or transfer your domain name to Ultranet Domains and get a FREE 10GB hosting account. Virtual Dedicated Servers around $35/monthly, no contract. FREE 24/7 telephone ...

5
lmartinus
Re: Checking the "Allow other users to view my email address" box
  • 2005/12/11 15:01

  • lmartinus

  • Just popping in

  • Posts: 6

  • Since: 2005/11/29


Yes, but I would like the "Allow other users to view my email address" box to be checked by default when a new user wants to register...

Is that possible ?

Thanks for your help,
Martin.

6
terrion
Re: Checking the "Allow other users to view my email address" box
  • 2005/12/11 15:06

  • terrion

  • Friend of XOOPS

  • Posts: 299

  • Since: 2004/9/19


I'm no expert here, but in XOOPS 2.0.xx I don't think so. (unless you're willing to perform a hack on a php file...)

In the new Xoops, 2.2.3+ you can modify the defaults for those fields through the admin control panel by going to the extended profiles module -> Fields and look for the field you want to change the default for...

Hope this helps,
Terrion
Purchase, renew, or transfer your domain name to Ultranet Domains and get a FREE 10GB hosting account. Virtual Dedicated Servers around $35/monthly, no contract. FREE 24/7 telephone ...

7
terrion
Re: Checking the "Allow other users to view my email address" box
  • 2005/12/11 15:14

  • terrion

  • Friend of XOOPS

  • Posts: 299

  • Since: 2004/9/19


If your willing to hack the php file, look for something like:

checkbox' name='user_viewemail' value='1

(this is not exact... I just copying and pasteing from a view source from an un-upgraded site at while on the "register" page...)


in register.php in your webroot and tinker with that a bit.
Terrion
Purchase, renew, or transfer your domain name to Ultranet Domains and get a FREE 10GB hosting account. Virtual Dedicated Servers around $35/monthly, no contract. FREE 24/7 telephone ...

8
dickinsd
Re: Checking the "Allow other users to view my email address" box
  • 2005/12/11 15:41

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Quote:

lmartinus wrote:
Hello !

I can't find how to modify the registration form in order that the "Allow other users to view my email address" box be checked by default...

Can someone help me out ?

Many thanks,

Martin.

Hi there.

You need to edit /include/registerform.php

If you open that file, about half way down you will see something like this:

Quote:
$email_tray = new XoopsFormElementTray(_US_EMAIL, "<br />");
$email_text = new XoopsFormText("", "email", 25, 60, $email);
$email_option = new XoopsFormCheckBox("", "user_viewemail", $user_viewemail);
$email_option->addOption(1, _US_ALLOWVIEWEMAIL);
$email_tray->addElement($email_text);
$email_tray->addElement($email_option);

Change this:
$email_option->addOption(1_US_ALLOWVIEWEMAIL);

to this:
$email_option->addOption(0_US_ALLOWVIEWEMAIL);

This will set the check box as ticked by default, they can of-course untick it.

Hope that helps

Dave

Login

Who's Online

165 user(s) are online (115 user(s) are browsing Support Forums)


Members: 0


Guests: 165


more...

Donat-O-Meter

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

Latest GitHub Commits