Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter CommonEasy

    (@commoneasy)

    Hi man! sorry for the late response, i just tested your code and it works perfect! awesome ??

    Thread Starter CommonEasy

    (@commoneasy)

    Hi craig,
    Thanks for your question…i’m not really sure what you mean, but i looked at the c-panel of my hosting provider en there where no logs to be found (all where empty). i also added

    // Enable WP_DEBUG mode
    define('WP_DEBUG', true);
    
    // Enable Debug logging to the /wp-content/debug.log file
    define('WP_DEBUG_LOG', true);
    
    // Disable display of errors and warnings
    define('WP_DEBUG_DISPLAY', false);
    @ini_set('display_errors',0);

    to my config file and tried the code a couple of times, but i didn’t find the debug.log file. any idea of what i am doing wrong? Thanks!

    Thread Starter CommonEasy

    (@commoneasy)

    Thanks man! works like a charm ??

    Thread Starter CommonEasy

    (@commoneasy)

    allright thanks man! i got it working with the following code:

    // currency
    add_filter( 'bxcft_show_field_value', 'my_show_field', 15, 4);
    function my_show_field($value_to_return, $type, $id, $value) {
      if ($value_to_return == '')
            return $value_to_return;
       if ($type == 'number') {
            $value = str_replace("<p>", "", $value);
            $value = str_replace("</p>", "", $value);
            $field = new BP_XProfile_Field($id);
            if ($field->id == '18' ) {
    
    	 $f_value=number_format($value,2);
    			  $new_value = "&euro; $f_value,-";
    
    	   } else {
                $new_value = $value;
            }
            return '<p>'.$new_value.'</p>';
        }
        return $value_to_return;
    }

    *field id 18 = field name gewenste dekking(E).

    I have on more question how can i make this work for multiple fields, say like 2, 18 and 19 without putting the whole code back again? strangly ‘2,18,19’ isn’t working…

    thanks again!

    Thread Starter CommonEasy

    (@commoneasy)

    i think the error is in the
    `$value = money_format(‘%.2n’, $value) . “\n”;
    $new_value = money_format(‘%.2n’, $value) . “\n”;`

    shouldn’t $value be referring to a value in the database?

    Thread Starter CommonEasy

    (@commoneasy)

    he man, thanks for your answer and sorry for the late response. I just checked your code and it gives me the WE ARE HERE string in the “waarde van je gadget” box. so the error is not in the if statement. However all the fields that should come right under the waarde van je gadget box are hidden/disappeared…and i’m still not able to show the values as valuta, maybe because the value stored in the wp_bp_xprofile_data table in the database are stored as long text? I really hope you can help me with this one ?? Cheers

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