Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Can't find where Global Notification setting is saved in SMF DB

Aloittaja Talentville, kesäkuu 11, 2011, 02:00:17 AP

« edellinen - seuraava »

Talentville

In the Admin section of SMF, in the Modify Profile->Notifications section, there is the following check box:

[] Turn notification on when you post or reply to a topic.

I cannot figure out where this is saved in the Forum database.

I looked in the member table, and there are a number of fields for notifications (notify_regularity, notify_sendbody, notify_types) , but this "Global" setting is just not located there, although I would have thought it would be saved with the member info.  I know that when I turn the check box on or off and save the changes, it is set properly when I look at it again, so it is obviously somewhere in the database, but I can't find where.

Does anyone know where this setting is saved in the DB?  I have SMF integrated in my site and I want to turn the auto-notify ON for all members when we add them to the forum as a member, but to do that I have to know where in the database it is stored.

Arantor

There is no feature for 'global' notifications. When you reply to a post or topic, that box just silently ticks the 'notify me on replies', so it just falls into the notify-on-topic as if you'd ticked the additional option under the posting area.
Holder of controversial views, all of which my own.


Talentville

Perhaps I didn't state the question clearly enough...

When I check the "Turn Notifications On" check box for a given member (myself or any other member as I am the administrator), where does SMF store that setting  so that it knows that the forum should automatically and silently turn on notifications for each new post made by that specific member?  Because each member can either have Notifications "automatically" turned on or off (in which case the member would have to select "Notify" every time they make a new post), the site has to know whether or not to silently add that post to the log_notify table on a member by member database.  I would have thought that the member table would store that setting, but clearly it doesn't.  To me that means that setting has to be stored somewhere else.

The idea is that I want the default for every member to be "Turn Notifications on" while it seems that the default is Off right now.  So, when I add a member from my site (which my site does manually to mirror my own database and the forum database when they join my site), I want that option turned on for that member.  Adding the member to the DB, with their email address and username works fine as we directly add a new entry in the SMF member table, just need to find out where to save the Notifications setting so that the default setting is ON for everyone that joins.

Arantor

It's a per user entry in smf_themes table, I forget exactly what the details of it are though.
Holder of controversial views, all of which my own.


Talentville

I get it now that this setting is stored with each member's theme selected theme (although it is there and not just placed int he member table is a mystery to me), but that begs the question of how and where SMF stores a member's theme.  I see a themes table in the DB, but don't see where each member's theme settings are stored.  That would be the key to solving this problem, and that is knowing where that data is located.  Are member themes stored separately in their own file, folder or DB?

Perhaps this whole thing can be resolved by changing the master theme (especially since I do not let members change their them at all in my smf implementation), I am just wary of mucking around in the theme admin because I don't want to run the risk of messing up the whole works.

Talentville

Okay, I edited the global theme from the admin module and found the check box to change the default, so perhaps things are looking up.

The last question is whether all of the current members will be affected by the change or whether just new member will be affected.  I have 2000 members, so it might be that all 2000 of them won't have notifications turned on by default, just new members that join from now on.  If each new member has an entry somewhere with their own theme settings, it feels likely that old members will still have the settings that were set when they joined.  I'd love to enable the automatic notification option for all the old members as well, since having auto-notifications turned on makes far more sense to me and members can later opt out if they don't want that theme setting.

ilovefutbol

Hi, i have the same problem but i find the solution to activate this feature in all new members:

- Edit a file Subs-members.php
- Find line:
// Register them into the database.
$smcFunc['db_insert']('',
'{db_prefix}members',
$column_names,
$values,
array('id_member')
);
$memberID = $smcFunc['db_insert_id']('{db_prefix}members', 'id_member');

- Insert AFTER this line:
$insertamos[] = array($memberID, 'auto_notify', '1');
$smcFunc['db_insert']('insert',
'{db_prefix}themes',
array('id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'),
$insertamos,
array('id_member', 'variable')
);


- Save and upload
Thats all, now when user sign up the auto notify is on.

Advertisement: