vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Easiest Way To Pull Users Info (https://vborg.vbsupport.ru/showthread.php?t=205409)

BamaStangGuy 02-15-2009 02:40 AM

Easiest Way To Pull Users Info
 
I would like to pull some of the information that currently exists within a users profile page such as avatar, custom title, join date, dob, post count and online status. What is going to be the easiest way to do this? As far as the images go this will be used on sites with different methods of storing images so I need to respect all the methods (file/database)

Thanks for your help.

Jon Tolzien 02-15-2009 02:44 AM

Depending on where you have the data being saved, it will be different. For instance you can have the avatar and such in the database, or you can have it save it in a folder in the same directory as your forum. In addition to you want to do this for everyone or only certain profiles.

BamaStangGuy 02-15-2009 02:47 AM

I want to support both methods of retrieving the avatar as this product I am creating with be used on sites that store it in the file system while others store it in the database. It needs to be able to detect where it is being stored.

Basically what I am looking to do is show that information on a new page (mynewpage.php) for a project I am working on.

I am trying to figure out how to get this information the most efficient way for my page.

Dismounted 02-15-2009 02:55 AM

fetch_userinfo()
fetch_avatar_from_userinfo()

BamaStangGuy 02-15-2009 04:13 AM

Thanks Dismounted. This is what I am using:

PHP Code:

require_once(DIR '/includes/functions_user.php');

fetch_avatar_from_userinfo($vbulletin->userinfofalsetrue);

$avatarurl $vbulletin->userinfo['avatarurl']; 

$avatarurl doesn't hold my avatar url though. It just holds the unknown.gif avatar.

print_r on $vbulletin->userinfo shows all my other info so that seems to be working correctly.

Dismounted 02-15-2009 04:39 AM

Look at what fetch_avatar_from_userinfo() does. :)

BamaStangGuy 02-15-2009 05:08 AM

Got it figured out. Thanks


All times are GMT. The time now is 12:26 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.01025 seconds
  • Memory Usage 1,721KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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