Skip to:
Content
Pages
Categories
Search
Top
Bottom

text in User-Profile: some words are linked, others are not ?


  • abcde666
    Participant

    @erich73

    within my user-profile, I have wrote the description-text about my person into the field “About Me”.

    within this text, some words are being linked, but some are not.

    When are words being linked and when not ? This is strange behaviour – some words are being linked which I actually do NOT want to have linked and vice-versa.

    How can I control this ?

    Many thanks,

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

  • mlovelock
    Participant

    @mlovelock

    Try the custom filters for BP plugin – https://wordpress.org/extend/plugins/custom-profile-filters-for-buddypress/

    Allows you / your users to be more prescriptive about what BP ‘auto-links’. Don’t think it will completely stop BP auto-linking some things – though you could, if you wished, tell the plugin to exclude ALL fields from being auto-linked.

    You / users can also use the square brackets ‘[ ]’ in profile fields to specify words or phrases they do want linking.

    The plugin’s pretty handy for specifying fields like web site / twitter that shouldn’t be auto-linked.


    Jeff Sayre
    Participant

    @jeffsayre

    You can read more about this here:

    https://trac.buddypress.org/ticket/787


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    I recommend just turning it off completely…

    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 2, 2 );

    More elaborate filtering could be done by checking bp_get_the_profile_field_value and looking for field ID’s if you wanted to.

    Just saw the replies. Boone’s plugin is a good option too. Expect to see something similar in the core for xprofile in future versions.


    abcde666
    Participant

    @erich73

    well, I actually do not want to explain my users how to use “[ ]” brackets.

    I guess I will turn it off completely. Is there just a button within Admin-interface to turn this thing off or do I need to hire a programmer to help me in achieving this ?

    Thanks for your feedback !


    stwc
    Participant

    @stwc

    well, I actually do not want to explain my users how to use “[ ]” brackets.

    I just added a div on the appropriate signup page in my child theme explaining how to do it. Users see it during registration. Well, they will, when I eventually get some. ;-)


    Jeff Sayre
    Participant

    @jeffsayre

    @Erich73

    As jjj said, you can turn it off yourself. Do you have a bp-custom.php file? If not, create one with the code below, then stick that file in /wp-content/plugins/.

    <?php
    function remove_xprofile_links() {
    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 2, 2 );
    }
    add_action( 'plugins_loaded', 'remove_xprofile_links' );
    ?>


    Gianfranco
    Participant

    @gian-ava

    Experiencing the same thing, with some words auto linkik and some not.

    Is there a way to control those auto links?

    And… tha above code to turn auto links off is not working for me. Is it still valid?


    r-a-y
    Keymaster

    @r-a-y

    Change the remove_filter line in Jeff’s code to:

    remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 50, 2 );


    Gianfranco
    Participant

    @gian-ava

    Ok, thanks for the help, r-a-y.

    The code worked great!

    And sorry, I didn’t mean to bump similar threads. To me one was about “managing” auto links the other was to “turn them off”. But I’ll make sure to pay attention to that in the future. Thanks.

    ;-)


    Gianfranco
    Participant

    @gian-ava

    One thing that the code doesn’t do is turning off auto links for url’s.

    I want members to fill some fields with their personal social profiles links: Facebook, Twitter, Personal Homepage.

    I’d like to link it from the words: “Facebook”, “Twitter”, “Personal Homepage”, without having http://facebook.com/user, ect.

    Now, I tried something like this within the profile fields loop:

    <li><a href="<?php echo bp_the_profile_field_value() ?>"><?php bp_the_profile_field_name() ?></a></li>

    But of course it messes everything up because the function “bp_the_profile_field_value()” generates a <a href="..."> itself.

    Is there a workaround for this?


    chouxpastry2002
    Participant

    @chouxpastry2002

    remove_filter( ‘bp_get_the_profile_field_value’, ‘xprofile_filter_link_profile_data’, 50, 2 );

    This one worked for me thanks mate.

    <?php
    function remove_xprofile_links() {
    remove_filter( ‘bp_get_the_profile_field_value’, ‘xprofile_filter_link_profile_data’, 2, 2 );
    }
    add_action( ‘plugins_loaded’, ‘remove_xprofile_links’ );
    ?>

    Thats work, but now members can’t edit profile.

    the last update broke it :’

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘text in User-Profile: some words are linked, others are not ?’ is closed to new replies.
Skip to toolbar