Log in

View Full Version : Adding a custom profile field in SHOWGROUPS page


Brother Malachi
09-03-2009, 07:31 AM
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, 03:12 PM
Probably $userinfo[field7]

ragtek
09-03-2009, 04:40 PM
$bbuserinfo[field7]

Lynne
09-03-2009, 05: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, 09:02 PM
$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 1252016223 at 1252016223 ---------------

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, 09:34 PM
This is the WHERE part of the query to grab information for users on the showgroup.php page:
SELECT user.*,
usergroup.usergroupid, usergroup.title,
user.options, usertextfield.buddylist,
" . ($show['locationfield'] ? 'userfield.field2,' : '') . "
IF(user.displaygroupid = 0, user.usergroupid, user.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-04-2009, 12:00 AM
hopsa
sorry