jomo (@jonathanmoorebcsorg)

Forum Replies Created

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

  • jomo
    Participant

    @jonathanmoorebcsorg

    you may not want to add to the end of the menu, I’ve posted an alternative on:

    How Do I link to Profile Page


    to allow a simple link to forums/users/current/ to be replaced with the current user id or redirect to login

    In reply to: Menu link to Profile

    jomo
    Participant

    @jonathanmoorebcsorg

    I added an alternative simple answer on more recent thread:

    How Do I link to Profile Page


    jomo
    Participant

    @jonathanmoorebcsorg

    after some difficulty I came up with a solution, which allows a standard menu item linking to eg:
    forums/users/current

    If a request is made to http://mysite/forums/users/current, the user name “current” is detected and replaced with the current user id, or, if the user is not logged in, redirect to login screen:

    
    /*
     * attempt to handle generic request for current user
     *
     * if the url is passed as forums/users/current/
     * this function detects that the permalink has been set to bbp_user=current
     * and
     *  - if the user is logged on, the query is changed to the current user
     *  - if the user is not logged on, the user is redirected to login screen
     *
     */
    function ink_bbp_request_current_user( $query_vars ) {
    	if ( isset( $query_vars[ 'bbp_user' ] ) ) {
    		switch ( $query_vars[ 'bbp_user' ] ) {
    			case 'current':
    				if ( get_current_user_id() ) {
    					$query_vars[ 'bbp_user' ] = bbp_get_current_user_name();
    				} else {
    					auth_redirect();
    				}
    		}
    	}
    	return $query_vars;
    }
    
    add_filter( 'bbp_request', 'ink_bbp_request_current_user', 10, 1 );
    

    jomo
    Participant

    @jonathanmoorebcsorg

    @indrekhirsnik Just use the ‘beta’ like everyone else


    jomo
    Participant

    @jonathanmoorebcsorg

    >So users will register, then must activate their account via the email they receive on registration.

    How about allowing the option for users to register and directly use the system, but maybe their posts would require moderation as they would not be perceived as a trusted users (non-spammer) until they have confirmed email address or have approved posts.

    Check out the WooCommerce approach, they’re coming from a different angle and not requiring you to confirm your email before checkout and have a number of options about the account creation.

    Also check out the Super-Socializer approach which has the option to trust users who have registered by logging with Facebook etc – while Facebook trusts them the site does as well.
    Of course you can’t implement social login by installing the plugin, but there are a number of react-native projects out there addressing this type of problem.


    jomo
    Participant

    @jonathanmoorebcsorg

    I hear it’s used on wordpress.org and here…
    I’m using it but on a smaller site and not using the new features and haven’t noticed any problems.
    Note the RC5 package doesn’t include .min version of some files which will be needed if you are not running in debug.


    jomo
    Participant

    @jonathanmoorebcsorg

    Well we’re all waiting for breaking news for bbPress release or rc4 but online timesheets it is not. And seeing as user onlinetimesheets’ system is built on Microsoft ASP.Net 4 it seems unlikely to make much use of bbPress..

    Now, could we get the bbPress on wordpress.org to add the Plugin name (Forum title) to the email alerts? It’s tiring getting all the alerts with no context about which plugin they refer to.

    Something like this should do it:

    
    function add_the_plugin_name_please( $message, $reply_id, $topic_id ){
      $topic_title  = strip_tags( bbp_get_topic_title( $topic_id ) );
      $forum_title = bbp_get_topic_forum_title($topic_id);
    
      $messageheader = sprintf( __( 'New post in Forum "%1$s", Topic "%2$s".', 'wordpress-org' ),
        $forum_title,
        $topic_title
      );
      $messagefooter .= "\r\n" . "\r\n" . __('Thankyou for participating on wordpress.org', 'wordpress-org' );
        
      return $messageheader . "\r\n" . "\r\n" . $message . "\r\n" . $messagefooter;
    }
    add_filter( 'bbp_subscription_mail_message', 'add_the_plugin_name_please', 10, 3);

    jomo
    Participant

    @jonathanmoorebcsorg

    @itsasiak
    did you resolve this?
    please post your solution

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