Skip to:
Content
Pages
Categories
Search
Top
Bottom

  • About
  • Plugins
  • Themes
  • Documentation
  • Blog
  • Support
  • Download

BuddyPress.org


  • Register
  • Lost Password
  • Log In

@tak5haka active 1 year, 8 months ago
  • Personal
  • Mentions
  • Favorites
  • Profile picture

    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: 2 years, 6 months ago

    Cool – adds that extra level of usability, nice one!

  • Profile picture

    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: 2 years, 6 months 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: ` !– RELATED POSTS BY USER PROFILE INTEREST AREAS — $profileTagFull, ‘post__not_in’ => array($post->ID), ‘showposts’=>5, ‘orderby’ => rand, ‘order’ => DESC,…[Read more]

  • Profile picture

    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: 2 years, 6 months 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]

  • Profile picture

    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: 2 years, 6 months 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.

  • Profile picture

    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: 2 years, 6 months 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]

  • Profile picture

    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: 2 years, 6 months 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 [...]

  • Profile picture

    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: 2 years, 6 months ago

    So, anyone got any ideas on how to clean up this array and get it to show as a comma-separated list?

  • Profile picture

    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: 2 years, 6 months ago

    Brilliant, now printr($profileTagFull) returns ARRAY ( => 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)

  • Profile picture

    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: 2 years, 6 months ago

    This has to be something to do with the serialization of the data in the database field, surely? I’ve tried maybe_unserialize and unserialize but with no luck.

  • Profile picture

    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: 2 years, 6 months 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.

  • Profile picture

    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: 2 years, 6 months 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 [...]

  • Profile picture

    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: 2 years, 6 months ago

    Just wanted to bump this as it’s vitally important I get it fixed

    Thanks

  • Profile picture

    Mark joined the group How-To and Troubleshooting 2 years, 7 months ago

Profile picture of Mark
  • Activity
    • Personal
    • Mentions
    • Favorites
  • Profile
    • View
  • Sites 0
    • My Sites
  • Forums
    • Topics Started
    • Replies Created
    • Favorites

See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS

Follow BuddyPress on Twitter • GPL • Contact Us • Terms of Service

Skip to toolbar
    • WordPress.org
      • About WordPress
      • Documentation
      • Support Forums
      • Feedback
      • Developer Trac
      • Developer Blog
    • bbPress.org
      • About bbPress
      • Documentation
      • Support Forums
      • Feedback
      • Developer Trac
      • Developer Blog
    • BuddyPress.org
      • About BuddyPress
      • Documentation
      • Support Forums
      • Feedback
      • Developer Trac
      • Developer Blog
  • BuddyPress.org
    • Log in
  • Anonymous
    • AnonymousNot Logged In
    • Register
    • Lost Password
    • Log In
Log Out