Hello
i have simple problem
when i go in memebrprofile i see nice url...but when i go in posting page or viewtopic and press memebrprofile i getting default url
I show my problem in attached image
so ill waiting ansver in my problem
Moderator: Moderators

function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false)
{
static $_profile_cache;
// We cache some common variables we need within this function
if (empty($_profile_cache))
{
global $phpbb_root_path, $phpEx;
$_profile_cache['base_url'] = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u={USER_ID}');
$_profile_cache['tpl_noprofile'] = '{USERNAME}';
$_profile_cache['tpl_noprofile_colour'] = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>';
$_profile_cache['tpl_profile'] = '<a href="{PROFILE_URL}">{USERNAME}</a>';
$_profile_cache['tpl_profile_colour'] = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</a>';
}
global $user, $auth;
// This switch makes sure we only run code required for the mode
switch ($mode)
{
case 'full':
case 'no_profile':
case 'colour':
// Build correct username colour
$username_colour = ($username_colour) ? '#' . $username_colour : '';
// Return colour
if ($mode == 'colour')
{
return $username_colour;
}
// no break;
case 'username':
// Build correct username
if ($guest_username === false)
{
$username = ($username) ? $username : $user->lang['GUEST'];
}
else
{
$username = ($user_id && $user_id != ANONYMOUS) ? $username : ((!empty($guest_username)) ? $guest_username : $user->lang['GUEST']);
}
// Return username
if ($mode == 'username')
{
return $username;
}
// no break;
case 'profile':
// Build correct profile url - only show if not anonymous and permission to view profile if registered user
// For anonymous the link leads to a login page.
if ($user_id && $user_id != ANONYMOUS && ($user->data['user_id'] == ANONYMOUS || $auth->acl_get('u_viewprofile')))
{
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
// $profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : str_replace(array('={USER_ID}', '=%7BUSER_ID%7D'), '=' . (int) $user_id, $_profile_cache['base_url']);
global $phpbb_seo, $phpbb_root_path, $phpEx;
$phpbb_seo->set_user_url( $username, $user_id );
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . (int) $user_id);
// www.phpBB-SEO.com SEO TOOLKIT END
}
else
{
$profile_url = '';
}
// Return profile
if ($mode == 'profile')
{
return $profile_url;
}
// no break;
}
if (($mode == 'full' && !$profile_url) || $mode == 'no_profile')
{
return str_replace(array('{USERNAME_COLOUR}', '{USERNAME}'), array($username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_noprofile'] : $_profile_cache['tpl_noprofile_colour']);
}
return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_profile'] : $_profile_cache['tpl_profile_colour']);
}
/**
* @package phpBB3
*/
class bitfield
{
var $data;
function bitfield($bitfield = '')
{
$this->data = base64_decode($bitfield);
}
/**
*/
function get($n)
{
// Get the ($n / 8)th char
$byte = $n >> 3;
if (strlen($this->data) >= $byte + 1)
{
$c = $this->data[$byte];
// Lookup the ($n % 8)th bit of the byte
$bit = 7 - ($n & 7);
return (bool) (ord($c) & (1 << $bit));
}
else
{
return false;
}
}
function set($n)
{
$byte = $n >> 3;
$bit = 7 - ($n & 7);
if (strlen($this->data) >= $byte + 1)
{
$this->data[$byte] = $this->data[$byte] | chr(1 << $bit);
}
else
{
$this->data .= str_repeat("\0", $byte - strlen($this->data));
$this->data .= chr(1 << $bit);
}
}
function clear($n)
{
$byte = $n >> 3;
if (strlen($this->data) >= $byte + 1)
{
$bit = 7 - ($n & 7);
$this->data[$byte] = $this->data[$byte] &~ chr(1 << $bit);
}
}
function get_blob()
{
return $this->data;
}
function get_base64()
{
return base64_encode($this->data);
}
function get_bin()
{
$bin = '';
$len = strlen($this->data);
for ($i = 0; $i < $len; ++$i)
{
$bin .= str_pad(decbin(ord($this->data[$i])), 8, '0', STR_PAD_LEFT);
}
return $bin;
}
function get_all_set()
{
return array_keys(array_filter(str_split($this->get_bin())));
}
function merge($bitfield)
{
$this->data = $this->data | $bitfield->get_blob();
}
}



Users browsing this forum: VoilaBot [Bot] and 3 guests