1# . put on htaccess root
RewriteBase /
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^user_(.*?)$ /users/profile.php?wl=$1 [NC,L]
user link = http://aipome.net/user_usernames
2#. for bbcode.php
find this
public static function tags($var)
{
put this code under thats
$var = preg_replace('#@([\w\d]{2,})#si', '@<a href="../user_$1">$1</a>', $var);
and find this too;
static function notags($var = '')
{
put this code under that
$var = preg_replace('#@([\w\d]{2,})#si', '@<a href="../user_$1">$1</a>', $var);
3#. and for profile.php put this code;
$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;
}
place under ;
$lng_profile = core::load_lng('profile');
4#. code to link to /user_names
<a href="'$home.'/user_' . functions::smileys(bbcode::tags($user['name'])) . '">
edit this $user['name'] ass your sql query, e.g for functions.php you can use $user['name'] and for index.php forum u can use $res['name']
DEMO ; aipome.net
hope you enjoyed :beer