I have a small site that needs very little moderation. I'd like for my users to have the power to change their own Custom Title, instead of sending me a Private Message with a request.
I can't figure out how to make that change, though. Any ideas?
I have a small site that needs very little moderation. I'd like for my users to have the power to change their own Custom Title, instead of sending me a Private Message with a request.
I can't figure out how to make that change, though. Any ideas?
You need to write a plugin that will be called on a hook in the profile, where it adds to the associative array $profile_info_keys an entry with key 'bb_title' - I think. To see how to do that, look at some other plugin that adds fields to the profile info thingy.
Well, I don't know the first thing about writing plugins, so if somebody can help out, I'd appreciate it. :)
in functions.php find function get_profile_admin_keys() {, and move $bb_table_prefix . 'title' => array(0, __('User Title')) from that function's array to function get_profile_info_keys()
Hmm.... not sure to how to change that code without getting errors (I'm running 0.9.0.1 on this particular forum).
function get_profile_info_keys() {
return apply_filters(
'get_profile_info_keys',
array('user_email' => array(1, __('Email')), 'user_url' => array(0, __('Website')), 'from' => array(0, __('Location')), 'occ' => array(0, __('Occupation')), 'interest' => array(0, __('Interests')))
);
}
function get_profile_admin_keys() {
global $bbdb;
return apply_filters(
'get_profile_admin_keys',
array($bbdb->prefix . 'title' => array(0, __('Custom Title')))
);
}Do just like parabolart said. You should paste the text inside the () after the array for get_profile_admin_keys and separate it from the other ones with a comma.
I think I need a little help with this one. I'm running 0.9.0.2 now.
Here's the section in functions.php:
function get_profile_info_keys() {
return apply_filters( 'get_profile_info_keys', array(
'user_email' => array(1, __('Email')),
'user_url' => array(0, __('Website')),
'from' => array(0, __('Location')),
'occ' => array(0, __('Occupation')),
'interest' => array(0, __('Interests')),
) );
}
function get_profile_admin_keys() {
global $bbdb;
return apply_filters( 'get_profile_admin_keys', array(
$bbdb->prefix . 'title' => array(0, __('Custom Title'))
) );
}
So if I move that section up to get_profile_info_keys, it should look like this, correct?
function get_profile_info_keys() {
global $bbdb;
return apply_filters( 'get_profile_info_keys', array(
'user_email' => array(1, __('Email')),
'user_url' => array(0, __('Website')),
'from' => array(0, __('Location')),
'occ' => array(0, __('Occupation')),
'interest' => array(0, __('Interests')),
$bbdb->prefix . 'title' => array(0, __('Custom Title')),
) );
}
That pretty much removes everything from get_profile_admin_keys, so do I just take that entire section out?
Thanks for the helping hand...
You must log in to post.