-
Mark posted on the forum topic How to list content relevant to a logged-in member's interests (WAS: 1.2.6 upgrade – xprofile_get_fi in the group How-To and Troubleshooting: 14 years ago
Cool – adds that extra level of usability, nice one!
-
Mark posted on the forum topic How to list content relevant to a logged-in member's interests (WAS: 1.2.6 upgrade – xprofile_get_fi in the group How-To and Troubleshooting: 14 years ago
Have cleaned up the code and plugged in the code suggested by @hnla – gets rid of the need for implode/explode and also allows for the list of tags from the member profile to be live: ` $profileTagFull, ‘post__not_in’ => array($post->ID), ‘showposts’=>5, ‘orderby’ => rand, ‘order’ => DESC, ‘caller_get_posts’=>1 ); ?> Content of Interest <a…[Read more]
-
Mark posted on the forum topic How to list content relevant to a logged-in member's interests (WAS: 1.2.6 upgrade – xprofile_get_fi in the group How-To and Troubleshooting: 14 years ago
Bear in mind the original code is simply a modification of the ‘related posts’ code from WPRecipes (http://www.wprecipes.com/how-to-show-related-posts-without-a-plugin) with additional modifications from elsewhere on this support forum (forgive me, but I can’t recall where I picked it up from). My coding isn’t the best in the world, but I know…[Read more]
-
Mark posted on the forum topic How to list content relevant to a logged-in member's interests (WAS: 1.2.6 upgrade – xprofile_get_fi in the group How-To and Troubleshooting: 14 years ago
It’s to help deliver content that is of personal interest to the registered member based on their profile information, rather than just the normal ‘related content’ – personalisation of content is key, makes your site more relevant to the individual, increasing loyalty and stickiness.
-
Mark started the forum topic How to list content relevant to a logged-in member's interests (WAS: 1.2.6 upgrade – xprofile_get_fi in the group How-To and Troubleshooting: 14 years ago
Having just updated to 1.2.6 I have found that the following function is no longer working and simply returns “Array”:
$profileTagFull = xprofile_get_field_data( '25' , bp_loggedin_user_id() );//Fetch the text for the tags $profileTagClean = xprofile_format_profile_field('checkbox', $profileTagFull);//Clean up the data echo $profileTagClean;
…[Read more] -
Mark posted on the forum topic 1.2.6 upgrade – xprofile_get_field_data with checkboxes no longer working correctly in the group How-To and Troubleshooting: 14 years ago
Doh! You know, I was using explode() later on to extract the individual elements – don’t know why I didn’t think of using implode() to clean up the array. Thanks @hnla – that works now. For reference, here is the full code – basically this uses the data derived from checkboxes in the member’s profile (in […]
-
Mark posted on the forum topic 1.2.6 upgrade – xprofile_get_field_data with checkboxes no longer working correctly in the group How-To and Troubleshooting: 14 years ago
So, anyone got any ideas on how to clean up this array and get it to show as a comma-separated list?
-
Mark posted on the forum topic 1.2.6 upgrade – xprofile_get_field_data with checkboxes no longer working correctly in the group How-To and Troubleshooting: 14 years, 1 month ago
Brilliant, now
printr($profileTagFull)
returnsARRAY ( => COMMUNICATIONS => TECHNOLOGY )
so I now need to clean this up into a comma separated list.Thanks for your help (I put it in the theme’s functions.php by the way)
-
Mark posted on the forum topic 1.2.6 upgrade – xprofile_get_field_data with checkboxes no longer working correctly in the group How-To and Troubleshooting: 14 years, 1 month ago
This has to be something to do with the serialization of the data in the database field, surely? I’ve tried
maybe_unserialize
andunserialize
but with no luck. -
Mark posted on the forum topic 1.2.6 upgrade – xprofile_get_field_data with checkboxes no longer working correctly in the group How-To and Troubleshooting: 14 years, 1 month ago
Also, this data returns fine in the member’s profile (
) but of course this doesn’t allow me to specify a particular field id to use.
-
Mark posted on the forum topic 1.2.6 upgrade – xprofile_get_field_data with checkboxes no longer working correctly in the group How-To and Troubleshooting: 14 years, 1 month ago
The same thing happens – it simply returns the word “Array” – the same if I use
print_r($profileTagFull);
This was working fine until the 1.2.6 upgrade which is why my suspicions are that the process of how to read xprofile field data if it was created via checkboxes has changed. Note that the code works […] -
Mark posted on the forum topic 1.2.6 upgrade – xprofile_get_field_data with checkboxes no longer working correctly in the group How-To and Troubleshooting: 14 years, 1 month ago
Just wanted to bump this as it’s vitally important I get it fixed
Thanks
-
Mark joined the group How-To and Troubleshooting 14 years, 1 month ago
@tak5haka
Not recently active