Support Forum
I've upgraded to the Beta 5.0 release, and I'm having just a little trouble with custom fields in Profiles. On one of my sites, I use wp-members to add custom fields into the user registration (which are then stored in the primary WP databases). In the prior version of SP, I found it fairly easy to get any information inputted by registering members to show up on their \\\"public\\\" profile ('public' in the sense that other members can view it). I could simply call the information from the WP-database through the SP admin interface.
In version 5, though, I can't seem to do that. I installed the custom field plugin, but the only thing that it seems to allow me to do is to add a field that can be edited by users in their SP profile page (and I'd definitely prefer they not have to enter the information twice).
I'm probably missing something, and if there is a forum post about this already, then I apologize, but I wasn't able to find it. Thanks in advance for any assistance.
in 5.0, its all about themes... previously it was fixed display... it could only show in one spot - no way to change...
Now, you have complete control on where to display it... could be in forum or could be in post... or other...
first step is decide where you want it... then you need to add the template tag to display the custom profile field in that location... doing this my editing the appropriate template file in the sp theme... just a reminder, you really should create your own them rather than editing one of ours to prevent loss of changes on upgrade... just start by copying one of ours...
where you want the custom profile field to display, just add:
sp_CustomProfileFieldsDisplay($name, $userid);
where $name is the name of the custom profile field you created... and $userid tells whose info to display... just leave it off for the current user... or add the user id of the user you want...
Visit Cruise Talk Central and Mr Papa's World
I am using some custom profile information in my forum scripts and would need just to access the data rather than displaying it. I have modified SP plugin code (sp-custom-profile-fields-display-tag.php) to allow that, but I was thinking it could also be useful to add a such a function to get the data (and not display it) in a later custom profile plugin update.
Well, I actually made the necessary changes for my use, I was mainly asking in case it helps others.
I'm using a profile custom field (list of items with a radiobox) to register the tablet model each forum user has. Based on this information, I'm doing some operations and displaying it next to each user post in the left area (profile). To achieve this, I made a custom version of sp_do_CustomProfileFieldsDisplay function that just returns the custom profile data and put it in spFunctions.php of my theme.
Works perfect
Yes it would but there is a better way that requires no new functions.
For each post in topic view there is a global data object available called $spThisPostUser. That will have a property defined for each custom field. So - if the slug of your custom field is 'tablet' then the data will be available as $spThisPostUser->tablet
If you go to the forum admin > Toolbox > Data Inspector - then you can turn on the inspector for $spThisPostUser and see the data that is available for each user...
YELLOW
SWORDFISH
|
1 Guest(s)