1. Prohibit using links in the user profile for specific groups

Prohibit using links in the user profile for specific groups

  |   1
Prohibit using links in the user profile for specific groups

Useful hack that prevents users from adding links to information "About Me" with the possibility of group selection, which you can add links.

Installing the hack

1. Open the file engine/modules/profile.php and find:
if( intval( $user_group[$member_id['user_group']]['max_info'] ) > 0 and dle_strlen( $info, $config['charset'] ) > $user_group[$member_id['user_group']]['max_info'] ) {$stop .= $lang['news_err_22'];}

Add Below
if( $is_logged and ($member_id['user_group'] > 3)) {if (preg_match ("/href|url|http|www|.ru|.com|.net|.info|.org/i", $_POST['info'])){$stop .= $lang['news_err_url'];}}


The first row is number 3 is the group ID, you can change it as you wish, in our case, Administrators can add links and Chief editors, journalists (not to be able to those whose group ID for more than 3).

2.Open the file engine/modules/register.php and we find:
if( dle_strlen( $fullname, $config['charset'] ) > 100 ) $stop .= $lang['reg_err_15'];

Add Above
if (preg_match ("/href|url|http|www|.ru|.com|.net|.info|.org/i", $_POST['info'])) $stop .= $lang['news_err_url'];


3.Open the file language/English/website.lng and we find:
'news_err_1'В В В В =>В В В В "The name you have entered is too long.",

Add Above or Below
'news_err_url' => "URL addresses of sites in the "About Me" <b style="color:red;">FORBIDDEN !</b>",


Best Regards
Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.

Details

+4

Comments 1

Gozan
Gozan
V.I.P.
Commented By Gozan on November 19, 2011 (2:02 pm)
nice hack thanks romeoluv56
33 132Forum topics : 20Forum replies : 88Forum likes : 7
Information!Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.
DLEStarter Notice!Please note...Every hack and every module will get additional queries from your database and some hacks and some modules may result your server overload, so install only what you "need", remove any hacks and modules from your script when you don't need them, all hacks and modules appears in this website are not guaranteed by DLEStarter Team for your script security and compatibility, please read instruction carefully and use hacks and modules at your own risk...Thank you.