krioteh (@krioteh)

Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • In reply to: Custom Topic Statuses?

    @krioteh

    Participant

    I’m forked Buddy-bbPress Support Topic in GitHub, now it works with 2.6.
    True, I do not fully understand what I did 🙂

    In reply to: Custom Topic Statuses?

    @krioteh

    Participant

    By the way, there is also a bbResolutions plugin – it also works with bPress 2.6

    In reply to: Custom Topic Statuses?

    @krioteh

    Participant

    Buddy-bbPress Support The topic still works with bbPress 2.6, albeit with errors.
    You can return the form to the console settings of a specific forum using this code:

    
    add_action('add_meta_boxes', 'bbbp_support'); 
    add_action('save_post', 'bbbp_save'); 
    
    function bbbp_support() {
    	add_meta_box('bbbp_support', 'BbbPress Support', 
    	'bbbp_support_callback', 'forum'); 
    }
    // HTML код блока
    function bbbp_support_callback( $forum = falce ){
    		if ( empty( $forum->ID ) ) {
    			return;
    		}
    
    		$support_feature = bpbbpst_get_forum_support_setting( $forum->ID );
    
    		$mailing_list_style = '';
    		if ( 3 === (int) $support_feature ) {
    			$mailing_list_style = 'style="display:none"';
    		}
    
    		$support_only_style = 'style="display:none"';
    
    		if ( 2 === (int) $support_feature ) {
    			$support_only_style = '';
    		}
    
    		bpbbpst_display_forum_setting_options( $support_feature );
    		?>
    		<div class="bpbbpst-mailing-list" <?php echo $mailing_list_style;?>>
    			<h4><?php _e( 'Who should receive an email notification when a new support topic is posted ?', 'buddy-bbpress-support-topic' );?></h4>
    
    			<?php bpbbpst_checklist_moderators( $forum->ID );?>
    		</div>
    
    		<?php do_action_ref_array( 'bpbbpst_forum_support_options', array( $forum->ID, $mailing_list_style ) ); ?>
    
    		<div class="bpbbpst-support-guides" <?php echo $support_only_style;?>>
    			<h4><?php _e( 'New Topic form extras', 'buddy-bbpress-support-topic' );?></h4>
    			<label class="screen-reader-text" for="support-topic-intro"><?php esc_html_e( 'New Topic Guide', 'buddy-bbpress-support-topic' ); ?></label>
    			<textarea rows="3" cols="40" name="_bpbbpst_support_topic[intro]" id="support-topic-intro" style="width:100%"><?php echo bpbbpst_get_forum_support_topic_intro( $forum->ID );?></textarea>
    			<p class="description"><?php printf( esc_html__( 'Use this field to insert some instructions above the new topic form. Allowed tags are: %s', 'buddy-bbpress-support-topic' ), join( ', ', array_keys( (array) wp_kses_allowed_html( 'forum' ) ) ) ); ?></p>
    
    			<label class="screen-reader-text" for="support-topic-tpl"><?php esc_html_e( 'New Topic Template', 'buddy-bbpress-support-topic' ); ?></label>
    			<textarea rows="3" cols="40" name="_bpbbpst_support_topic[tpl]" id="support-topic-tpl" style="width:100%"><?php echo bpbbpst_get_forum_support_topic_template( $forum->ID );?></textarea>
    			<p class="description"><?php esc_html_e( 'The text added within this field will be used as a template for the content of new topics.', 'buddy-bbpress-support-topic' ); ?></p>
    		</div>
    		<?php
    
    		do_action_ref_array( 'bpbbpst_forum_support_options_after_guides', array( $forum->ID, $support_only_style ) );
    	}
    	function bbbp_save( $forum_id = 0 ) {
    		$support_feature   = false;
    		$is_forum_category =  bbp_is_forum_category( $forum_id );
    
    		if ( ! empty( $_POST['_bpbbpst_forum_settings'] ) ) {
    			$support_feature = absint( $_POST['_bpbbpst_forum_settings'] );
    		}
    
    		// Forum is not a category, save the support metas
    		if ( ! empty( $support_feature ) && ! $is_forum_category ) {
    			update_post_meta( $forum_id, '_bpbbpst_forum_settings', $support_feature );
    
    			if ( 3 === (int) $support_feature ) {
    				delete_post_meta( $forum_id, '_bpbbpst_support_recipients' );
    				delete_post_meta( $forum_id, '_bpbbpst_support_topic_intro' );
    				delete_post_meta( $forum_id, '_bpbbpst_support_topic_tpl' );
    			} else {
    				$recipients = ! empty( $_POST['_bpbbpst_support_recipients'] ) ? array_map( 'intval', $_POST['_bpbbpst_support_recipients'] ) : false ;
    
    				if ( ! empty( $recipients ) && is_array( $recipients ) && count( $recipients ) > 0 ) {
    					update_post_meta( $forum_id, '_bpbbpst_support_recipients', $recipients );
    				} else {
    					delete_post_meta( $forum_id, '_bpbbpst_support_recipients' );
    				}
    
    				if ( 2 === (int) $support_feature ) {
    					if ( ! empty( $_POST['_bpbbpst_support_topic']['intro'] ) ) {
    						update_post_meta( $forum_id, '_bpbbpst_support_topic_intro', wp_unslash( $_POST['_bpbbpst_support_topic']['intro'] ) );
    					} else {
    						delete_post_meta( $forum_id, '_bpbbpst_support_topic_intro' );
    					}
    
    					if ( ! empty( $_POST['_bpbbpst_support_topic']['tpl'] ) ) {
    						update_post_meta( $forum_id, '_bpbbpst_support_topic_tpl', wp_unslash( $_POST['_bpbbpst_support_topic']['tpl'] ) );
    					} else {
    						delete_post_meta( $forum_id, '_bpbbpst_support_topic_tpl' );
    					}
    				} else if ( ! empty( $_POST['_bpbbpst_support_topic'] ) ) {
    					delete_post_meta( $forum_id, '_bpbbpst_support_topic_intro' );
    					delete_post_meta( $forum_id, '_bpbbpst_support_topic_tpl' );
    				}
    			}
    
    			do_action( 'bpbbpst_forum_settings_updated', $forum_id, $support_feature );
    
    		// Check for support metas to eventually remove them
    		} else if ( $is_forum_category ) {
    			$support_feature = get_post_meta( $forum_id, '_bpbbpst_forum_settings', true );
    
    			if ( ! empty( $support_feature ) ) {
    				delete_post_meta( $forum_id, '_bpbbpst_forum_settings' );
    				delete_post_meta( $forum_id, '_bpbbpst_support_recipients' );
    				delete_post_meta( $forum_id, '_bpbbpst_support_topic_intro' );
    				delete_post_meta( $forum_id, '_bpbbpst_support_topic_tpl' );
    			}
    		}
    
    		return $forum_id;
    	}
    

    Unfortunately, I have not yet found a way to eliminate errors when editing themes in the console: (

    @krioteh

    Participant

    Sorry, English is not my native language, I can distort phrases. I’ll try differently:

    After importing a new site in …wp-admin/edit.php?post_type=topic and wp-admin/edit.php?post_type=reply is there anything?
    Perhaps the topic and answer did not receive the correct post_type when importing

    You can try to update the old site.
    You can backup the database (in order to roll back in case of something), then:
    Disable all plugins.
    Update WordPress (if you can not get to the latest version, then you can add intermediate ones – they are available at https://wordpress.org/download/release-archive/)
    After updating WordPress update bbPress.

    P.S.Your links require authentication 🙂

    @krioteh

    Participant

    The structure is the same, you have in one database two sites

    Tables with the prefix wp_ – tables WordPress

    wdsrj_ – this seems to be Joomla? – they do not affect WP in any way

    @krioteh

    Participant

    Are themes and answers displayed in the console?
    Type of record when importing has not changed?

    Perhaps the topics were imported as posts, then this plugin can help: https://wordpress.org/plugins/bbp-move-topics/

    You can also try to put bbPress 2.6RC5, in it there are some additional tools …

    @krioteh

    Participant

    I’m testing version 2.6rc5 – everything works, moderators are added.
    You need to enter: “user1, user2, user3”

    They do not have access to the backend (this is superfluous …).

    All actions with topics and answers (moving, splitting, merging, approval, etc.) are available from the frontend.

    @krioteh

    Participant

    It’s a long way …

    You can also move the topic by clicking the “Edit” link in the topic title.
    When editing the topic, the administrators and moderators are available a drop-down list of forums.

    @krioteh

    Participant

    Perhaps this plug-in is what you need?
    BP Multiple Forum Post

    @krioteh

    Participant

    bbPress на русском (bbPress on Russian)

    Please, if you want to get support in Russian, visit the official Russian support forum.

    Пожалуйста, если вы хотите получить поддержку на русском языке, посетите официальный русскоязычный форум поддержки.

    @krioteh

    Participant
Viewing 11 replies - 1 through 11 (of 11 total)