AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

Modify Comment Content before saving it

5 Posts
2 Users
1 Reactions
1,300 Views
MarcelDerAdmin
Posts: 37
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
(@marcelderadmin)
Trusted Member
Joined: 6 years ago
[#56666]

Hi i wanna try to modify the comment before its being saved. i wanna check for spam my own way with my own custom code, tho i cant get it  to do anything apparently

 

i tried the following but its just not working so i assume there is maybe a custom hook for wpforo?

function preprocess_comment_remove_url( $commentdata ) {
    $commentdata["comment_content"] = "not a test";
    return $commentdata;
}



// Hook our function to WordPress the_content filter
add_filter( 'preprocess_comment' , 'preprocess_comment_remove_url', 10, 1);

4 Replies
Robert
Posts: 10736
Admin
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
(@robert)
Support Team
Joined: 2 months ago

Hi @marcelderadmin,

wpForo Spam Control already removes all URLs of new registered users if you configure it. Just set the value of "Min number of posts to be able to post links" option for example 5 to remove all external URLs from posts of users who don't have at least 5 approved posts yet. The option is located in wpForo > Settings > Spam Control admin page.


Reply
3 Replies
MarcelDerAdmin
(@marcelderadmin)
Joined: 6 years ago

Trusted Member
Posts: 37
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

@robert thx for the info but its not only that. i want to make a custom plugin because im sick of spending money for small stuff and i dont want to filter urls only but mainly for other specific messages or words.

 

i wanna block the entire russian alphabet etc and dont want to install a plugin. i know how to code but its hard getting started with wordpress because there isnt a great tutorial available thats not showing how to install another plugin


Reply
Robert
Admin
(@robert)
Joined: 2 months ago

Support Team
Posts: 10736
Robert
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

@marcelderadmin,

You could also use Forums Censure PRO plugin. You can insert any word or character in the user blocking list of this plugin. Once some word or character is found it'll block the user or just set the post as under moderation:

https://gvectors.com/product/forums-censure-pro/


Reply
MarcelDerAdmin
(@marcelderadmin)
Joined: 6 years ago

Trusted Member
Posts: 37
MarcelDerAdmin
Robert
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

@robert Hi thanks for the info but as stated above im trying to spend tons of money for basic features and while i can understand that you guys try to make money which is totally understandable its not a option for me and i decided to make a forum software myself once im done with some other projects but still thank you!


Reply
Share: