vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Custom Profile Fields on Custom Page (https://vborg.vbsupport.ru/showthread.php?t=282707)

deadlySniper 05-09-2012 09:42 PM

Custom Profile Fields on Custom Page
 
I am looking into making my own roster page. I know how to make the vBulletin powered pages thanks to a great article I read on here. The issues I am having on trying to complete it, is trying to pull usernames and custom fields into the tables. I have in use already the show roster plugin, but I cant install two of them. So I decided to just make my own.

I have tried using
Code:

<vb:if condition="$post['fieldx']"><dt>IGN</dt> <dd>{vb:raw post.fieldx}</dd></vb:if>
In a custom vb page but nothing shows up. I did change the X to its corresponding field.

kh99 05-10-2012 11:50 AM

You can't use $post on your custom page unless you include a query that reads data into $post.

You might want to take a look at memberlist.php, it's a little complicated but it displays a list of members along with various user fields, depending on how the options are set (each custom field has a "show in member list" setting, and in the main admincp settings there's an option for which fields to display).

deadlySniper 05-10-2012 05:56 PM

Is there anyway for the php file associated with the template to pull in the info for members?

kh99 05-10-2012 06:06 PM

Do you mean the php file you're writing from scratch? Then yes, you can pull in the information by doing a database query. You'd query the user table and add a "join" for the userfield (and maybe others depending on what info you want to display). The reason I mentioned looking at memberlist is because it basically does the same thing so it has a query similar to what you'd need.

deadlySniper 05-11-2012 02:18 AM

I used this tutorial. Which you make a php file for that custom page - https://vborg.vbsupport.ru/showthread.php?t=228112


All times are GMT. The time now is 06:01 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.00950 seconds
  • Memory Usage 1,714KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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