1
Phatbloke
Forced Notifications (news example shown)
  • 2006/3/20 14:49

  • Phatbloke

  • Just popping in

  • Posts: 48

  • Since: 2005/4/22


Hi

Ok I have been doing this for a while now and noticed a few others have been asking about it.

What this will do is show you how to change a users notification options without having to log in as them etc. I use it to force every user on my site to get an email everytime new news is posted.

This isn't a great solution but just a work around really. I was thinking of making a module to control all the notifications but quite frankly couldn't be bothered as I only have a small site and its not a huge deal for me to do the process below. Here is the process i follow. If anyone has a simplier way please let me know or if anyone is thinking of developing a module or hack for this I'm happy to help I just don't have the time to do this all myself.

Every time a new user registers I get a notification. I then go into phpMyAdmin to edit the database directly. Your host may use alternative methods.
First you need to find 2 pieces of info. the id of the person just registered and the module number for your news module.

So first view the data in the xoops_users table and make a note of the last uid created or the uid of the desired user.

Then open xoops_modules and find the mid of the news module.

Then finally in the table xoops_xoopsnotifications add a new line using the supplied form in phpmyadmin or writing a sql statment if you know how with this data:
not_id = *leave blank as it automatically increments*
not_modid = *news module id (mine is 5)*
not_itemid = 0
not_category = global
not_event = new_story
not_uid = *the user id of the desired user*
not_mode = 0

**Note**
This is only the notification to email a user everytime any news item is posted. If you wish to use other events or modules add a notification for yourself then view this table. It will be the last notification added and change the values for not_event and not_category as shown.

Good luck, this method works 100% for me and i have never had a problem but as usual I take no responsibility if you stuff it up and destroy you DB some how. Make sure its all backed up.

2
Dave_L
Re: Forced Notifications (news example shown)
  • 2006/3/20 15:29

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


You might also check that notifications are enabled in the user's profile:

Notification Method = "Email (use address in my profile)"
Default Notification Mode = "Notify me of all selected updates"

In XOOPS 2.2.x, the associated database columns are:

user_profile.notify_method = 2
user_profile.notify_mode = 0

In XOOPS 2.0.x, if I recall correctly, those two columns are in the users table, but otherwise they work the same way.

Login

Who's Online

411 user(s) are online (301 user(s) are browsing Support Forums)


Members: 0


Guests: 411


more...

Donat-O-Meter

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

Latest GitHub Commits