The effects of alcohol on
sustanon 250 leucine for – real weight loss & bodybuilding benefits?
[Solved] Report and Flagging API Hooks?
Summarize Topic
✦
✦
✦
AI is analyzing the discussion...
How-to and Troubleshooting
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Jan 16, 2022 4:25 pm
(@tetrakern)
Eminent Member
Joined: 6 years ago
Hello,
I recently started to integrate the Flagging and Report addon. Now, I also ave a custom Moderator role and obviously I want to send moderations a notification when a comment has been flagged. Unfortunately, I can only add one email address. Is there an API hook or something else I can use to send the notification to other recipient as well? This would go well with this custom notification plugin .
Support
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Jan 17, 2022 4:01 pm
(@asti)
Illustrious Member
Joined: 8 years ago
We'll provide a solution in the next version of the addon. Please wait for the next update.
(@tetrakern)
Joined: 6 years ago
Eminent Member
Posts: 18
Jan 18, 2022 12:15 am
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8300
Jan 19, 2022 11:36 am
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@tetrakern ,
You can fill in the comma-separated email addresses of website administrators, moderators to get the notifications in the "Admin Email" field.
It's located in the Dashboard > wpDiscuz > Settings > Report & Flagging admin page.
(@tetrakern)
Joined: 6 years ago
Eminent Member
Posts: 18
Jan 21, 2022 4:10 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti ,
I see. Still, my needs have now evolved beyond this as I'm feeding notifications into a Discord channel now. This is far more efficient and centralized than spamming emails left and right, which drove us crazy anyway.
In regards to that, you may want to think of adding an interface for chat client webhooks anyway. The JSON structure may pose a challenge tho; otherwise it's stupid easy to push messages to channels.
Of course, I need to access the data for this when a report is made or auto-moderation happens. I guess I can intercept the email and pick it apart, probably by writing a JSON as body. But cannot say that's convenient.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8300
Jan 24, 2022 2:04 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@tetrakern ,
The hook will be added in the next version.
(@tetrakern)
Joined: 6 years ago
Eminent Member
Posts: 18
Jan 26, 2022 6:18 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti
I see the hooks have been added. Nice. Is there a documentation on them somewhere? Currently, I cannot find the hooks in the API documentation.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8300
Jan 27, 2022 2:33 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@tetrakern ,
We're really sorry, but API documentation doesn't include the hooks for the addons.
The following three hooks were added:
add_action("wpdiscuz_rf_flagged", "my_custom_function");
add_action("wpdiscuz_rf_down_voted", "my_custom_function");
add_action("wpdiscuz_rf_reported", "my_custom_function");
The list of the arguments you can find below:
if (!function_exists("my_custom_function")) {
function my_custom_function($args) {
// $args["email_to"] - the sent email, that is to whom the email goes
// $args["email_subject"] - the email subject@
// $args["email_message"] - the email body
// $args["comment"] - the comment object that has been reported or down voted
// $args["user"] - the current user object who reports or dislikes the comment, in case of guest this is empty
}
}
(@tetrakern)
Joined: 6 years ago
Eminent Member
Posts: 18
Jan 27, 2022 4:12 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Topic starter
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Jan 22, 2022 9:26 pm
(@tetrakern)
Eminent Member
Joined: 6 years ago
I just noticed that you apparently cannot change the message for auto-moderation. It is not saved. I wanted to change it into a parsable structure. Took me hours to see that it doesn't save, searching the error on my side.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8300
Jan 24, 2022 2:05 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@tetrakern ,
Probably you have some js errors on your website. Please check your JS errors. It seems the problem comes from JS errors. Just press F12, go to the Console tab and check JavaScript errors.
(@tetrakern)
Joined: 6 years ago
Eminent Member
Posts: 18
Jan 24, 2022 2:32 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti
There are non JS errors, unfortunately. And you can save the "Report message body" just fine, but not the "Auto-moderation message body". It will always reset to default. It's also not saved via Ajax anyway afaik. The problem occurs on two independent servers. Turning off all plugins and using a standard theme doesn't work either.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8300
Jan 24, 2022 2:42 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@tetrakern ,
We'll check and get back to you asap.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8300
Jan 24, 2022 3:30 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@tetrakern ,
We'll check and get back to you asap.
This issue will be fixed in the next version.
Regarding the hook, we need some clarifications. Please let us know what data are needed in your case as arguments.
(@tetrakern)
Joined: 6 years ago
Eminent Member
Posts: 18
Jan 24, 2022 4:13 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
@asti
Essentially what's in the email -- report message, reported comment content/link/id, who submitted the report. Would probably be easier to just put in the whole comment object.
(@asti)
Joined: 8 years ago
Illustrious Member
Posts: 8300
Jan 24, 2022 4:26 pm
Translate
▼
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
Show original
Translating...
Thank you for your clarification, @tetrakern !
Super Globals
Options and Features