Support » Plugin: BuddyPress Xprofile Custom Field Types » About image upload and web field

  • Hello and thank you for this great plugin.

    I would like to ask you 2 questions please.

    1. Is there a way to give to the user an answer when his image upload have failed for a reason. Just a simple answer. That would be a more user friendly experience.

    2. Is it possible the output of the web field with the url to not have the http:// in the text but only the text that i set in the url www_mysite_com. Could i hide it with css somehow?

    Thank you for your time.

    • This topic was modified 1 month, 3 weeks ago by honoluluman.
    • This topic was modified 1 month, 3 weeks ago by honoluluman.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author raviousprime

    (@raviousprime)

    Hello,

    Thank you for using the.

    1. Please do let me know are you using the image field on the registration page?.
    2. I have tested a custom URL field on my development server and it is working as expected by stripping https or http part from the URL i.e. https://example.com/ will replace with example.com.

    Regards
    Ravi

    Thread Starter honoluluman

    (@honoluluman)

    Hello @raviousprime and thank you for your support.

    1. I am using the image upload field not on the registration page, but in profile section. When a user is uploading an image that is more than the size limit, there is no error notification for that. A simple default error would be nice.

    2. When i paste some url example.com, buddypress by default adds also the https:// and this applies also in the label text. I had to manually add in the class-field-type-web.php of the plugin on line 77

    public static function display_filter( $field_value, $field_id = '' ) {
    		$str = preg_replace('#(^https?:\/\/(w{3}\.)?)|(\/$)#', '', $field_value);
    		$link   = strip_tags( $str );
    		$target = self::get_link_target( $field_id ) ? 'target="_blank"' : '';
    
    		return sprintf( '<a href="%1$s" rel="nofollow" %3$s>%2$s</a>', esc_url( $field_value ), esc_html( $link ), $target );
    	}

    so that i can get as an output text label example.com .

    Maybe you could add this in the future.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.