the1path (@the1path)

Forum Replies Created

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

  • the1path
    Participant

    @the1path

    +1


    the1path
    Participant

    @the1path

    OK so after much searching I have a pretty simple solution. The role manager plugin idea was a no go so had to dig deeper.

    So add this in your functions.php:

    //add author change functionality to bbPress topics in wp-admin
    add_action( 'init', 'my_add_author_to_topics' );
    function my_add_author_to_topics() {
    add_post_type_support( 'topic', 'author' );
    }
    //then allow subscribers to be authors...good for transfering to bbPress forum which uses custom post types
    add_filter('wp_dropdown_users', 'MySwitchUser');
    function MySwitchUser($output)
    {

    //global $post is available here, hence you can check for the post type here
    $users = get_users();

    $output = "<select id="post_author_override" name="post_author_override" class="">";

    //Leave the admin in the list
    $output .= "<option value="1">Admin</option>";
    foreach($users as $user)
    {
    $sel = ($post->post_author == $user->ID)?"selected='selected'":'';
    $output .= '<option value="'.$user->ID.'"'.$sel.'>'.$user->user_login.'</option>';
    }
    $output .= "</select>";

    return $output;
    }

    So this basically allows you to set any user as a post author whether they are a subscriber or not (by default WP only lets you set author roles or above as post authors).

    I think I will just use is temporarily during transfer and then comment it out….I would image it could get annoying if you have loads of subscribers and are just trying to find authors etc.

    I guess this code could be made into a plugin with an on/off switch in the admin for it….any takers? ;)

    Anyway I hope this helps folk in the same boat as me.


    the1path
    Participant

    @the1path

    OK as an update the above code does actually work but I think it is only pulling in the names of admins…it probably pulls in authors too but it doesnt pull in subscribers.

    Im thinking to get it to do this you could use a role management plugin.

    :)


    the1path
    Participant

    @the1path

    I see these in v2.1 but no simple press importer….waaaaaaa


    the1path
    Participant

    @the1path

    Did anyone get this working.

    I think this is hugely useful for transfering…by hand.

    Im vurrently wanting to transfer from simple press and there is no importer, so either have to do it by hand or pay someone to do it for me……I like options.

    Be cool if someone has this working ;)

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