2014-08-21, 10:29 AM
2014-08-21, 11:08 AM
Hi,
sorry I don't get, what you want to know... You want to access a username in a template - but the name of which user?
sorry I don't get, what you want to know... You want to access a username in a template - but the name of which user?
2014-08-21, 11:11 AM
Maybe do you mean: {$mybb->user['username']} ? this shows only your own username
2014-08-21, 07:37 PM
(2014-08-21, 11:11 AM)niere8 Wrote: [ -> ]Maybe do you mean: {$mybb->user['username']} ? this shows only your own username
may something like:
{$mybb->user['username']} or {$username}
but for any users ... not for own username ! anyone know which core file generate user links? i want user profile links have the title if possible:
<a href="profilelink" title="username">username</a>
2014-08-21, 08:53 PM
You want the inc/functions.php file. Do a search for the function build_profile_link.
2014-08-23, 01:06 PM
<a href="{$user['profilelink']}" title="{$mybb->user['username']}">{$mybb->user['username']}</a>
and it will have hes / hers username as title
[attachment=32252]
and it will have hes / hers username as title
[attachment=32252]
2014-08-23, 02:46 PM
(2014-08-23, 01:06 PM)ekoice Wrote: [ -> ]<a href="{$user['profilelink']}" title="{$mybb->user['username']}">{$mybb->user['username']}</a>no i think this code just show own username !
and it will have hes / hers username as title
(2014-08-21, 08:53 PM)dragonexpert Wrote: [ -> ]You want the inc/functions.php file. Do a search for the function build_profile_link.
Thanks i do with this code:
<a href=\"{$mybb->settings['bburl']}/".get_profile_link($uid)."\" title=\"{$username}\"{$target}{$onclick}>{$username}</a>
But like always issue with styled usernames!
<a href="http://domain.com/user-1.html" title="USER STYLE CRASH HERE">user name</a>
we need variable that don't get username style !---------------------------------
and is there easy way to change link format from this:
http://domain.com/user-1.html
to:
http://domain.com/username.html
or
http://domain.com/username
i know google_seo_plugin do this ... but i don't use that plugin.
2014-08-23, 11:06 PM
You can always use the strip_tags function on the variable $username.