Hi Andrew, could you explain how you want to “get the html output” in a bit more detail? Do you mean programatically on save?
Cheers, Christian
Hi,
look here: http://www.dot-ev.de/apparat_abstrakt/
In the Backend the user write down his info. Paragraphs shown in the editor. In the frontend there are no <p> inside/shown.
regards
andrew
Ok, I see. What code are you using to pull the profile data into the theme?
Cheers, Christian
See below:
<?php if ( $Kurzinfo = bp_get_profile_field_data( ‘field=Kurzinfo’ ) ) : ?>
<?php echo bp_member_profile_data( ‘field=Kurzinfo’);?>
<?php endif ?>
thx
andrew
Hmm, yes it does seem like a filtering oversight in this plugin. I’ll look into it further. In the meantime, you could use bp_profile_field_data( array( 'field' => 'Kurzinfo', 'user_id' => 'your-user-id' ) ) instead.
Cheers, Christian
Oh, hang on, it’s simpler than that. You already get $Kurzinfo to test if it has a value. Why not just echo it? It should be properly formatted already.
Cheers, Christian
what was copy paste, i needed if else several times, e.g. no images than show current conventions …
i remove it, now only echo, but still the same …
Not entirely clear what you mean. I meant code that looks something like:
$Kurzinfo = bp_get_profile_field_data( 'field=Kurzinfo' );
if ( ! empty( $Kurzinfo ) ) echo $Kurzinfo;
Though this assumes that bp_displayed_user_id() is correctly populated.
HI!
Fine. This works. You are my friend.
-> http://www.dot-ev.de/apparat_abstrakt/
Glad to hear that it’s fixed and thank you for raising the issue. I need to document this in the plugin because BuddyPress does not offer a way to properly filter the xProfile content fetched by bp_get_member_profile_data(). It was discussed here but the type filter was never implemented.
Cheers, Christian