Skip to:
Content
Pages
Categories
Search
Top
Bottom

PROFILE – user specified fields

  • this really cool feature is available in Vanilla and i really do think bbPress should use it too. rather than everyone creating a specific plugin and/or hack for adding new fields: DOB, website, messengers, quote, interests, etc… why not have it user specified?

    like say i’m in my profile editing page, i can choose to fill in the existing fields, or add new ones of my choice. say i create a new field: “mobile number”, then i fill in the field’s data and save it for my profile. nobody else will have this “mobile number” field in his/her profile page except me (unless they add such a one too).

    in a future version, i suppose some ajax could be employed where as we type in the “field name” there would be a live search suggesting similar (if not matching) existing fields.

    what do you guys think?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Some of that is already implemented into the bbPress forum software, for the messengers.. try this thread..

    https://bbpress.org/forums/topic/404?replies=11

    spencerp


    ardentfrost
    Member

    @ardentfrost

    I think he means he wants the ability to add new ones or take away some on his own, possibly through a nice interface. It’s not a bad idea.

    For now, though, if you want to change it, make a file in your my-plugins directory and put this in it:

    <?php

    function get_profile_info_keys_personal() {

    return array('user_email' => array(1, __('Email')), 'user_url' => array(0, __('Website')), 'from' => array(0, __('Location')), 'occ' => array(0, __('Occupation')), 'interest' => array(0, __('Interests')));

    }

    add_filter('get_profile_info_keys', 'get_profile_info_keys_personal');

    ?>

    Then you can add or take away whatever you want.

    However, you will need to know a little more about how other plugins work. For instance if you use my avatar plugin, you would need to add into that file 'avatar_loc' => array(0,__('Avatar URL')) (into that long line) and comment out part of my plugin.

    A plugin to do all of that automatically wouldn’t be hard, but would need to be done in such a way so that people can write plugins to interface it (so, for instance, I could interface it from my avatar plugin to make sure that the part I need is inserted into the line).

    I only mention that so that if anyone decides to tackle the plugin before I do, they’re sure to account for that ;)

    Ah, ok.. I’ll have to try/test that then Josh.. thanks for pointing that out.. ;) :)

    spencerp

    first an initiative would have to be put out. i REALLY think it will benefit bbPress, hope it gets into the bbPress Core files somehow.

    ardentfrost, i am currently using your method now and it’s great.

    I have a question however. Instead of a text field like the other ones, how do i make it so one piece of information has a dropbox with a few options instead of a textbox? I know the HTML for it, just wondering how I do the PHP modification.

    ardentfrost, I’m also using this method to add custom fields, but when a user logs in and tries to edit the custom fields, nothing happens. It works when the user registers.

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