• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Admin

Well-Known Member
Staff member
Administrator
Vào public_html/.htaccess thêm đoạn sau vào dưới cùng

PHP:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)?$ /users/profile.php?wl=$1 [NC,L]

Vào incfiles/classes/bbcode.php tìm
PHP:
$var = self::highlight_code($var);
Thêm vào sau đoạn trên code sau:
PHP:
$var = preg_replace('#@([\w\d]{2,})#si', '@<a href="/~$1">$1</a>', $var);

Vào users/profile.php tìm:
PHP:
if (!$user_id) {
 require('../incfiles/head.php');
 echo functions::display_error($lng['access_guest_forbidden']);
 require('../incfiles/end.php');
 exit;
}
Thêm vào trước code:
PHP:
$name_lat = isset($_GET['wl']) ? trim($_GET['wl']) : '';
$name_lat = functions::rus_lat(mb_strtolower($name_lat));
if (!empty($name_lat)) {
 if (mysql_result(mysql_query("SELECT COUNT(*) FROM `users` WHERE `name_lat` = '" . mysql_real_escape_string($name_lat) . "' LIMIT 1;"), 0) != 0)
 $user = mysql_result(mysql_query("SELECT `id` FROM `users` WHERE `name_lat` = '" . mysql_real_escape_string($name_lat) . "' LIMIT 1;"), 0);
 else $user = -1;
}
Xong, chúc thành công
Nguồn: HC
 

Facebook Comments

New posts New threads New resources

Back
Top