Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 12,401 through 12,425 (of 14,219 total)
  • @robin-w

    Moderator

    yes, just change it !

    you can then do one of two things

    1. just make a note, so that each time I upgrade this plugin, you’ll need to go back and change the code again

    2. rename the plugin in line 4 – say to

    Plugin Name: bbP shortcodes robkk
    

    and then change the directory the plugin sits in to something else

    Worpdress will then tell you that you have a plugin installed but not activated called bbP shortcodes robkk, and that the plugin bbp shortcodes no longer exists, and you can then delete it.

    In reply to: Menu link to Profile

    @robin-w

    Moderator

    great – glad you’re fixed !

    @robin-w

    Moderator

    When I migrated the site to my clients server for testing I was disappointed to find that neither topic creation or reply posting was working.

    when you say not working, exactly what do you mean, the ability to reply doesn’t appear? or it appears but doesn’t work?

    I suggest that you also positively eliminate the theme as a contender and as a test switch to a default theme such as twentytwelve, and see if this fixes.

    @robin-w

    Moderator

    maybe a theme or plugin issue

    Plugins

    Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.

    In reply to: Menu link to Profile

    @robin-w

    Moderator

    @netweb thanks for posting that, thought there would be but couldn’t find it offhand.


    @mathijs-lemmers
    ok so try

    <meta http-equiv="refresh" content="0;URL=http://mysite.com/forums/users/<?php global $current_user;
          get_currentuserinfo();
    
         echo  sanitize_file_name($current_user->user_login). "";
          
    ?>/edit/">
    
    

    @robin-w

    Moderator

    the plugin

    https://wordpress.org/plugins/bbp-private-groups/

    should do that, just set private forum visibility to on, and non registered users will see the forums, but only registered users with that group set will see the topics

    In reply to: Menu link to Profile

    @robin-w

    Moderator

    ok try this, which should tidy most usernames

    <meta http-equiv="refresh" content="0;URL=http://mysite.com/forums/users/
    <?php global $current_user;
          get_currentuserinfo();
    $string = $current_user->user_login ;
         //Lower case everything
        $string = strtolower($string);
        //Make alphanumeric (removes all other characters)
        $string = preg_replace("/[^a-z0-9_\s-]/", "", $string);
        //Clean up multiple dashes or whitespaces
        $string = preg_replace("/[\s-]+/", " ", $string);
        //Convert whitespaces and underscore to dash
        $string = preg_replace("/[\s_]/", "-", $string);
        return $string;
    echo $string . "";      
    ?>/edit/">
    

    @robin-w

    Moderator

    No problem.

    @robin-w

    Moderator

    One I’ve been playing with

    bbp additional shortcodes

    In reply to: User settings missing

    @robin-w

    Moderator

    great – glad you’re fixed !

    In reply to: Full Width Forum Help

    @robin-w

    Moderator

    ok, I’m close to giving up on this – not that I’m not interested in fixing it, but it is just taking too much of my time.

    can you post your full current bbpress.php

    @robin-w

    Moderator

    Great – glad you’re fixed !

    @robin-w

    Moderator

    Hey great – I just took a look and now see what you were trying to do, glad you’re fixed 🙂

    @robin-w

    Moderator

    yes that’ll do it, put the ‘or’ in and it should be fine eg

    <?php 
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user)  || $role == 'bbp_moderator'  ) {
    
     echo " <div class=\"reply-author-role\">";
    	
    	echo bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) );
    	
    	echo "</div>";
    	
             }
            else {
    
    }
    ?>
    
    

    The || is an ‘or’ argument, so the if line says ‘if user is keymaster or (||) moderator’ then…

    The else is not really needed, as I presume you’ll do nothing, as you only want it to display if…

    Come back and let us known that it worked.

    @robin-w

    Moderator

    I would love to help, but simply cannot fathom what you are trying to do.

    I’m not sure if ‘user review category and subforums” is the same as “user review forum + categories’or if these are different, and where they are in nay case
    I can’t see a forum called ‘user reviews’ and no subforums for that
    The link astronomertalk.com/reviews. takes me to a login page
    the link astronomertalk.com/review goes to a 404 page
    and I’m not sure quite what you’re talking about when you say you want to get rid of the forum/main page – do you mean astronomertalk.com

    Can you come back with a more detailed question, with not only a link nut what is either there (and where on the page eg ‘under headingxx’) or not there that you would like

    The answer is probably yes we can, when I know what the can is 🙂

    @robin-w

    Moderator

    wasn’t setting who the user was ! Try

    function role_show () {
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user) ||$role == 'bbp_moderator')  $args['show_role'] = true ;
    else $args['show_role'] = false ;
    return $args ;
    }
    add_filter ('bbp_before_get_reply_author_link_parse_args', 'role_show' ) ;
    

    @robin-w

    Moderator

    ok, i’ll load it on my test site

    @robin-w

    Moderator

    untested but the following bar typos should work – add to your functions file

    function role_show () {
    $role = bbp_get_user_role( $user_id );
    if ( bbp_is_user_keymaster() ||$role == 'bbp_moderator')  $args['show_role'] = true ;
    else $args['show_role'] = false ;
    return $args ;
    }
    
    add_filter ('bbp_before_get_reply_author_link_parse_args', 'role_show' ) ;
    
    In reply to: Full Width Forum Help

    @robin-w

    Moderator

    ok, after the line

    <?php do_atomic( ‘after_main’ ); // oxygen_after_main ?>
    

    add

    <?php get_sidebar( ‘subsidiary’ ); // Loads the sidebar-subsidiary.php template. ?> 
    

    @robin-w

    Moderator

    The addition of the new User Management screen for adding users to groups (instead of having to go to each profile) is handy, though.

    Great, glad you like that !

    @robin-w

    Moderator

    great, glad you are fixed !

    @robin-w

    Moderator

    bbpress sets the post_type =
    array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() );

    so if post type = that, then you know you are in a forum search, so you could add a line in your filter to check if $query->post_type equals array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() ) then just return query?

    @robin-w

    Moderator

    @jo_shi

    Thanks for that, very useful – if 2.6 doesn’t fix, I’ll revisit – I originally wrote the plugin just for bpress, but given a significant number who use buddypress with it, that would be useful if it isn’t going to be made redundant by 2.6.

    @robin-w

    Moderator

    On individual topics and replies, this is not possible without additional coding, and I’m not aware of any.

    The ‘normal’ way would be

    For participants (we are talking bbpress roles here eg participant, moderator, keymaster etc. rather than wordpress roles editor, author etc., as bbpress restricts to bbpress roles )

    then create a forum, set it’s status to private, and put all topics in there

    For author, editor set these people to be moderators under bbpress, and again set a forum up, but this time set it to hidden, and put topics (and replies) in there

    @robin-w

    Moderator

    (for some reason you assign a group to a user instead of a user to a group, which means a user can not belong to more than one group — so, not ideal unless you have mutually exclusive groups).

    That was just the way I happened to write it – but since you can assign forums to multiple groups, I’m not sure what you cannot achieve? Do give feedback, as if I’m missing a trick I ought to think about it ! 🙂

Viewing 25 replies - 12,401 through 12,425 (of 14,219 total)