Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
buddypress custom fields do not show up using popup window
Avatar
kevin kiniry_1
Member
sp_UserOfflineSmall Offline
Apr 3, 2016 - 6:33 pm

Hi,

when I use the popup window option, when I click the "view full profile" in the popup the custom fields I have in buddypress don't show up.

also, is there a way to show that information on the forum page?

Thanks for all the help!

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 3, 2016 - 7:16 pm

currently, we can put some of our more common profile fields onto the buddypress profile... but afraid the opposite is not true...

are they standard buddypress profile fields?  That is, stored in usermeta table?  If so, you could use our custom profile fields to pull that information since it pulls things our of usermeta just like wp profile fields do...

barring that,  you could hook into the profile display and manually grab (via code added to the template) the buddypress data and display it...

Avatar
kevin kiniry_1
Member
sp_UserOfflineSmall Offline
Apr 4, 2016 - 7:43 am

The fields are in the Base (primary) and they are city, state and RV Make & model. how would I use your custom profile fields to get that info?

Thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 4, 2016 - 7:51 am

By default WordPress creates extra profile data in the WP usermeta table with keys of the users ID and a unique 'name' of the data item. Many plugins we have encountered that add profile data use the same mechanism.

Simple:Press does the same for the extra profile data we create or make available.

If BuddyPress also uses this standard mechanism - and while I do not actually know if it does - it seems reasonable that it should do - then our custom profile field plugin can be linked to the data simply by creating a custom field of exactly the same name - i.e, the same 'key' as used by the parent plugin. This would allow for the data to also be edited on an SP users profile entry form.

The plugin also comes with template tags that allow the user to display the data on the SP profile popup/page - full details of which can be found in the custom profile fields codex page.

andy-signature.png
YELLOW
SWORDFISH
Avatar
kevin kiniry_1
Member
sp_UserOfflineSmall Offline
Apr 4, 2016 - 9:50 am

I went to sptopicview.php and there was no code there like what is on the codex page.  I did find code like it in sptopicviewdesktop.php and I added the line to show the city. it worked, but the text was much larger and the custom avatar stopped displaying and it showed the guest one instead.  I put everything back as it was. I am afraid I am not much with coding.....

thanks for the help!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 4, 2016 - 4:00 pm

We would need ti see a code sample of what you did...

andy-signature.png
YELLOW
SWORDFISH
Avatar
kevin kiniry_1
Member
sp_UserOfflineSmall Offline
Apr 4, 2016 - 4:54 pm

I found this code in sptopicviewdesktop.php in the reboot theme (not the child)

sp_UserAvatar('tagClass=spPostUserAvatar spCenter&context=user', $spThisPostUser);
sp_PostIndexUserName('tagClass=spPostUserName spCenter');

then i added the following:

# Added poster's game type selection to the forum post, poster information section.
if (function_exists('sp_CustomProfileFieldsDisplay')) sp_CustomProfileFieldsDisplay('City', $spThisPostUser->ID);

this line was listed in the directions but it was already there:

 

sp_PostIndexUserLocation('tagClass=spPostUserLocation spCenter');

after my first attempt failed I added it anyway, and it still didn't work right.

thanks!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 4, 2016 - 5:05 pm

That page is a little confusing I see.

Can I recommend that you try the same thing but with this tag:

sp_CustomProfileFieldsProfileDisplay( $name, $userid, $label )

It was added to hekpo get the correct html/css styling when applying to the popup profile.

andy-signature.png
YELLOW
SWORDFISH
Avatar
kevin kiniry_1
Member
sp_UserOfflineSmall Offline
Apr 4, 2016 - 5:18 pm

this is what I put in

if (function_exists('sp_CustomProfileFieldsDisplay')) sp_CustomProfileFieldsDisplay( $name, $userid, $label);

 

is that right, because the city doesn't show now and the custom avatar is not showing like with the other

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Apr 4, 2016 - 5:22 pm

No - see post #8 - it is a different function,. Confusing name perhaps - but it IS different.

sp_CustomProfileFieldsProfileDisplay

not

sp_CustomProfileFieldsDisplay

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17366
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626