View Full Version : User Profile Fields outside Postbit?
kyrnel
04-12-2004, 08:44 PM
I'm trying to display a user profile field in a template outside of postbit.
Specifically, I want to use the ShowGroups page to be my staff page and display additional information about the user (i.e., full name, title, etc.).
I can't seem to find the code that allows you to reference $post[fieldx] in the post bit.
If anyone can help, or at least point me to where the code is, I'd really appreciate it.
Thanks in advance,
Sean
MX6.com
kyrnel
04-19-2004, 04:26 PM
Anyone?
Sketch
04-19-2004, 04:50 PM
Are you using vb 2.3.1 or 3.0.x?
SVTBlackLight01
04-19-2004, 05:09 PM
Try $bbuserinfo[fieldx].
kyrnel
04-19-2004, 06:11 PM
I'm using 3.0.
$bbuserinfo[fieldx] wont work because it only displays the info the current logged in user, not the user being displayed on the Show Groups bit.
SVTBlackLight01
04-19-2004, 09:51 PM
Ahh. Yes. I didn't completely understand what you were asking.
I could use something like that as well.
kyrnel
04-21-2004, 12:15 AM
Another possibility would be to modify the Memberlist to show only certain usergroups. I mean, I'm kinda suprised that they have a separate Show Groups page at all. It would seem to make more sense to have a lookup on the regular Memberlist that only showed the Admins and Mods (or staff).
The Memberlist page is WAY more flexible than Showgroups.
So if anyone has any ideas to make the Memberlist display only certain user groups, then that would probably work as well.
Cold Steel
04-30-2004, 04:30 PM
I asked the same thing a long time ago, and again today.
http://www.vbulletin.com/forum/showthread.php?p=663969#post663969
Idea:
- You have to edit showgroup.php file, find the part where it read the information from database for showgroup (query SELECT something)
- Add to the query so that it also read all field (or field16) from customfield table
by that time, you will be able to use field16 in your template
I didnt actually look at the file, so cant tell you excactly where it is right now.
the_sisko
04-30-2004, 05:12 PM
Another possibility would be to modify the Memberlist to show only certain usergroups. I mean, I'm kinda suprised that they have a separate Show Groups page at all. It would seem to make more sense to have a lookup on the regular Memberlist that only showed the Admins and Mods (or staff).
The Memberlist page is WAY more flexible than Showgroups.
So if anyone has any ideas to make the Memberlist display only certain user groups, then that would probably work as well.
The memberlist already has the feature to show only one specific group. It's used to show public group leaders all members of the group (memberlist.php?usergroupid=X) But its only working when you are leader of these groups. Maybe you could use the part of code of it and recode it for your needs.
kyrnel
04-30-2004, 05:25 PM
Thats a good suggestion.
I really need it to display mutiple groups, though. I know I could probably make a hidden group and add it to all the staff, but they would likely be all lumped together then.
It would be wonderful if I could have a page that showed the following sections:
Admins
Super Moderators
Moderators
Cold Steel
04-30-2004, 05:29 PM
I chatted with mtha and got it to work.
http://forums.asiansinc.com/showgroups.php
You need to edit showgroups.php by adding the bolded print (where XX is your custom profile field) in two places.
SELECT $locationfieldselect user.*, userfield.fieldXX,
If your field is longer than 250 characters you need to go to http://www.vbulletin.com/forum/showthread.php?t=91911&highlight=maximum+length+profile
Blue Moose Aaron
12-02-2004, 06:29 PM
Thanks for the advice Cold Steel. I did it and it worked like a charm.
http://www.thekryptonian.com/about.php?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.