1
Kholnuu
Default notification settings
  • 2004/6/22 4:41

  • Kholnuu

  • Just popping in

  • Posts: 5

  • Since: 2004/6/19


I've noticed that anytime a user is created, their notification settings are always set to "Private Message", rather than "Email" or "disabled".

Is there any way to change this so that they get created with the option of "Email" automatically set?

2
ilRomano
Re: Default notification settings
  • 2004/6/22 8:59

  • ilRomano

  • Just popping in

  • Posts: 5

  • Since: 2004/6/22


Hi Kholnuu,
I'm a php programmer but not an expert of xoops.

Probably there is a better method but I try to explain mine.

When a user registers his self he submits data to register.php with $op=newuser. $op is used to switch to the right operation implemented in register.php.
So if you want to modify de dafault behavior you can serch
in "newuser" where the script set the notification parameter.

I'm sorry but I have a terrible English

Bye

3
Mithrandir
Re: Default notification settings

kernel/user.php

class XoopsUser

Line 98:
$this->initVar('notify_method'XOBJ_DTYPE_OTHER1false);


Change the 1 to a 2 for changing the default value of a new user from PM to email (or 0 for disabling it by default)

4
ilRomano
Re: Default notification settings
  • 2004/6/22 9:46

  • ilRomano

  • Just popping in

  • Posts: 5

  • Since: 2004/6/22


This is the best method.

5
Kholnuu
Re: Default notification settings
  • 2004/6/22 14:20

  • Kholnuu

  • Just popping in

  • Posts: 5

  • Since: 2004/6/19


Thank you, both of you. :)

6
pcmensch
Re: Default notification settings
  • 2004/6/23 8:12

  • pcmensch

  • Just popping in

  • Posts: 13

  • Since: 2004/6/21


great i found this posting. is there further a way to set the notification options invisibile? I'd love to have the default setting to 'email' without having the user prompted to this options every time.

thanks!

7
marcan
Re: Default notification settings
  • 2004/6/23 11:51

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


is there further a way to set the notification options invisibile?

Yes there is of course

Edit the file edituser.php. Check the line 208 :
$form->addElement($notify_method_select);

This is were the select box for choosing the notification method is added to the form. If you comment out this line, it wont be added to the form :
// $form->addElement($notify_method_select);

Hope this helps !

8
pcmensch
Re: Default notification settings
  • 2004/6/23 17:43

  • pcmensch

  • Just popping in

  • Posts: 13

  • Since: 2004/6/21


hi marcan, thanks a lot for your hint. I've tried it but its not working. The notification form is still appearing on every page. any idea?

I'm sure I did uncomment the right line.

thx indeed!

9
marcan
Re: Default notification settings
  • 2004/6/23 17:54

  • marcan

  • Just can't stay away

  • Posts: 824

  • Since: 2003/10/8


Just to be sure... maybe I was not clear. You need to comment the line, this means putting the '//' at the begining of the line.

In your previous post, you said :

Quote:
I'm sure I did uncomment the right line.


Be sure to comment the line so line 208 will lokk like this :
Quote:
// $form->addElement($notify_method_select);

This no real reason not to work...

Keep me posted !

10
Dave_L
Re: Default notification settings
  • 2004/6/23 20:07

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Quote:
Edit the file edituser.php.


That file is used for editing a user's profile. Changing it will have no effect on the presence of the notification options at the bottom of the other pages.

Login

Who's Online

431 user(s) are online (164 user(s) are browsing Support Forums)


Members: 0


Guests: 431


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