Jump to the post that solved this thread.
Solved: 7 Years, 2 Months, 4 Weeks ago MyBB User Link to Profile Not Working
Solved: 7 Years, 2 Months, 4 Weeks ago
I'm trying to learn as much as I can about MyBB, skinning, and the variables used when skinning.

I've come across a problem that google isn't helping me out with so I'm asking y'all.

I'm trying to display this when a member is logged in in the 'panel' bar:
"Welcome back, [username & link to profile]  || [logout key]"

What I have in the coding is:
<span class="welcome">? <a href="$mybb->user['uid']">{$mybb->user['username']}</a> || <a href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}"><i>{$lang->welcome_logout}</i></a></span>

Problem is when they click their name it goes to a page saying:

And then has an error message:
404 Not Found

How do I get the url to be for their user id to link to their profile?
My forum --> http://nikitesting.icyboards.net/index.php

This is what the userlinks bar looks like:

This is what happens when the persons name is clicked:
Solved: 7 Years, 2 Months, 4 Weeks ago
Well, the href attribute is just invalid. Firstly, it's better to wrap the variable with {} - {$mybb->user['uid']} - to ensure proper interpolation. Secondly, there's no sign of the profile page in your URL. You're directing users relatively to their UID, but that page doesn't exist. http://nikitesting.icyboards.net/member....file&uid=3 - as you can see in your browser, it's member.php?action=profile&amp;uid=[UID] and you need to include that in the link.

Keep in mind it's not the best solution if you're using MyBB SEF/Google SEO URLs. get_profile_link() is better to use in that case - you need a plugin like Template Conditionals: http://mybbhacks.zingaburga.com/showthre...464&page=9 to be able to use that functions in templates.
Solved: 7 Years, 2 Months, 4 Weeks ago
Unfortunately I'm using MyBB through Icyboards so I cannot download any plugins other than the few they have 'ready' to use.

But this is the error message I get when entering what you suggested to:

Is there any other possible way to do this? Without downloading a plugin..
Solved: 7 Years, 2 Months, 4 Weeks ago
I didn't suggest that.. member.php?action=profile&amp;uid=[UID] is the page + parameter you need to link, where [UID] should be user's UID, so {$mybb->user['uid']}.

Solved: 7 Years, 2 Months, 4 Weeks ago
Oh, okay that makes a whole lot more sense.

Thank you VERY much for the help!
Greatly appreciated!!
Jump to the post that solved this thread.

Forum Jump:

Users browsing this thread: 1 Guest(s)