Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 21 replies - 1 through 21 (of 21 total)

  • h4x3d
    Participant

    @h4x3d

    has anyone transformed this to buddypress xprofiles?

    so that for instance specific tags/html is allowed on profile pages?

    this would be really handy.


    h4x3d
    Participant

    @h4x3d

    did you find a solution?

    did

    remove_filter( ‘xprofile_get_field_data’, ‘wp_filter_kses’, 1 );

    work for you?


    h4x3d
    Participant

    @h4x3d

    great, thank you jjj

    I also noticed that the filter by alphabetical order seems not to work as members listed appear in apparently random order.

    If you need any testers, let me know.


    h4x3d
    Participant

    @h4x3d

    https://buddypress.org/forums/topic/bp-member-filter this is going to do what I need I think.


    h4x3d
    Participant

    @h4x3d

    I think what I need is more or less https://buddypress.org/forums/topic/bp-member-filter

    and I am confident this is progressing soon or later.


    h4x3d
    Participant

    @h4x3d

    hello,

    I have modified the original bp-filter to show checkboxes now (the “to-do” part)

    it is really a bit quirky for now, but does its basic job.

    sometimes the output shows false results, but so far it is looking good.

    I am not a php programmer, so the modified code may be entirely buggy:

    http://pastebin.com/m18cb4dd5


    h4x3d
    Participant

    @h4x3d

    I found it…

    line 369: // TODO: This :P

    :)

    I would happily help out or donate towards development of this part, anyone to reply?


    h4x3d
    Participant

    @h4x3d

    I think I narrowed the problem down:

    the output seems to go bust when there are more than one results.

    I can query the members for different profile fields, but as soon as there are more than one hit, the function halts (cut off in html when viewing source).

    with error reporting on it shows: (sorry for breaking the lines)

    Notice: Undefined variable: field_filter_last_users in
    /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/bp-filter.php on line 150
    Notice: Undefined variable: temp_array in
    /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/bp-filter.php on line 170
    Catchable fatal error: Object of class stdClass could not be converted to string in
    /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/bp-filter.php on line 174

    the fatal line is:

    // Remove duplicate user_id's<br />
    $temp_array = array_unique( $temp_array );

    any clues or tipps?

    YAY!! uncommenting that line fixes it!!

    … but still… the selectbox issue remains, no select boxes for me with this release! :(

    in bp-filter.php there is a line commented out in regards to selectboxes. when “activating” it,

    it returns:

    Fatal error: Call to undefined function bp_filter_the_profile_field_options() in /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/bp-filter.php on line 257

    – this function is not added yet, correctly?

    now the problem is: dropdown boxes work, but when saving profiles the data is not saved when using dropdown boxes (I have to use selectboxes there). when using selectboxes with this filter, the selectboxes are not displayed!

    anything I am missing?

    thanks


    h4x3d
    Participant

    @h4x3d

    I have still not been able to get it working correctly. I am working on a non-profit project to display different members based on different custom profile values, but till now to no success ;(

    can anyone help me out or give me a pointer?

    I think this is pretty much the right plugin for the purpose.


    h4x3d
    Participant

    @h4x3d

    grr,

    seems like I don’t get it to work as I wanted it:

    I am trying to display members on the /members/ directory by means of the ?s=

    search and trying to select more than one term.

    For instance:

    /members/?s=Team

    would return all people that have a custom profile field of “Team” – this works. great!

    but I would like to have

    /members/?s=Team&Red

    to show all people that have the custom profile field “Team” and “Red”.

    any pointers?

    This is doing my head in for days :((


    h4x3d
    Participant

    @h4x3d

    hello there DJPaul,

    thanks for your reply.

    so there is a lot of custom code hacking involved?

    do you happen to have any pointers?

    where can I find the code concerned (in the core?) ?

    thanks again!


    h4x3d
    Participant

    @h4x3d

    hello,

    sorry to bump this up,

    but I need the same as the initial OP,

    I would also be able to pay up to $50 for a solution that would allow searching by different search terms.


    h4x3d
    Participant

    @h4x3d

    this is awesome,

    many thanks james!

    however it does not work for checkboxes (for me),

    I think this is because of the code from the bp-filter.php

    <?php case 'checkbox' : ?><br />
    <div class="checkbox"><br />
    <span class="label"><?php _e( bp_get_the_profile_field_name(), BP_FILTER_TEXTDOMAIN ) ?></span><br />
    <?php //bp_filter_the_profile_field_options() ?><br />
    </div><br />
    <?php break; ?>

    any fixes for that?

    when I delete the // the page halts (error).

    many thanks!


    h4x3d
    Participant

    @h4x3d

    Peterverkooijen, thanks for the unserialize bit, I could really use that for my xprofile value problem.


    h4x3d
    Participant

    @h4x3d

    I figured it out, somehow:

    http://paste2.org/p/546483 (dirty)

    works :)


    h4x3d
    Participant

    @h4x3d

    or maybe something with unserialize&stripslashes?

    I found this in reference to the code mentioned above:

    * xprofile_format_profile_field()<br />
    955 *<br />
    956 * Formats a profile field according to its type. [ TODO: Should really be moved to filters ]<br />
    957 *<br />
    958 * @package BuddyPress Core<br />
    959 * @param $field_type The type of field: datebox, selectbox, textbox etc<br />
    960 * @param $field_value The actual value<br />
    961 * @uses bp_format_time() Formats a time value based on the WordPress date format setting<br />
    962 * @return $field_value The formatted value<br />
    963 */<br />
    964 function xprofile_format_profile_field( $field_type, $field_value ) {<br />
    965 if ( !isset($field_value) || empty( $field_value ) )<br />
    966 return false;<br />
    967<br />
    968 $field_value = bp_unserialize_profile_field( $field_value );<br />
    969<br />
    970 if ( 'datebox' == $field_type ) {<br />
    971 $field_value = bp_format_time( $field_value, true );<br />
    972 } else {<br />
    973 $content = $field_value;<br />
    974 $content = apply_filters('the_content', $content);<br />
    975 $field_value = str_replace(']]>', ']]>', $content);<br />
    976 }<br />
    977<br />
    978 return stripslashes( stripslashes( $field_value ) );<br />
    979 }

    and this

    function bp_unserialize_profile_field( $value ) {

    522 if ( is_serialized($value) ) {

    523 $field_value = maybe_unserialize($value);

    524 $field_value = implode( ', ', $field_value );

    525 return $field_value;

    526 }

    527

    528 return $value;

    529 }


    h4x3d
    Participant

    @h4x3d

    This works great on single field entries, but for checkboxes it outputs stuff like

    a:3:{i:0;s:19:”Beschaffung/Einkauf”;i:1;s:26:”Marketing & -kommunikation”;i:2;s:20:”Strategie/Innovation”;}

    where as in the sidebar (random member) it comes through just fine.

    How can I fix this?

    thanks

    the random profile data function does some magic like this:

    function bp_the_site_member_random_profile_data() {

    1138 global $site_members_template;

    1139

    1140 if ( function_exists( 'xprofile_get_random_profile_data' ) ) { ?>

    1141 <?php $random_data = xprofile_get_random_profile_data( $site_members_template->member->id, true ); ?>

    1142 <?php echo wp_filter_kses( $random_data[0]->name ) ?>

    1143 <?php echo wp_filter_kses( $random_data[0]->value ) ?>

    1144 <?php }

    1145 }

    How can I apply that to James’ code above to fix the output?


    h4x3d
    Participant

    @h4x3d

    this works perfectly, thank you!


    h4x3d
    Participant

    @h4x3d

    any solution to this, would be interested to find out how to display specific profile information. cheers


    h4x3d
    Participant

    @h4x3d

    curious if you found a solution, bump :o)


    h4x3d
    Participant

    @h4x3d

    +1 on this

    got the same issue.

    is there anything I can try?

Viewing 21 replies - 1 through 21 (of 21 total)
Skip to toolbar