Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'test'

Viewing 25 results - 1,626 through 1,650 (of 11,571 total)
  • Author
    Search Results
  • wpturk
    Participant

    In the latest version 2.6 RC7, If a post goes to status=pending the author directly gets 404 page.

    example.com/forum/?post_type=topic&p=xxxxx is directed to 404 page.

    I use moderation tools plugin and when a user submits a topic, the user sees directly a 404 page due to the problem above.

    This is not related to other plugins or theme.
    My test environment is version: 2.6 RC5 and there it’s working fine. Authors can see their pending posts.

    Ticket #3252

    Let me know, if you know quick fix?

    #198730
    w3215
    Participant

    Hi. What is the expected timing for 2.6?

    I recently installed BBPress and was surprised the latest version for installation was 2.5.14. I also get a notice that the plugin “has not been tested with your current version of WordPress.”

    Performance/speed is important to me, and last I looked into it 2.6 was supposed to be a big improvement.

    Robin W
    Moderator

    it really needs to also update the forum latest activity – I’ll try and look at that as well

    neon67
    Participant

    Thank very much for your concern.
    I’ll report the results as soon as I test it.

    #198666

    In reply to: bbpress Slow

    Robin W
    Moderator

    I can only suggest as a test remove the notification plugin and see if this is making the difference

    #198548
    PDidee
    Participant

    I was wondering if it’s possible to set up master forums with bbPress. We have a client that has a courses site and would like to setup forums for each course. So this page for example: http://mbmembers.staging.wpengine.com/community-forum/ would be one of multiple “master” forums.

    Other items they are looking to implement that may or may not be available through this plugin include:

    • different master forums for different courses on site as mentioned above
    • each master forum has sub-forums, then threads
    • on threads, responses to topic or other responses get nested (saw this as an option and have it enabled but I’m not seeing the replies indented at the moment on the test link above)
    • option for people to receive an email per forum post, or a daily digest per that sub-forum
    • ability to turn email for each sub-forum on/off – or switch to daily digest vs. individual posts
    • exception is Announcements sub-forum – everyone should be automatically subscribed to individual messages email, can change to daily digest, but users CANNOT turn off emails for this sub-forum
    • note: it may be wise to have a spot on the My Account page (a tab?) where users can edit their email preferences for all the forums at once
    • only admins can start new threads in Announcements sub-forum; other forums anyone can start a new thread
    • we are creating a participant directory — the front-end needs to have links to for users to view a participant’s forum posts, or the forum threads they’ve started (currently, these are two separate links)

    Any help or info you can provide would be super appreciated.

    #198356
    hthornhillhww
    Participant

    Hi,

    I have created a custom notification for my site when a post is published, the code used to do this is :-

    // this is to add a fake component to BuddyPress. A registered component is needed to add notifications
    function custom_filter_notifications_get_registered_components( $component_names = array() ) {
        // Force $component_names to be an array
        if ( ! is_array( $component_names ) ) {
            $component_names = array();
        }
        // Add 'custom' component to registered components array
        array_push( $component_names, 'publishpost' );
        // Return component's with 'custom' appended
        return $component_names;
    }
    add_filter( 'bp_notifications_get_registered_components', 'custom_filter_notifications_get_registered_components' );
    
    // this hooks to post creation and saves the post id
    function bp_custom_add_notification( $post_id, $post ) {
            $post = get_post( $post_id );
            $author_id = $post->post_author;
    		
    		$blogusers = get_users( array( 'role' => 'staff' ) );
    		// Array of WP_User objects.
    		foreach ( $blogusers as $user ) {
    			bp_notifications_add_notification( array(
                'user_id'           => $user->id,
                'item_id'           => $post_id,
                'component_name'    => 'publishpost',
                'component_action'  => 'publishpost_action',
                'date_notified'     => bp_core_current_time(),
                'is_new'            => 1,
            ) );   
    		}        
    }
    add_action( 'publish_post', 'bp_custom_add_notification', 99, 2 );
    
    /**
     * Format the BuddyBar/Toolbar notifications
     *
     * @since bbPress (r5155)
     *
     * @package bbPress
     *
     * @param string $action The kind of notification being rendered
     * @param int $item_id The primary item id
     * @param int $secondary_item_id The secondary item id
     * @param int $total_items The total number of messaging-related notifications waiting for the user
     * @param string $format 'string' for BuddyBar-compatible notifications; 'array' for WP Toolbar
     */
    function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) 
    {
    // New custom notifications
        if ( 'publishpost_action' === $action ) {
    
            $post = get_post( $item_id );
    		$author_name = get_the_author_meta('display_name', $post->post_author);
            $custom_title = bp_core_get_user_displayname( $post->post_author ) . ' published a new post "' . get_the_title( $item_id ) . '"';
            $custom_link  = get_permalink( $post );
            $custom_text = bp_core_get_user_displayname( $post->post_author ) . ' published a new post "' . get_the_title( $item_id ) . '"';
            // WordPress Toolbar
            if ( 'string' === $format ) {
                $return = apply_filters( 'publishpost_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link );
            // Deprecated BuddyBar
            } else {
                $return = apply_filters( 'publishpost_filter', array(
                    'text' => $custom_text,
                    'link' => $custom_link
                ), $custom_link, (int) $total_items, $custom_text, $custom_title );
            }
    
            return $return;
    
        } 
    	
    	if ( 'bbp_new_reply' === $action ) {
    		$topic_id    = bbp_get_reply_topic_id( $item_id );
    		$topic_title = bbp_get_topic_title( $topic_id );
    		$topic_link  = wp_nonce_url( add_query_arg( array( 'action' => 'bbp_mark_read', 'topic_id' => $topic_id ), bbp_get_reply_url( $item_id ) ), 'bbp_mark_topic_' . $topic_id );
    		$title_attr  = __( 'Topic Replies', 'bbpress' );
    
    		if ( (int) $total_items > 1 ) {
    			$text   = sprintf( __( 'You have %d new replies', 'bbpress' ), (int) $total_items );
    			$filter = 'bbp_multiple_new_subscription_notification';
    		} else {
    			if ( !empty( $secondary_item_id ) ) {
    				$text = sprintf( __( 'You have %d new reply to %2$s from %3$s', 'bbpress' ), (int) $total_items, $topic_title, bp_core_get_user_displayname( $secondary_item_id ) );
    			} else {
    				$text = sprintf( __( 'You have %d new reply to %s',             'bbpress' ), (int) $total_items, $topic_title );
    			}
    			$filter = 'bbp_single_new_subscription_notification';
    		}
    
    		// WordPress Toolbar
    		if ( 'string' === $format ) {
    			$return = apply_filters( $filter, '<a href="' . esc_url( $topic_link ) . '" title="' . esc_attr( $title_attr ) . '">' . esc_html( $text ) . '</a>', (int) $total_items, $text, $topic_link );
    
    		// Deprecated BuddyBar
    		} else {
    			$return = apply_filters( $filter, array(
    				'text' => $text,
    				'link' => $topic_link
    			), $topic_link, (int) $total_items, $text, $topic_title );
    		}
    
    		do_action( 'bbp_format_buddypress_notifications', $action, $item_id, $secondary_item_id, $total_items );
    
    		return $return;
    	}
    }
    add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 1, 5 );

    How can i create the same for a new bbpress topic? i’m thinking i need to change this code section but not sure how

    // this hooks to post creation and saves the post id
    function bp_custom_add_notification( $post_id, $post ) {
            $post = get_post( $post_id );
            $author_id = $post->post_author;
    		
    		$blogusers = get_users( array( 'role' => 'staff' ) );
    		// Array of WP_User objects.
    		foreach ( $blogusers as $user ) {
    			bp_notifications_add_notification( array(
                'user_id'           => $user->id,
                'item_id'           => $post_id,
                'component_name'    => 'publishpost',
                'component_action'  => 'publishpost_action',
                'date_notified'     => bp_core_current_time(),
                'is_new'            => 1,
            ) );   
    		}        
    }
    add_action( 'publish_post', 'bp_custom_add_notification', 99, 2 );

    I am using woffice as the theme, bbpress version 2.5.14, buddypress version 4.1.0 and the latest version of wordpress

    Thanks

    neon67
    Participant

    I use the post publication schedule.
    All new posts are displayed through the tracker “latest topics” at my main page.
    Ок, the schedule publication, for example, at 14 00, appears at 14 00 in the tracker . But it does not appear at the top, the time-stamp will be lower. For example, at 8: 00, displaying the real creation time for the schedule.

    Is’s solvable?
    May be there are special plugins or life hacks?

    Please advise – how to solve this problem.

    #198316
    hthornhillhww
    Participant

    Hi,

    I have created a custom notification for my site when a post is published, if i have buddypress activated alone i see the notification text but as soon as i activate bbpress i can no longer see the notification description. In order to work out this was happening when bbpress was activated i created a whole new blank install of wpress and only installed the two plugins and when i deactivated bbpress it showed the text.

    this is how the notification shows when bbpress is activated
    https://www.dropbox.com/s/uepps9cjcd8xan5/With%20BbPress%20no%20text.PNG?dl=0

    this is how the notification shows when bbpress is NOT activated
    https://www.dropbox.com/s/03wch6bc27nsked/Without%20BbPress%20showing%20text.PNG?dl=0

    I am using Twenty seventeen as the theme, bbpress version 2.5.14, buddypress version 4.1.0 and the latest version of wordpress

    The code i have used to generate the notification is below, and this is located in \wp-content\plugins\bp-custom.php

    <?php
    // this is to add a fake component to BuddyPress. A registered component is needed to add notifications
    function custom_filter_notifications_get_registered_components( $component_names = array() ) {
        // Force $component_names to be an array
        if ( ! is_array( $component_names ) ) {
            $component_names = array();
        }
        // Add 'custom' component to registered components array
        array_push( $component_names, 'publishpost' );
        // Return component's with 'custom' appended
        return $component_names;
    }
    add_filter( 'bp_notifications_get_registered_components', 'custom_filter_notifications_get_registered_components' );
    
    // this hooks to post creation and saves the post id
    function bp_custom_add_notification( $post_id, $post ) {
            $post = get_post( $post_id );
            $author_id = $post->post_author;
            bp_notifications_add_notification( array(
                'user_id'           => $author_id,
                'item_id'           => $post_id,
                'component_name'    => 'publishpost',
                'component_action'  => 'publishpost_action',
                'date_notified'     => bp_core_current_time(),
                'is_new'            => 1,
            ) );   
    }
    add_action( 'publish_post', 'bp_custom_add_notification', 99, 2 );
    
    function custom_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) 
    {
    // New custom notifications
        if ( 'publishpost_action' === $action ) {
    
            $post = get_post( $item_id );
    
            $custom_title = $post->post_author . ' published a new post ' . get_the_title( $item_id );
            $custom_link  = get_permalink( $post );
            $custom_text = $post->post_author . ' published a new post ' . get_the_title( $item_id );
            // WordPress Toolbar
            if ( 'string' === $format ) {
                $return = apply_filters( 'publishpost_filter', '<a href="' . esc_url( $custom_link ) . '" title="' . esc_attr( $custom_title ) . '">' . esc_html( $custom_text ) . '</a>', $custom_text, $custom_link );
            // Deprecated BuddyBar
            } else {
                $return = apply_filters( 'publishpost_filter', array(
                    'text' => $custom_text,
                    'link' => $custom_link
                ), $custom_link, (int) $total_items, $custom_text, $custom_title );
            }
    
            return $return;
    
        }
    }
    add_filter( 'bp_notifications_get_notifications_for_user', 'custom_format_buddypress_notifications', 10, 5 );

    I need to get it so that when bbpress is activated i can see the custom notification description as we use bbpress for our forums

    #198299
    Robin W
    Moderator

    ok, not something I’ve seen, as can only suggest that you do the basic fault finding process ie

    It could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Then come back

    #198290
    Antipole
    Participant

    I find that in email notifications, the hyphen/dash is being escaped into the character string &#8211 (em-dash) when it occurs in topic titles, forum titles and user display names. I have not tested forum names.

    For a topic with the title as on the following line:
    Hyphen – endash – emdash — nonbr hyphen ‑ figure dash ‒
    all these characters survive except for the first hyphen/minus sign. If this same sequence is included in the body of a topic, it is delivered OK, so this is NOT a WP server or email issue. This does not occur in notifications for a WP post, so I believe it is a bbPress issue.

    I have tested this under WP v5.0.3 and with bbPress v2.5.14 the only active plugin and with the theme Twenty Nineteen.

    #198285
    Robin W
    Moderator

    I suspect it is a conflict.

    It could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Then come back

    Robin W
    Moderator

    buddypress and bbpress just use the wordpress logon.

    It could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Then come back

    #198202

    In reply to: Styling bbPress forum

    ak08820
    Participant

    Actually, it seems to work in another theme I am testing (zerif) but not in Twenty Seventeen at the URL provided.

    #198136
    Robin W
    Moderator

    It could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    Then come back

    #198109
    Radzio125
    Participant

    Hi, I want to display 3 latest topics with new replies for each forum category. In loop-single-forum.php file I created this:

    $count = bbp_get_forum_topic_count();
    $user = bbp_get_topic_author_id( bbp_get_forum_last_topic_id() );
    if ( $count != 0 ) {
    	echo '<a href="'. bbp_get_forum_last_topic_permalink().'"></a>'; // Link to the topic
    	echo'<a href="'. bbp_get_user_profile_url( $user ) .'"><img class="avatar" src="'. bp_core_fetch_avatar ( array( 'item_id' => $user, 'type' => 'full', 'html' => false ) ).'" /></a>'; // Link to the topic author profile with author's avatar
    	echo '<div class="title">'. bbp_get_forum_last_topic_title().'</div>'; // Title of the topic with last activity
    	echo '<div class="activity">Last activity '. bbp_get_forum_last_active_time().'</div>'; // Time of the topic last activity
    } else {
    	echo 'No topics'; // Information if there is no topics
    }

    How to display two more topics (if they exist)?

    Robin W
    Moderator

    @antipole

    you need to specify the number of arguments in the call so..

    function test_reply_call($reply_id, $topic_id, $forum_id, $reply_to){
    	error_log("Trace rest reply: $reply_id: ". strval($reply_id) . "; $topic_id: " . strval($topic_id) . "; $forum_id: " . strval($forum_id) . "; $reply_to: " . strval($reply_to));
    	}
    add_action('bbp_reply_attributes_metabox_save', 'test_reply_call', 10 , 4);

    the ’10’ is the priority – 10 is the standard, the higher the number the higher the priority so the order in which any other links to this hook are run, and the ‘4’ the numbers of arguments you are calling through

    Barry
    Participant

    Hi @antipole,

    Looking back at your original strategy, you only shared a fragment of your code – so it’s hard to be sure of this – but I’m wondering if the problem are the assumptions you are making about the type of $post your callback is receiving.

    https://gist.github.com/barryhughes/30bacb98b716ecaa864f0b6eaa7c051c

    Does a revised approach like the one I shared above work for you? It should give you the author ID (whether that is the author of the reply or the topic) and the forum ID. If you need to, you could add an extra test to confirm the status change reflects publication (vs a topic being set back to draft by an admin).

    Antipole
    Participant

    Stack Trace

    #5 /home/…/public_ in /home/…/public_html/ovni-owners-test-site/wp-content/plugins/ovni-submission-notifications/pending-submission-notifications.php on line 98
    1.
    test_reply_call(9705)
    /home/…/public_html/ovni-owners-test-site/wp-includes/class-wp-hook.php:288
    2.
    WP_Hook->apply_filters(”, Array)
    /home/…/public_html/ovni-owners-test-site/wp-includes/class-wp-hook.php:310
    3.
    WP_Hook->do_action(Array)
    /home/…/public_html/ovni-owners-test-site/wp-includes/plugin.php:453
    4.
    do_action(‘bbp_reply_attri…’, 9705, 9605, 1882, 0)
    /home/…/public_html/ovni-owners-test-site/wp-content/plugins/bbpress/includes/admin/replies.php:315
    5.
    BBP_Replies_Admin->attributes_metabox_save(9705)
    /home/…/public_html/ovni-owners-test-site/wp-includes/class-wp-hook.php:288

    Antipole
    Participant

    @robin-w thanks. I am experimenting with your suggestion. I have

    function test_reply_call($reply_id, $topic_id, $forum_id, $reply_to){
    	error_log("Trace rest reply: $reply_id: ". strval($reply_id) . "; $topic_id: " . strval($topic_id) . "; $forum_id: " . strval($forum_id) . "; $reply_to: " . strval($reply_to));
    	}
    add_action('bbp_reply_attributes_metabox_save', 'test_reply_call');

    This is fired when I post a reply in the backend, but I get

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function test_reply_call(), 1 passed in /home/…/wp-includes/class-wp-hook.php on line 288 and exactly 4 expected in /home/…/wp-content/plugins/ovni-submission-notifications/pending-submission-notifications.php

    The do_action in bbp_reply_attributes_metabox_save does use 4 arguments. What am I doing wrong please?

    #198054
    Robin W
    Moderator

    hmm – can’t really suggest what is going wrong, works on my test site

    #198011
    Robin W
    Moderator

    It could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also 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.

    Then come back

    #198004
    Robin W
    Moderator

    without testing, I suspect this will work

    // filter to show more than 50 topics on a forum
     function bbp_increase_topic_per_page( $args = array() ) {
     $args[‘posts_per_page’] = 100 ;
     return $args;
     }
     add_filter( ‘bbp_before_has_topics_parse_args’, ‘bbp_increase_topic_per_page’ );
    #197987
    Robin W
    Moderator

    It could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also 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.

    Then come back

    #197950
    Robin W
    Moderator

    bbpress is compatible with 5.0.3 and works fine on my test site.

    It may be a conflict with your theme or plugins

    Themes

    As a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Plugins

    If that doesn’t work, also 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.

    Then come back

Viewing 25 results - 1,626 through 1,650 (of 11,571 total)
Skip to toolbar