Link to Profile-pages ?

erich37

Well-known member
I have a Notice which welcomes the user and I am linking from there to the "User-Account-page" via www.domain.com/account/ in order for the user to easier find his Account.

Is there a way to also link to the user's "Profile-page" ?


Many thanks!
 
Yep, it is. I tested around and came up with something that worked:

HTML:
Check out your <a href="http://localhost/community/members/{name}.{user_id}">profile</a>!

Notice the dot between {name} and {user_id}.

:)
 
Yep, it is. I tested around and came up with something that worked:

HTML:
Check out your <a href="http://localhost/community/members/{name}.{user_id}">profile</a>!

Notice the dot between {name} and {user_id}.

:)

Nope, that does not work.

Error: "page could not be found"
 
yeah, the first letter of the username is in capital.

I am just wondering, because the default XF-Links to the user-profile-page do not show the first letter capitalised.
So there is a difference in the link-URL....

Does this matter or is it irrelevant ?
 
yeah, the first letter of the username is in capital.

I am just wondering, because the default XF-Links to the user-profile-page do not show the first letter capitalised.
So there is a difference in the link-URL....

Does this matter or is it irrelevant ?

Shouldn't matter. I'll see if there is a way to make it lowercase.
 
Tried adding this, but it didn't make it lowercase unfortunately.

HTML:
Check out your <font style="text-transform: lowercase;"><a href="http://localhost/community/members/{name}.{user_id}">profile</a></font>!
 
I link to profile page using this code. The strtolower may be the missing piece.

PHP:
<a href="/community/members/' . strtolower($XF->visitor->get('username')) . '.' . $XF->visitor->get('user_id') .'"> '. $current_user->display_name .'</a>
 
I link to profile page using this code. The strtolower may be the missing piece.

PHP:
<a href="/community/members/' . strtolower($XF->visitor->get('username')) . '.' . $XF->visitor->get('user_id') .'"> '. $current_user->display_name .'</a>

huh, that is a long code :eek: :confused:

you can put this stuff into a "Notice" and it works ?
 
Top Bottom