richsad (@richsad)

Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Aha, this post looks like my golden ticket to see Willy Wonka’s chocolate factory up close and personal. Holy cow, I’d getting giddy…

    http://www.livibetter.com/it/topic/add-new-user-profile-fields

    Maybe I’ll will put this issue to rest TONIGHT!

    Here’s where I’m at. if I modify the function get_profile_info_keys in /wpmu/bbpress/bb-includes/functions.php and change the definition of get_profile_info_keys to what I want, it’s all good. I changed the text to make it fit and apologize for poor formatting. The downside here is I am changing bbpress code, not my own template. There was no documentation indicating get_profile_info_keys is eligible for being plugged in, but it seems like it is. So I tried hardcoding first to see if this obtained the desired results. It did. The profile info prompts displayed correctly on registration page, the data was written the appropriate usermeta table, and viewing the profile displays the newly named fields and shows correct data. So far so good. Below is the code (sorry for poor formatting). Of course, the fatal flaw here is this NEEDS to be done in a plugin. So now I will tackle this. If anyone has a plugin sample for bbpress that shows modification of profile_info_keys I would be very grateful to take a peek. I believe by tomorrow I will have this hashed out and working properly as a plugin with no changes to core bbpress code. I will share that code here when I get there. In the meantime, feel free to flame, compliment, empower, disempower, or any other useful feedback! I am heading into no man’s land…

    //meta_key => (required?, Label). Don’t use user_{anything} as the name of your meta_key.

    function get_profile_info_keys() {

    return apply_filters(

    ‘get_profile_info_keys’,

    array(

    ‘user_email’ => array(1, __(‘Email’)),

    ‘tip’ => array(0, __(‘A tip you would like to share?’)), ‘favorite’ => array(0, __(‘Favorite products?’)),

    ‘more’ => array(0, __(‘How are you getting more?’)),

    ‘interest’ => array(0, __(‘Hobbies/interests?’))) );

    /* original array follows

    array(

    ‘user_email’ => array(1, __(‘Email’)),

    ‘user_url’ => array(0, __(‘Website’)),

    ‘from’ => array(0, __(‘Location’)),

    ‘occ’ => array(0, __(‘Occupation’)), ‘

    interest’ => array(0, __(‘Interests’))) );

    */

    What I’d love is to see someone has tread in these waters and knows how to use a plugin to implement an overridden get_profile_info_keys. I’m getting old for these all night programming marathons. It was fun the first three decades, but now the arthritis flares up and I have to break to take my Centrum Silver… So all help will result in admiration from me to you! Ships ahoy.

    Maybe I’m being thick today, but I don’t really see how a plugin solves my problem after looking at them. Indeed there is an apply_filter call to read the user profile info, but the names of the keys in the associative arrive are assumed in various places around the code. As far as I can tell there wasn’t any forethought into an admin wanting to replace the user info collected at registration with something relevant to the specific forums domain.

    I think either I am missing some aspect of the plugins or this an area that could be improved upon for customization by the admin.

    Am I missing something that anyone can see? The problem appears to be akismet.php where the key of the user profile info is hardcoded into the code. In my version of the file line 86 and 148 seem to assume the keys to info have not been modified.

    Thanks. I will investigate the plugin concept today. Indeed we are writing our own history here!

    I should add that my objective is to change the info collected to be related to the nature of the website. Occupation, Location, and such is not the right data for the website in question.

    I also note that these are text fields ONLY. The content creator of this particular website wanted a dropdown question. I talked her out of it, but how would you do something like that?

    Lastly, WHERE is it documented how the profile system works if anywhere. I found the source code was all I could find.

    OK I fixed it. It looks like we took some bad advice. There was a post saying to make wpmu and bbpress get along I should add:

    if ( isset( $bb->wp_table_prefix ) ){

    $bb->usercookie = ‘wordpressuser’;

    $bb->passcookie = ‘wordpresspass’;

    }

    to the config.php

    That is the code that was messing things up. Without it admin works fine as keymaster and I see no other problems yet.

    _ck_,

    Thanks. I just tried blowing away the bb_ tables and repeating the install. The problem persists so I agree with your conclusion that the problem lies with the rights in the wp admin role. I will continue to seek an answer and share it when I find it!

    I am totally comfortable hacking around in the database. I back things up first and can always restore. So I will try that route next.

    -Rich

    Hi _ck_, I’m an associate of livwest who posted this. I’ve tried various things. I found the user metadata. The admin account has the keymaster specification and can get to the dashboard. But it cannot add a forum. I added the magic bits to my own account directly in MySQL and became a keymaster too. I show up in the list of keymasters. But I don’t have the right to change a forum either.

    This is a wpmu and bbpress mashup. It all went fine at install. Where is the data controlling rights to add forums stored?

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