View Full Version : "Your Profile" link
DivineMessenger
01-30-2009, 03:41 PM
How do I make a link that will take a user to their own profile?
Vaupell
01-30-2009, 04:07 PM
this is a copy direct from the "navbar" usercp link..
<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
But if the users are logged in just link to
http://www.yourforum.net/yourforum/usercp.php
and they will reach their own cp, no reason to make it defficult ;)
if they are not logged in, a login box is usually appearing.. test it out..
Dismounted
01-31-2009, 02:30 AM
The OP wants the link to the profile, not the User CP. ;)
<a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[your_profile]</a>
TNCclubman
01-31-2009, 05:02 AM
That doesnt work on an html page outside vB...
Dismounted
01-31-2009, 08:15 AM
That would've been handy information for the first post. :) You need to include vBulletin's global.php for the code to work, as member.php relies on a supplied user ID. However, you could probably code a plugin that will detect the user when member.php is run.
Vaupell
01-31-2009, 01:01 PM
The OP wants the link to the profile, not the User CP. ;)
<a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[your_profile]</a>
Ohh ups.. lol :D
That doesnt work on an html page outside vB...
Doh!!
Recomendations : search for the mod "Deluxe login" without quotations
i know its old, but it works, i did a few experiments this month with that
get that working on a blank page first, when it works
then add the link Dismounted postet, might want to modify
location to "member.php" if its in a different directory.
Test and run, if that works aswell, congrats
THEN you move your code to that ".php" page that it all was original intended to run on.
and you can do that for as many pages you like.
just a tip, always test the parts on a blank page before putting on for
publick display, ewen this is annoying "under construction" wth. :D
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.