Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 5,451 through 5,475 (of 13,546 total)

  • Robin W
    Moderator

    @robin-w

    unless I am not understanding you, every other forum I have seen does what bbpress does


    Robin W
    Moderator

    @robin-w

    ok it is showing what I would expect.

    topics are shown only when you go into each forum which is standard bbpress behavior.

    If you would like all the forums listed with titles, then create a WordPress page for your firums and put a list of forums in it as shortcode

    [bbp-single-forum id=$forum_id] – Display a single forums topics. eg. [bbp-single-forum id=32]

    so for instance out this on a page

    [bbp-single-forum id=32]
    [bbp-single-forum id=33]
    [bbp-single-forum id=34]

    .


    Robin W
    Moderator

    @robin-w

    this is theme specific issue, so could be many things.

    you could try

    Step by step guide to setting up a bbPress forum – Part 1

    item 3 method 2, that might force your theme to use a page name


    Robin W
    Moderator

    @robin-w

    Great – glad you are fixed

    In reply to: sub topics not showing

    Robin W
    Moderator

    @robin-w

    and this one tends to suggest that your theme or anther plugin is doing stuff with the replies side of bbpress

    //Lead Topic Enable
    function custom_bbp_show_lead_topic( $show_lead ) {
      $show_lead[] = 'true';
      return $show_lead;
    } 
    add_filter('bbp_show_lead_topic', 'custom_bbp_show_lead_topic' );
    In reply to: sub topics not showing

    Robin W
    Moderator

    @robin-w

    looked in pastebin.

    I’m not sure what this function is there for, except possibly to speed up site display if they have not accessed the forum part ?

    function dequeue_bbpress_style() {
        if ( class_exists('bbPress') ) {
          if ( ! is_bbpress() ) {
            wp_dequeue_style('bbp-default');
            wp_dequeue_style( 'bbp_private_replies_style');
            wp_dequeue_script('bbpress-editor');
          }
        }
    }
    add_action( 'wp_enqueue_scripts', 'dequeue_bbpress_style', 99 );

    it does tend to suggest that you have bbp_private_replies enabled ???


    Robin W
    Moderator

    @robin-w

    The best solution is to clone this widget and then amend.

    so put this in your functions.php

    It creates a duplicate login widget, but you’ll find it in dashboard>appearance>widgets called
    (mat) login Widget. You can then add your code to this version

    function register_mat_login_widget() {
        register_widget("MAT_Login_Widget");
    
    }
    
    add_action('widgets_init', 'register_mat_login_widget');
    
    class MAT_Login_Widget extends WP_Widget {
    
    	/**
    	 * MAT Login Widget amended
    	 *
    	 */
    	public function __construct() {
    		$widget_ops = apply_filters( 'mat_login_widget_options', array(
    			'classname'                   => 'mat_widget_login',
    			'description'                 => esc_html__( 'A simple login form with optional links to sign-up and lost password pages.', 'bbpress' ),
    			'customize_selective_refresh' => true
    		) );
    
    		parent::__construct( false, esc_html__( '(mat) Login Widget', 'bbpress' ), $widget_ops );
    	}
    
    	/**
    	 * Register the widget
    	 *
    	 *
    	 */
    	public static function register_widget() {
    		register_widget( 'MAT_Login_Widget' );
    	}
    
    	/**
    	 * Displays the output, the login form
    	 *
    	 * 
    	 * @param array $args Arguments
    	 * @param array $instance Instance
    	 */
    	public function widget( $args = array(), $instance = array() ) {
    
    		// Get widget settings
    		$settings = $this->parse_settings( $instance );
    
    		// Typical WordPress filter
    		$settings['title'] = apply_filters( 'widget_title', $settings['title'], $instance, $this->id_base );
    
    		// mat filters
    		$settings['title']    = apply_filters( 'mat_login_widget_title',    $settings['title'],    $instance, $this->id_base );
    		$settings['register'] = apply_filters( 'mat_login_widget_register', $settings['register'], $instance, $this->id_base );
    		$settings['lostpass'] = apply_filters( 'mat_login_widget_lostpass', $settings['lostpass'], $instance, $this->id_base );
    
    		echo $args['before_widget'];
    
    		if ( ! empty( $settings['title'] ) ) {
    			echo $args['before_title'] . $settings['title'] . $args['after_title'];
    		}
    
    		if ( ! is_user_logged_in() ) : ?>
    
    			<form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
    				<fieldset class="bbp-form">
    					<legend><?php esc_html_e( 'Log In', 'bbpress' ); ?></legend>
    
    					<div class="bbp-username">
    						<label for="user_login"><?php esc_html_e( 'Username', 'bbpress' ); ?>: </label>
    						<input type="text" name="log" value="<?php bbp_sanitize_val( 'user_login', 'text' ); ?>" size="20" maxlength="100" id="user_login" autocomplete="off" />
    					</div>
    
    					<div class="bbp-password">
    						<label for="user_pass"><?php esc_html_e( 'Password', 'bbpress' ); ?>: </label>
    						<input type="password" name="pwd" value="<?php bbp_sanitize_val( 'user_pass', 'password' ); ?>" size="20" id="user_pass" autocomplete="off" />
    					</div>
    
    					<div class="bbp-remember-me">
    						<input type="checkbox" name="rememberme" value="forever" <?php checked( bbp_get_sanitize_val( 'rememberme', 'checkbox' ) ); ?> id="rememberme" />
    						<label for="rememberme"><?php esc_html_e( 'Keep me signed in', 'bbpress' ); ?></label>
    					</div>
    
    					<?php do_action( 'login_form' ); ?>
    
    					<div class="bbp-submit-wrapper">
    
    						<button type="submit" name="user-submit" id="user-submit" class="button submit user-submit"><?php esc_html_e( 'Log In', 'bbpress' ); ?></button>
    
    						<?php bbp_user_login_fields(); ?>
    
    					</div>
    
    					<?php if ( ! empty( $settings['register'] ) || ! empty( $settings['lostpass'] ) ) : ?>
    
    						<div class="bbp-login-links">
    
    							<?php if ( ! empty( $settings['register'] ) ) : ?>
    
    								<a href="<?php echo esc_url( $settings['register'] ); ?>" title="<?php esc_attr_e( 'Register', 'bbpress' ); ?>" class="bbp-register-link"><?php esc_html_e( 'Register', 'bbpress' ); ?></a>
    
    							<?php endif; ?>
    
    							<?php if ( ! empty( $settings['lostpass'] ) ) : ?>
    
    								<a href="<?php echo esc_url( $settings['lostpass'] ); ?>" title="<?php esc_attr_e( 'Lost Password', 'bbpress' ); ?>" class="bbp-lostpass-link"><?php esc_html_e( 'Lost Password', 'bbpress' ); ?></a>
    
    							<?php endif; ?>
    
    						</div>
    
    					<?php endif; ?>
    
    				</fieldset>
    			</form>
    
    		<?php else : ?>
    
    			<div class="bbp-logged-in">
    				<a href="<?php bbp_user_profile_url( bbp_get_current_user_id() ); ?>" class="submit user-submit"><?php echo get_avatar( bbp_get_current_user_id(), '40' ); ?></a>
    				<h4><?php bbp_user_profile_link( bbp_get_current_user_id() ); ?></h4>
    
    				<?php bbp_logout_link(); ?>
    			</div>
    
    		<?php endif;
    
    		echo $args['after_widget'];
    	}
    
    	/**
    	 * Update the login widget options
    	 *
    	 * 
    	 * @param array $new_instance The new instance options
    	 * @param array $old_instance The old instance options
    	 */
    	public function update( $new_instance, $old_instance ) {
    		$instance             = $old_instance;
    		$instance['title']    = strip_tags( $new_instance['title'] );
    		$instance['register'] = esc_url_raw( $new_instance['register'] );
    		$instance['lostpass'] = esc_url_raw( $new_instance['lostpass'] );
    
    		return $instance;
    	}
    
    	/**
    	 * Output the login widget options form
    	 *
    	 * 
    	 * @param $instance Instance
    	 */
    	public function form( $instance = array() ) {
    
    		// Get widget settings
    		$settings = $this->parse_settings( $instance ); ?>
    
    		<p>
    			<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:', 'bbpress' ); ?>
    			<input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $settings['title'] ); ?>" /></label>
    		</p>
    
    		<p>
    			<label for="<?php echo $this->get_field_id( 'register' ); ?>"><?php esc_html_e( 'Register URI:', 'bbpress' ); ?>
    			<input class="widefat" id="<?php echo $this->get_field_id( 'register' ); ?>" name="<?php echo $this->get_field_name( 'register' ); ?>" type="text" value="<?php echo esc_url( $settings['register'] ); ?>" /></label>
    		</p>
    
    		<p>
    			<label for="<?php echo $this->get_field_id( 'lostpass' ); ?>"><?php esc_html_e( 'Lost Password URI:', 'bbpress' ); ?>
    			<input class="widefat" id="<?php echo $this->get_field_id( 'lostpass' ); ?>" name="<?php echo $this->get_field_name( 'lostpass' ); ?>" type="text" value="<?php echo esc_url( $settings['lostpass'] ); ?>" /></label>
    		</p>
    
    		<?php
    	}
    
    	/**
    	 * Merge the widget settings into defaults array.
    	 *
    	 * @since 2.3.0 bbPress (r4802)
    	 *
    	 * @param $instance Instance
    	 */
    	public function parse_settings( $instance = array() ) {
    		return bbp_parse_args( $instance, array(
    			'title'    => '',
    			'register' => '',
    			'lostpass' => ''
    		), 'login_widget_settings' );
    	}
    }

    Robin W
    Moderator

    @robin-w

    great – glad you are fixed

    In reply to: Theme problem

    Robin W
    Moderator

    @robin-w

    looks like it is the same issue as 5 years ago – specific to your site, so there is little I can suggest


    Robin W
    Moderator

    @robin-w

    no, core code does not get changed in child themes

    what did you change?


    Robin W
    Moderator

    @robin-w

    untested, but try this

    add_filter ('bbp_get_user_profile_link' , 'rew_get_user_name', 10 , 2) ;
    
    function rew_get_user_name ($user_link, $user_id ) {
    	// Validate user id
    		$user_id = bbp_get_user_id( $user_id );
    		if ( empty( $user_id ) ) {
    			return false;
    		}
    
    		$user      = get_userdata( $user_id );
    		$user_link = esc_html( $user->display_name ) ;
    
    		// Filter & return
    		return apply_filters( 'rew_get_user_name', $user_link, $user_id );
    }

    Put this in your child theme’s function file – or use

    Code Snippets

    In reply to: Oh no!

    Robin W
    Moderator

    @robin-w

    @casiepa

    you need to change this in your toolkit plugin includes/go-functions.php

    lines 55 & 56

    from

    function bbptoolkit_bbpress_list_forums() {
    	$args = array();

    to

    function bbptoolkit_bbpress_list_forums($args) {

    This brings through default values, otherwise under 2.6 sub forums don’t get shown.


    Robin W
    Moderator

    @robin-w

    sorry, I only have limited time to work out issues, I cannot see

    <title>Archiwum Fora – Jak usunąć ciążę (tabletki poronne, pigułki wczesnoporonne) – 9tygodni.pl</title>

    anywhere on the page you list, so sorry I cannot help further


    Robin W
    Moderator

    @robin-w

    @casiepa thanks for that spot – yes !!

    In reply to: Oh no!

    Robin W
    Moderator

    @robin-w

    ok, no idea why that works !! 🙂

    In reply to: Oh no!

    Robin W
    Moderator

    @robin-w

    not sure I can help further, I don’t have content restrict, so I cannot see what is happening.

    I suspect that even as a paid plugin they don’t offer compatibility with every other plugin, so suspect that they will just say it is a bbpress problem.

    I’d suggest that you try deactivating their plugin and confirming that without it then say style pack solution or function solution works which will tell you that it is a combination.


    Robin W
    Moderator

    @robin-w

    ‘One of my users discovered that they can post potentially malicious HTML into the bbPress reply box.’

    could you user state what ‘potentially malicious HTML’ they were able to post – that would help


    Robin W
    Moderator

    @robin-w

    If you want help then,

    1. state exactly what you issue is. Which part of the site you give a link to, do you consider is the ‘title of the main forum’ – which words in the site ???
    2. don’t start asking for help by complaining about software that people have written for free and support for free.

    In reply to: Oh no!

    Robin W
    Moderator

    @robin-w

    the link just gets you to a login page.

    Issue is likely to be a combination of theme and/or plugins and/or restrict content.

    you don’t say what function you used, what changes you made to feedback-no-topics.php and feedback-no-forums.php or what setting in style pack, so hard to say why those solutions might not be working


    Robin W
    Moderator

    @robin-w

    often the !important is not needed, it all depends on what order css is being loaded !

    In reply to: sub topics not showing

    Robin W
    Moderator

    @robin-w

    @haddly do you have

    function custom_bbp_sub_forum_list($args)

    or as you pasted

    function custom_bbp_sub_forum_list() {

    In reply to: sub topics not showing

    Robin W
    Moderator

    @robin-w

    change that to

    function custom_bbp_sub_forum_list($args) {
    $args['separator'] = '';
    return $args;
    }
    add_filter('bbp_after_list_forums_parse_args', 'custom_bbp_sub_forum_list' );

    and it should be fine


    Robin W
    Moderator

    @robin-w

    glitch in present version for some people – authors are aware

    this helps many

    bbp Refresh Last Active Time


    Robin W
    Moderator

    @robin-w

    should be

    .bbp-login-form {
    	background: white !important;
    	padding: 10px !important;
    }
    In reply to: sub topics not showing

    Robin W
    Moderator

    @robin-w

    ok, as a TEST, can you try deactivating 1 & 2 (I wrote 3 so know it is not the problem!) and see if sub forums reappear ? You can re-enable immediately afterwards

Viewing 25 replies - 5,451 through 5,475 (of 13,546 total)