vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   How to display usernames and custom profile fields in external pages? (https://vborg.vbsupport.ru/showthread.php?t=306265)

Nolandis 12-25-2013 07:14 AM

How to display usernames and custom profile fields in external pages?
 
Hi! This is my fist post (even though I'm not newly registered)... Today and part of yesterday I've been browsing for hours looking if my problem has been posted here before, but without luck.

First of all, let me be a bit more clear. I don't want to display my username while I'm logged in (what $vbulletin->userinfo['username'] does).

What I'm looking for is a way to show existing usernames registered in my forum in an external php page, regardless if I'm logged in or not. I'm not sure how to achieve that, but I don't think it should be difficult.

Basically what I want to do is a list of all the users that have a certain profile field filled, and those who leave it blank should not be added.

I'll appreciate any help!

And Happy Holidays! :)

kh99 12-28-2013 09:51 AM

Well, you can do that by a database query, and loop through the results. When you say "external page", what do you mean exactly? If you want to use vbulletin's database connection then you could include global.php in your script, but if your script is in a different directory than the vbulletin code, it gets a little more complicated.

Nolandis 12-29-2013 06:46 PM

Thank you kh99 (and congratulations for your upcoming 10K post)! :)

Based in your reply I did a research and I finally found the way to do it by following your recommendation. I wasn't expecting it to be that easy!

I appreciate your support. My problem is now solved.


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