vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Adding a custom profile field in SHOWGROUPS page (https://vborg.vbsupport.ru/showthread.php?t=222365)

Brother Malachi 09-03-2009 06:31 AM

Adding a custom profile field in SHOWGROUPS page
 
Hello,

How can I show a custom profile field that I created on the SHOWGROUPS page?
I know that using $post[field7] in the postbit template works. Therefore, I attempted to use $user[field7], but that didn't work.

Any ideas?

Lynne 09-03-2009 02:12 PM

Probably $userinfo[field7]

ragtek 09-03-2009 03:40 PM

$bbuserinfo[field7]

Lynne 09-03-2009 04:09 PM

$bbuserinfo is *you*, the viewer. That would make every field7 on the showgroups page the same and all yours.

Brother Malachi 09-03-2009 08:02 PM

Quote:

Originally Posted by Lynne (Post 1879097)
$bbuserinfo is *you*, the viewer. That would make every field7 on the showgroups page the same and all yours.

Yup, $bbuserinfo worked exactly as you said.
$userinfo, however, didn't :(

Any ideas?

--------------- Added [DATE]1252016223[/DATE] at [TIME]1252016223[/TIME] ---------------

In the showgroups template they're using $user[field2] to pull the "location" information, however none of the other default fields work.

Therefore, I'm guessing each field must be individually cached from somewhere?

Lynne 09-03-2009 08:34 PM

This is the WHERE part of the query to grab information for users on the showgroup.php page:
PHP Code:

    SELECT user.*,
        
usergroup.usergroupidusergroup.title,
        
user.optionsusertextfield.buddylist,
        
" . ($show['locationfield'] ? 'userfield.field2,' : '') . "
        
IF(user.displaygroupid 0user.usergroupiduser.displaygroupid) AS displaygroupid 

As you can see, all the usertextfields are not grabbed, only the location field if needed. So, if you want other usertextfields, you will have to actually edit that code (you can't use a plugin there) to grab it.

ragtek 09-03-2009 11:00 PM

hopsa
sorry


All times are GMT. The time now is 07:55 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.01928 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
  • (1)bbcode_php_printable
  • (1)bbcode_quote_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