The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Search
Close
AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Report and Flagging...
 
Notifications
Clear all

[Solved] Report and Flagging API Hooks?

16 Posts
2 Users
1 Reactions
2,681 Views
Tetrakern
(@tetrakern)
Posts: 18
Eminent Member
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
 
[#3601]

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.


 
Posted : 16/01/2022 4:25 pm
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member 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
 

We'll provide a solution in the next version of the addon. Please wait for the next update. 


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 17/01/2022 4:01 pm
Tetrakern
(@tetrakern)
Posts: 18
Eminent Member
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
 

@asti

 

image

 
Posted : 18/01/2022 12:15 am
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member 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
 

@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. 


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 19/01/2022 11:36 am
Tetrakern
(@tetrakern)
Posts: 18
Eminent Member
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
 

@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.

Screen Shot 2022 01 21 at 13.07.53

 
Posted : 21/01/2022 4:10 pm
Tetrakern
(@tetrakern)
Posts: 18
Eminent Member
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
 

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.


 
Posted : 22/01/2022 9:26 pm
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member 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
 

@tetrakern,

The hook will be added in the next version.  


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 24/01/2022 2:04 pm
Tetrakern reacted
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member 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
 

@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.


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 24/01/2022 2:05 pm
Tetrakern
(@tetrakern)
Posts: 18
Eminent Member
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
 

@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.


 
Posted : 24/01/2022 2:32 pm
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member 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
 

@tetrakern,

We'll check and get back to you asap.  


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 24/01/2022 2:42 pm
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member 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
 

@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. 


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 24/01/2022 3:30 pm
Tetrakern
(@tetrakern)
Posts: 18
Eminent Member
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
 

@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.


 
Posted : 24/01/2022 4:13 pm
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member 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
 

Thank you for your clarification, @tetrakern!

 


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 24/01/2022 4:26 pm
Tetrakern
(@tetrakern)
Posts: 18
Eminent Member
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
 

@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.


 
Posted : 26/01/2022 6:18 pm
Asti
 Asti
(@asti)
Posts: 8259
Illustrious Member 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
 

@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        
    }        
}


In case you want to say thank you! 🙂
We'd really appreciate if you leave a good review on the plugin page.
This is the best way to say thank you to this project and the support team.

 
Posted : 27/01/2022 2:33 pm
Page 1 / 2