vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to Pull Self Userinfo From Server (https://vborg.vbsupport.ru/showthread.php?t=102275)

evenmonkeys 12-05-2005 04:34 PM

How to Pull Self Userinfo From Server
 
I'm making a blank page and I'm trying to list out information of the person. How would I do something like this...

Username: {person's username}
Posts: {person's posts}

You can get the idea there. I'm making a custom page with information on it, but I can't specify an exact location to look because I want it to pull the information for whoever is looking at it. If I look at the page, I want it to say xYarub with 1000 posts. Whereas if Bob is looking at it, I want it to say Bob with 200 posts. See what I'm getting at?

Can this be done without extra files? Is there just a phrase or something I can use? Please help.

Marco van Herwaarden 12-05-2005 07:22 PM

Just include global.php in the top of your script. If someone is logged in, you will find all the user information in the $vbulletin->userinfo array.

evenmonkeys 12-05-2005 08:09 PM

I'm using Dream's page wrapper to do this... so the global.php would already be in there, correct? I'm not making an actual php file or anything. I'm just creating a blank page through Styles & Templates.

evenmonkeys 12-06-2005 10:07 PM

Still lookin. =\

Marco van Herwaarden 12-07-2005 05:56 AM

Just include $vbulletin->userinfo[username] and $vbulletin->userinfo[posts] in your template.

evenmonkeys 12-07-2005 06:42 PM

That's what I've been using.
HTML Code:

<tr>
        <td class="tcat">$vbphrase[view_profile]<span class="normal">: $vbulletin->userinfo[username]</span></td>
</tr>

That shows as:

View Profile: Array[username]

Marco van Herwaarden 12-07-2005 06:44 PM

Then use instead:
HTML Code:

{$vbulletin->userinfo[username]}

evenmonkeys 12-07-2005 06:51 PM

Thank you very much! You're a good guy, Marco. =D


All times are GMT. The time now is 09:00 PM.

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.01009 seconds
  • Memory Usage 1,718KB
  • 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
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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