Protection links in comments DLE English

Protection links in comments DLE
Protection links in comments DLE English
Hack Protection links in comments DLE
After applying this hack if a user leaves a comment with a link, the comment will be sent for moderation with proper notification user, otherwise it will be added soon. For moderation will not go away on users with 1-3 groups (administrators, editors and journalists).

Installation:
1 Open File engine/modules/addcomments.php and find:
 
if( $update_comments ) {
   $comments = $db->safesql( $row['text'] ) . "<br /><br />" . $db->safesql( $comments );

   ....


Add above:
 
 if( preg_match ("/href|url|http|www|\.ru|\.com|\.net|\.info|\.org|\.ua/i", $comments) AND ($member_id['user_group'] > 3) ) {
   if( $update_comments ) {
    if( $row['approve'] ) $update_comments = false;
   }
   $where_approve = 0;
   $stop[] = $lang['news_err_31'];
   $CN_HALT = TRUE;
   msgbox( $lang['all_info'], implode( "<br />", $stop ) . "<br /><br /><a href=\"javascript:history.go(-1)\">" . $lang['all_prev'] . "</a>" );
  }
  }


Version DLE: 9.x-10.x
Author: Vitnet
Source: dle-faq.ru

About the Author

Saya bagian dari CKD (pesakit buah pinggang kronik) selama 8 thn. siapa-siapa nak bantu saya untuk biaya Injection.boleh email saya. Click Profile

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.