News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Instant email notification if there is pending post/topic need approval

Started by mnn2, December 01, 2020, 01:25:22 AM

Previous topic - Next topic

mnn2

Hello guys, I am looking into a mod or functionality that can do this:

Instant email notification if there is pending post/topic need approval

If there is no mod for this, please let me know which table(s) in the database to look at so that I can program my own php page to do this. I need a lot googling though in order to achieve this.

As far as my experience is, in smf there is daily summary about the pending post/topic need approval. It's not real time or instant notification. I want to filter spam and troll posts/topics but also want to ensure legitimate new user posts/topics will be published as soon as possible.

Thanks in advance.

Aleksi "Lex" Kilpinen

No mod needed as far as I know. You just need to check your profile settings, and moderation preferences.
Though, any email sent by SMF isn't really guaranteed to be instant.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

mnn2

I am looking for instant notification for any pending post/topic that need approval.

As I am not a pro in this, I was thinking about using pooling method to check every minute if there is pending post/topic that need approval.

Kindred

there is no such thing as "instant notification" in SMF.

and, if you set a polling to check "every minute" you will kill your server.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shadav

not exactly what you want but you can try these modifications

for a notification system: https://custom.simplemachines.org/mods/index.php?mod=2198

show Number of unapproved posts and topics in your forum in the header: https://custom.simplemachines.org/mods/index.php?mod=2952

a counter to Moderate button about the number of the unapproved posts: https://custom.simplemachines.org/mods/index.php?mod=2909

mnn2

Quote from: Kindred on December 01, 2020, 09:49:18 AM
there is no such thing as "instant notification" in SMF.



that is why I am looking for one/building one ;D


Quote from: Kindred on December 01, 2020, 09:49:18 AM
and, if you set a polling to check "every minute" you will kill your server.

Actually I have little worry about the potential performance penalty. My forum is hosted on very recent hardware. Plus it seems that it's not a very busy server handling many VMs. The hosting fee is on relatively higher side vs the specs.

I appreciate any help on this.

mnn2

Quote from: shadav on December 01, 2020, 09:58:25 AM
not exactly what you want but you can try these modifications

for a notification system: https://custom.simplemachines.org/mods/index.php?mod=2198

show Number of unapproved posts and topics in your forum in the header: https://custom.simplemachines.org/mods/index.php?mod=2952

a counter to Moderate button about the number of the unapproved posts: https://custom.simplemachines.org/mods/index.php?mod=2909

I already installed one of the mod. Now looking for instant email notification.

Kindred

I guess the biggest question is---  Why?


What perceived issue are you trying to solve with this?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mnn2

Quote from: Kindred on December 01, 2020, 11:39:31 AM
I guess the biggest question is---  Why?


What perceived issue are you trying to solve with this?

To approve non-spam post/topic as soon as possible. Legitimate members are complaining their post/topic waited too long before got published.

Kindred

A forum is not real-time chat....

If you want faster notification, then stay online on your forum and refresh frequently.
If you can't handle it, then get more staff/volunteers who you are willing to allow to have approval permission
or maybe just turn off the approval requirement for users who have confirmed that they are not spammers
--- improve your spam-prevention
--- give users who have made (for example) 10 good posts permission to post without requiring approval

otherwise, tell your users to take a chilll - things will get approved when you have the chance to approve them



You are trying to use technical things to fix a social problem -- and that never works.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mnn2

Thanks for the suggestion.

However that is hugely inefficient use of time. Tech exists to ease us. I see this as a technical issue. it's not different that PayPal will send us email when there is payment received from customer. In my case, send me an email when there is new post/topic.

How is that so complicated?

Kindred

because polling like you suggest will literally KILL servers.

SMF checks to perform queued actions and does a few on every page load.  If you have a busy forum, this means things will be running fairly seamlessly. If your forum is not so busy, then things may be a little slower.

As I said -- it's not a great choice to try to solve social problems with technical solutions.

I did, however, give you and existing, SIMPLE solution
--- improve your spam-prevention
--- give users who have made (for example) 10 good posts permission to post without requiring approval

Why do you feel the need to review/approve every post?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mnn2

Not every post need to review. Only those newly registered users which tend to be those from recently banned users or spammers. When users have posted a while and we the moderation people satisfied that they are harmless then we removed them from the group that need moderation.

Anyway, as I posted my previous reply, I think I can add a line of php code to send email for those who post a new post or topic. Before that I need to check whether they belong to group that under moderation. Conceptually it is easy. But I need to find where is the page doing this.

mnn2

Here is what I did to have email notification each time there is new reply/new topic. For my usage, I only wanted the new reply or topic that needed moderation. So, I comment out the irrelevant codes.

Find this file at: /Sources/Post.php

find this line

// Notify any members who have notification turned on for this topic - only do this if it's going to be approved(!)

Add following code above that line:

// email notification
if ($becomesApproved)
{
if ($newTopic)
{
FunctionToSendEmail(); //for new topic that no needs moderation

}
elseif (empty($_REQUEST['msg']))
{
if ($topic_info['approved'])
{
FunctionToSendEmail(); //for new reply to a topic that no needs moderation
}

}
}
else
{
FunctionToSendEmail(); //for reply to a topic or new topic that needs moderation
if ($newTopic)
{
FunctionToSendEmail(); //for new topic that needs moderation
}
else
{
FunctionToSendEmail(); //for new reply to a topic that needs moderation
}
}

Kindred

this will spam any user who has signed up for notifications on a topic... not just the admin

and that logic looks wrong to me anyway...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."


mnn2

Quote from: Kindred on December 04, 2020, 12:20:58 PM
this will spam any user who has signed up for notifications on a topic... not just the admin

and that logic looks wrong to me anyway...

Only send to email for moderator.

Advertisement: