News:

Wondering if this will always be free?  See why free is better.

Main Menu

notification of removed topics

Started by RFD, February 04, 2020, 10:07:43 AM

Previous topic - Next topic

Illori

according to the code, it says all watching the topic get the notice. at the time of the comment i did not have the code to look at.

RFD

Quote from: Shambles on February 04, 2020, 05:11:50 PM
@Illori Didn't you already make this statement...?

Quote from: Illori
I believe only the topic starter is notified of moderation actions on the topic not all users watching the topic.

I believe this would resolve the issue:

Quote from: Shambles on February 04, 2020, 04:12:50 PM
Does that installation employ a recycle board for deleted topics?  If not, try setting one up.

and in my testing, that failed and i posted about that on this thread.

RFD

Quote from: Sir Osis of Liver on February 04, 2020, 05:07:00 PM
Tapatalk isn't installed on BP, but 'List Of Users In Forum/Board/Topic' mod is on both.

Would be interesting to know what's causing this, no one's reported it previously afaik.

tapatalk needs removal since ant's theme is better, but there was that mod removal error that i need to fix with a forum clean.

the 'list of users ..." hack is important to have on all 3 forums.

Shambles

Quote from: Shambles
Does that installation employ a recycle board for deleted topics?  If not, try setting one up.

Quote from: RFD on February 04, 2020, 05:16:06 PM
and in my testing, that failed and i posted about that on this thread.

I can't see where you mentioned you'd tried using the "recycle board" feature.

Sir Osis of Liver

I'm seeing clean uninstall for Tapatalk at TG.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

RFD

Quote from: Shambles on February 04, 2020, 05:29:40 PM
Quote from: Shambles
Does that installation employ a recycle board for deleted topics?  If not, try setting one up.

Quote from: RFD on February 04, 2020, 05:16:06 PM
and in my testing, that failed and i posted about that on this thread.

I can't see where you mentioned you'd tried using the "recycle board" feature.

post #11 on this thread (admin board)

RFD

Quote from: Sir Osis of Liver on February 04, 2020, 05:31:10 PM
I'm seeing clean uninstall for Tapatalk at TG.

then it was the tapatalk at BP.

Shambles

Quote from: RFD on February 04, 2020, 05:35:15 PM
Quote from: Shambles on February 04, 2020, 05:29:40 PM
Quote from: Shambles
Does that installation employ a recycle board for deleted topics?  If not, try setting one up.

Quote from: RFD on February 04, 2020, 05:16:06 PM
and in my testing, that failed and i posted about that on this thread.

I can't see where you mentioned you'd tried using the "recycle board" feature.

post #11 on this thread (admin board)

Moving is different to deleting. Deleting a thread within a forum that has a "recycle bin feature" invokes different code to that which deals with moving threads. 

Anyway, you seem set in your opinions...

RFD

Quote from: Shambles on February 04, 2020, 05:45:47 PM
Quote from: RFD on February 04, 2020, 05:35:15 PM
Quote from: Shambles on February 04, 2020, 05:29:40 PM
Quote from: Shambles
Does that installation employ a recycle board for deleted topics?  If not, try setting one up.

Quote from: RFD on February 04, 2020, 05:16:06 PM
and in my testing, that failed and i posted about that on this thread.

I can't see where you mentioned you'd tried using the "recycle board" feature.

post #11 on this thread (admin board)

Moving is different to deleting. Deleting a thread within a forum that has a "recycle bin feature" invokes different code to that which deals with moving threads. 

Anyway, you seem set in your opinions...

well, not opinions, observations ....

Sir Osis of Liver

Quote from: RFD on February 04, 2020, 05:35:54 PM
Quote from: Sir Osis of Liver on February 04, 2020, 05:31:10 PM
I'm seeing clean uninstall for Tapatalk at TG.

then it was the tapatalk at BP.

It's not installed at BP.  You should uninstall it at TG, it's caused a lot of problems.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

RFD

Quote from: Sir Osis of Liver on February 04, 2020, 06:11:45 PM
Quote from: RFD on February 04, 2020, 05:35:54 PM
Quote from: Sir Osis of Liver on February 04, 2020, 05:31:10 PM
I'm seeing clean uninstall for Tapatalk at TG.

then it was the tapatalk at BP.

It's not installed at BP.  You should uninstall it at TG, it's caused a lot of problems.

uninstalled fine this time ... and deleted.  amen.

RFD

Quote from: Illori on February 04, 2020, 05:05:38 PM
'notification_remove' => array(
/*
@additional_params: notification_remove
@description:
*/
'subject' => 'Topic removed: {TOPICSUBJECT}',
'body' => 'A topic you are watching has been removed by {POSTERNAME}.

{REGARDS}',


Sources/RemoveTopic.php

// Notify people that this topic has been removed.
sendNotifications($topic, 'remove');


that is on line 73/74

just comment out the sendNotifications line with // in front of it and no one will get that email.

failed ...

i made the changes as defined above, verified the changed file exists on the server, then posted on a thread as a test user, posted again on the thread as admin, the test user gets an email that a post was made on a watched thread, admin removes the entire thread, the test user gets an email notification that the thread was removed.

Illori

do you see that same line you commented elsewhere in the file? if so comment it out as you did before with the //. I don't have the code in front of me to check.

RFD

Quote from: Illori on February 05, 2020, 10:11:16 AM
do you see that same line you commented elsewhere in the file? if so comment it out as you did before with the //. I don't have the code in front of me to check.

nope, line 74 of the file in question is the only instance for ...

// Notify people that this topic has been removed.
sendNotifications($topic, 'remove');


... that was changed to ...

// Notify people that this topic has been removed.
// sendNotifications($topic, 'remove');

Illori

what is the email that the user received?

RFD

Quote from: Illori on February 05, 2020, 03:35:19 PM
what is the email that the user received?

email received by the tester user ...

"A topic you are watching has been removed by Admin

Regards,
The TG Team."

Illori

seems that is also called in Sources/MessageIndex.php

// Only log the topic ID if it's not in the recycle board.
logAction('remove', array((empty($modSettings['recycle_enable']) || $modSettings['recycle_board'] != $removeCacheBoards[$topic] ? 'topic' : 'old_topic_id') => $topic, 'board' => $removeCacheBoards[$topic]));
sendNotifications($topic, 'remove');
}


comment out with // that sendNotifications line.

RFD

Quote from: Illori on February 05, 2020, 05:03:45 PM
seems that is also called in Sources/MessageIndex.php

// Only log the topic ID if it's not in the recycle board.
logAction('remove', array((empty($modSettings['recycle_enable']) || $modSettings['recycle_board'] != $removeCacheBoards[$topic] ? 'topic' : 'old_topic_id') => $topic, 'board' => $removeCacheBoards[$topic]));
sendNotifications($topic, 'remove');
}


comment out with // that sendNotifications line.

darn it, the test failed again, the topic remove notifier must be triggered from somewhere else.

Illori

i dont know why this is failing for you. all i can suggest is commenting out the template so it will not be able to send the email.

'notification_remove' => array(
/*
@additional_params: notification_remove
@description:
*/
'subject' => 'Topic removed: {TOPICSUBJECT}',
'body' => 'A topic you are watching has been removed by {POSTERNAME}.

{REGARDS}',
),


Themes/default/languages/emailTemplates.english.php

surround that with /* and */ hopefully that will do the trick.


RFD

Quote from: Illori on February 05, 2020, 05:34:44 PM
i dont know why this is failing for you. all i can suggest is commenting out the template so it will not be able to send the email.

'notification_remove' => array(
/*
@additional_params: notification_remove
@description:
*/
'subject' => 'Topic removed: {TOPICSUBJECT}',
'body' => 'A topic you are watching has been removed by {POSTERNAME}.

{REGARDS}',
),


Themes/default/languages/emailTemplates.english.php

surround that with /* and */ hopefully that will do the trick.

made and verified those changes on the server, the test user still gets email notification of a removed topic.

the tester user's notification of a post by admin ...

A reply has been posted to a topic you are watching by Admin.

View the reply at: http://www.tgxxxxxxxx.com/tgsmf/index.php?topic=171084.new;topicseen#new

Unsubscribe to this topic by using this link: http://www.tgxxxxxxxx.com/tgsmf/index.php?action=notify;topic=171084.0

The text of the reply is shown below:
admin test #12

Regards,
The TG Team.


admin then removes the topic and the test user gets notification email ...

A topic you are watching has been removed by Admin.

Regards,
The TG Team.

Advertisement: