vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   "Your Profile" link (https://vborg.vbsupport.ru/showthread.php?t=203621)

DivineMessenger 01-30-2009 03:41 PM

"Your Profile" link
 
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..

Code:

<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

Code:

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. ;)
Code:

<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

Quote:

Originally Posted by Dismounted (Post 1729640)
The OP wants the link to the profile, not the User CP. ;)
Code:

<a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[your_profile]</a>

Ohh ups.. lol :D

Quote:

Originally Posted by TNCclubman (Post 1729719)
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


All times are GMT. The time now is 04:11 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01052 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete