Getting a reply email nofitifcation?

Started by Rupert Hawkes, December 11, 2006, 09:49:03 AM

Previous topic - Next topic

Rupert Hawkes

Hi,

I have a global moderator setup.  They are set to be notified on ALL boards.  When a user posts a new topic the moderator gets the new topic notification email BUT when a user replies to a topic the moderator does NOT get the reply email notification.  The moderator profile is as follows:

ticked - Receive forum announcements and important notifications by email.
unticked (tried ticked too) - Receive reply notification only for the first unread reply.
ticked - Turn notification on when you post or reply to a topic.
ticked - When sending notification of a reply to a topic, send the post in the email (but please don't reply to these emails.)

For topics and boards I've requested notification on, notify me of:  Replies and moderation

So why doesn't this work?

Saw this thread, that has a workaround but it does NOT work for me.

http://www.simplemachines.org/community/index.php?topic=77081.15

I REALLY need this functionality in order to go live.  It seems that this was supposed to be added in RC3 (I'm running 1.1 final) but it still doesn't work.  PLEASE PLEASE HELP!

Oldiesmann

Board notification is different than topic notification. Clicking "Notify" on the message index simply means they'll be notified when a new topic is made in that board. If they want to be notified of replies to those topics, they'll have to subscribe to each individual topic either by clicking on "notify" from the topic display or, in this case, simply replying to the topic.

Rupert Hawkes


Oldiesmann

It could, but it would really increase the size of the log_notify table, because a separate entry is needed for each topic and user (ie one entry for each topic for each user in the group). How many global mods do you have?

Rupert Hawkes

Well I could have one I guess.

A little more background to this:

We have a support team that must receive an AUTOMATED email when

1.  A new user joins
2.  A new topic is posted in ANY board
3.  A new reply is posted in ANY board

Currently 1 & 2 are working, 3 isn't.  I could have one moderator or global moderator, i.e [email protected] and set that email group up on our mail server so that each member of the team gets the email.  Thats not a problem, it's just that reply notifications are only sent out if they manually select the topic.  This is no good.

So would having ONE GLOBAL MODERATOR be a help in setting this up?

SleePy

Rupert Hawkes,

Where you able to resolve this or would you still like some help?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!


SleePy

I think this can be done by doing this:

Open
Post.php

Find:
$request = db_query("
SELECT
m.ID_MEMBER, m.posterName, m.posterEmail, m.posterTime,
t.ID_FIRST_MSG, t.locked, t.isSticky, t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t)
WHERE m.ID_MSG = $_REQUEST[msg]
AND t.ID_TOPIC = $topic
LIMIT 1", __FILE__, __LINE__);


Replace:
$request = db_query("
SELECT
m.ID_MEMBER, m.posterName, m.posterEmail, m.posterTime,
t.ID_FIRST_MSG, t.locked, t.isSticky, t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t)
WHERE m.ID_MSG = $_REQUEST[msg]
AND t.ID_BOARD = $board
LIMIT 1", __FILE__, __LINE__);
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Rupert Hawkes

Erm, those 2 bits of code are identical (I think)! :-[

青山 素子

Nope, they are different (second-to-last line pops out, there might be other small changes too).
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Rupert Hawkes

#10
AH!  YES!

Ok I just want to be clear I ONLY want email notifications for new topics and replies ONLY for people who have selected that option in their profile, i.e.

For topics and boards I've requested notification on, notify me of:  Replies and moderation

Doesn't seem to work anyhow, my profile is set to...

  Receive forum announcements and important notifications by email.  TICKED
  Receive reply notification only for the first unread reply.  UNTICKED
  Turn notification on when you post or reply to a topic.  TICKED
  When sending notification of a reply to a topic, send the post in the email (but please don't reply to these emails.) TICKED

For topics and boards I've requested notification on, notify me of:  Replies and moderation

But I didn't get a email notification to a reply made by someone else in a topic that I wasn't watching.  Any other ideas?

Rupert Hawkes

Sorry didn't work.  It had the effect that users could not modify their own posts!  Got message saying "this topic is locked".  Replaced the original post.php and all is back to normal.

Any other ideas?

SleePy

Hmm.. I wasn't sure if the code would work. Try this, It should work..

Open Post.php

Find:
// Log an act of moderation - modifying.
if (!empty($moderationAction))


Add BEFORE:


//Notify Me of this always...
db_query("
INSERT IGNORE INTO {$db_prefix}log_notify
(ID_MEMBER, ID_TOPIC, ID_BOARD)
VALUES ('YOUR_ID', $topic, 0)", __FILE__, __LINE__);


Replace YOUR_ID with your user id..
Note. This will add a new notification for a new topic each time one is posted or replied to. As well this doesn't check to see if they are already receiving notifications (as It would require a query to save a query? no point).
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Rupert Hawkes

Changed it to this...

//Notify Me of this always...
   db_query("
      INSERT IGNORE INTO {$db_prefix}log_notify
      (ID_MEMBER, ID_TOPIC, ID_BOARD)
      VALUES ('Forum Moderator', $topic, 0)", __FILE__, __LINE__);

as the user id I want replies sent to are is "Forum Moderator"

Still no go :-(

SleePy

It needs to be your ID number. Most likely if you created the SMF board you are ID number 1
Such as mine for the SMF boards my User ID is 29084 and my own forums I am ID 30.

To find that number is easy. While viewing one of your posts click your name and let it take you to your profile. The Url should contain u=####. That #### is your ID.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Rupert Hawkes

AWESOME!!!

Many thanks.  Now next I want this feature to be added as a regular feature of SMF  ;)

Once again thank you!  I really do appreciate your help  :D

Advertisement: