Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for '+.+default+.+'

Viewing 25 results - 801 through 825 (of 6,774 total)
  • Author
    Search Results
  • #208435

    In reply to: sub topics not showing

    haddly
    Participant

    I have it dequeued in my functions.php file:
    wp_dequeue_style( 'bbp-default' );

    #208427

    In reply to: sub topics not showing

    Robin W
    Moderator

    @hydrogriff – ok, not sure that I ma goung to be able to help much further.
    I can only suggest 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

    #208405

    In reply to: sub topics not showing

    Robin W
    Moderator

    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 ???

    #208404
    Robin W
    Moderator

    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' );
    	}
    }
    #208385

    In reply to: Theme problem

    chetan0412
    Participant

    getting lots of 404 erros.

    plugins/bbpress/templates/default/js/user.js?ver=5.3.2

    can i have the solution ?

    #208373

    In reply to: Oh no!

    Robin W
    Moderator

    @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.

    #208293
    pointydrip
    Participant

    When I try to access mysite.com/forums it does not work with my theme so I copied archive-forum.php to my child theme.

    The default archive-forum.php template allows the bbpress content to appear, but not the theme header, so I stripped away the bbpress header items and replaced ‘archive-forum’ with ‘page’ like so:

    <?php
    get_header(); ?>
        <div id="forum-front" class="bbp-forum-front">
            <div class="entry-content">
                <?php bbp_get_template_part( 'content', 'page' ); ?>
            </div>
        </div><!-- #forum-front -->
        <?php do_action( 'bbp_after_main_content' ); ?>
    <?php get_sidebar(); ?>
    <?php
    get_footer();

    This makes the theme header work, but now the bbpress content is broken.
    I am getting the following error:
    Warning: count(): Parameter must be an array or an object that implements Countable in public_html/wp-includes/post-template.php on line 316

    The line in question is:

    if ( $elements['page'] > count( $elements['pages'] ) ) { // if the requested page doesn't exist
    		$elements['page'] = count( $elements['pages'] ); // give them the highest numbered page that DOES exist
    	}

    From what I understand /forums is not a page that ‘exists’, but I’ not comfortable modifying WP core. Any help would be appreciated…

    Robin W
    Moderator

    template are designed to be alterable and added to your theme

    so

    find
    wp-content/plugins/bbpress/templates/default/bbpress/user-profile.php

    transfer this to your pc and edit whatever you want

    and save

    create a directory on your theme called ‘bbpress’
    ie wp-content/themes/%your-theme-name%/bbpress

    where %your-theme-name% is the name of your theme

    Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/user-profile.php

    bbPress will now use this template instead of the original

    #208181
    solomani
    Participant

    Hi all,

    Looking for a way to stop spam user regestrations. By default the users are “spectators” so the spam users cant do anything but is there a way to stop them outright?

    I enabled reCAPTCHA for bbPress but, unless I am doing something wrong, it doesn’t seem to stop the regestrations (in fact not sure its working).

    Thanks.

    #208178
    moyles
    Participant

    Hi folks. I am trying to add the shortcode for a single forum [bbp-single-forum id=$id ]

    However I cannot find the ‘forum id’ anywhere.

    The bbpress install is new and I have only created one test forum. Nowhere is the ‘test forum id’ listed. I can only see a field for ‘order’ which is by default ‘0’. So I tried the forum id as 0 but nothing appears on the page, I have also tried the id as 1 as it is the only forum created.
    Please note that the shortcode for showing ‘all forums’ work as expected on the page.

    Any thoughts?
    Thank you.

    #208103
    nickds
    Participant

    Hi Robin, fully understand. Thanks for your reply.
    The issue appears on default wordpress theme and the same appears on Divi theme. I already discuss with the support from Divi and they´v replied, that it has something to do with plugin itself.

    #208067
    Robin W
    Moderator

    suggest if you haven’t updated or changed software that you contact your host provider

    otherwise

    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

    #208016
    telium
    Participant

    I’m new to WordPress and bbPress, so I apologize if my terminology isn’t quite right 🙂

    I have create a pretty page and inserted the BB shortcode which shows all the forums. However, when I open one of the forums, or one of the topics, I find each opening in a fairly generic page.

    Is it possible to create nice pages for these, and tell bbPress to open the forum/topic in the page I created? (I don’t like the default page).

    #207990
    neon67
    Participant

    the same situation occurred after upgrading to 2.6. Increasing the number of spam links helped.
    Pay attention to posts with quotes – there is at least 1 link to the source and there may be more links-the picture is also considered as a link!

    by default, 2 links are not enough.

    #207984
    Robin W
    Moderator

    those words are not from bbpress.

    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

    #207913
    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

    #207869
    samtime
    Participant

    Hi, When a moderator edits a Topic in the WordPress Dashboard, there’s a section near the bottom with the Replies in it. However it also reveals user’s email and IP addresses.

    Forum Replies

    Is there a way to hide the emails and IP’s in this section for moderators?
    I’ve already hidden IP’s on the front end for mods by editing some code related to the loop-single-reply.php (more info here, thank you Robin).

    Or, is there a way to make the Replies box that appears there turned off by default for moderators, under the screen options?
    Screen Options

    Thank you, Sam

    forumhierarchyhangs
    Participant

    All right, I’ll make a post. Usually try everything under the sun to troubleshoot things myself, and I’m usually successful, but this one is giving me fits. I’m importing a phpbb 3.1.9 database into the current release of bbPress. I plugged the MySQL database into my local server (it’s my box, I have full access) and pointed the importer at it. No problems up to that point. It creates users, deletes their default passwords, converts the forums, and then just continually tries the “Calculating forum hierarchy (X of X)” step over and over and over. I’ve tried restarting it, clearing previously-imported data, etc. – no dice.

    I can get at whatever files might be necessary to get this working. This is a cluster of a migration on a few levels, so any assistance would be appreciated immensely. 🙂

    #207761
    Robin W
    Moderator

    just tested it – seems fine.

    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

    #207717
    Robin W
    Moderator

    Beyond free help, but start with

    templates/default/bbpress/loop-forums.php and loop-single-forum.php

    #207715
    Robin W
    Moderator

    probably because it is not a bug in version 6.x!!!

    it will be theme or plugin related

    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.

    #207680

    In reply to: Default image topic

    Danishsard
    Participant

    Hey, I don’t have a child theme

    I can edit any code. The template for my skin is Anima

    Pictures are default which is added in the post.

    #207670
    commium
    Participant

    WP 5.3.2
    Buddypress 5.1.2
    Website https://connect.commium.fr/
    Theme : Woffice wordpress

    Hi guys,

    I’m beginner developper and i have a problem which i’m trying to solve on my website, i created a function to show groups website statistics on their group -> stats tab on group page, the thing work perfectly with an embedded public stats API, but i want to show theses tab on user dashboard too, not only on group -> stats tab, so i tried to copy past the function display() but it didn’t work, the $setting variable and $setting2 variable are NULL..

    Someone can help me on this problem please, you can check the code below for more informations :

    function stats() {
    	
    if ( bp_is_active( 'groups' ) ) :
     
    class Entreprise_Statistiques extends BP_Group_Extension {
        /**
         * Your __construct() method will contain configuration options for 
         * your extension, and will pass them to parent::init()
         */
        function __construct() {
            $args = array(
                'slug' => 'entreprise_statistiques',
                'name' => 'Statistiques',
            );
            parent::init( $args );
        }
     
        /**
         * display() contains the markup that will be displayed on the main 
         * plugin tab
         */
    
    	
    	
        function display( $group_id = NULL ) {
    		$setting = groups_get_groupmeta( $group_id, 'entreprise_statistiques_setting' );
    		$setting2 = groups_get_groupmeta( $group_id, 'entreprise_statistiques_setting2' );
            $group_id = bp_get_group_id();
    		?>
    			
    		<script>
    		StatHatEmbed=new function(){function d(){var a=document.getElementsByTagName("script");return a[a.length-1]}function e(a,b){var d=document.createElement("script"),c="//www.stathat.com/embed/"+a+"/"+b.s1;b.dev&&(c="//localhost:8081/embed/"+a+"/"+b.s1);b.s2&&(c+="/"+b.s2);b.s3&&(c+="/"+b.s3);c+="?w="+b.w+"&h="+b.h+"&tf="+b.tf;b.style&&(c+="&style="+b.style);b.dev&&(c+="&dev=1");b.title&&(c+="&title="+b.title);d.src=c;d.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(d)}function f(a){return[a.s1,
    		a.s2,a.s3,a.w,a.h,a.tf,a.style].join("_")}this.render_graph=function(a){DIV_ID="statd_embed_graph_"+f(a);d().insertAdjacentHTML("AfterEnd","<div id='"+DIV_ID+"' style='display:none'></div>");e("graph",a)};this.render_histogram=function(a){DIV_ID="statd_embed_histogram_"+f(a);d().insertAdjacentHTML("AfterEnd","<div id='"+DIV_ID+"' style='display:none'></div>");e("histogram",a)};this.render_data=function(a){DIV_ID="statd_embed_data_"+f(a);d().insertAdjacentHTML("AfterEnd","<div id='"+DIV_ID+"' style='display:none'></div>");
    		e("data",a)};this.render_table=function(a){DIV_ID="statd_embed_table_"+f(a);d().insertAdjacentHTML("AfterEnd","<div id='"+DIV_ID+"' style='display:none'></div>");e("table",a)};this.render_text=function(a){DIV_ID=["statd_embed_text",a.s1,a.u].join("_");d().insertAdjacentHTML("AfterEnd","<div id='"+DIV_ID+"' style='display:none'></div>");e("text",a)};this.render=function(a){a.tf||(a.tf="week_compare");a.kind||(a.kind="graph");switch(a.kind){case "graph":this.render_graph(a);break;case "histogram":this.render_histogram(a);
    		break;default:this.render_graph(a)}}};
    
    		</script>
    		<div id="stats">
    		<script>StatHatEmbed.render({s1: '<?php echo($setting); ?>', w: 760, h: 235, tf:'month_compare', style:'fill', title:'<?php echo($setting2); ?>'});</script>
    		</div>
    
    		<?php
    		
    		if ($setting == NULL) {
    			echo ("Aucun site internet détecté, merci de contacter l'équipe COMMIUM.");
    		}
        }
     
        /**
         * Création
         */
        function settings_screen( $group_id = NULL ) {
            $setting = groups_get_groupmeta( $group_id, 'entreprise_statistiques_setting' );
    		$setting2 = groups_get_groupmeta( $group_id, 'entreprise_statistiques_setting2' );
     
            ?>
    				<input type="text" name="entreprise_statistiques_setting2" id="entreprise_statistiques_setting2" placeholder="Nom d'entreprise"><?php echo esc_attr( $setting2 ) ?></input>
    				<input type="text" name="entreprise_statistiques_setting" id="entreprise_statistiques_setting"placeholder="Code suivi"><?php echo esc_attr( $setting ) ?></input>
            <?php
    			$settingInfo = $_POST['entreprise_statistiques_setting'];
    			$settingInfo2 = $_POST['entreprise_statistiques_setting2'];
        }
    	function settings_screen_save( $group_id = NULL ) {
    		$setting = '';
    		$setting2 = '';
    
    		if ( isset( $_POST['entreprise_statistiques_setting']) && isset($_POST['entreprise_statistiques_setting2'] ) ) {
    			$setting = $_POST['entreprise_statistiques_setting'];
    			$setting2 = $_POST['entreprise_statistiques_setting2'];
    		}
    
    		groups_update_groupmeta( $group_id, 'entreprise_statistiques_setting', $setting );
    		groups_update_groupmeta( $group_id, 'entreprise_statistiques_setting2', $setting2 );
    		}
    	}
    bp_register_group_extension( 'Entreprise_Statistiques' );
     
    endif; // if ( bp_is_active( 'groups' ) )
    }
    echo stats();
    #207667

    In reply to: bbpress control bar

    Robin W
    Moderator

    ok, so the first bbpress file (there will be another for replies) that we need to filter is :

    incudes/topics/templates.php

    if you open and look at the file on line 2425 you’ll find the function that does the edit topic link.

    Within this is a function that bbpress uses to let us filter parameters (called bbp_parse_args)

    it looks like this

    // Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'id'           => 0,
    			'link_before'  => '',
    			'link_after'   => '',
    			'edit_text'    => esc_html__( 'Edit', 'bbpress' )
    		), 'get_topic_edit_link' );

    you’ll see the word ‘Edit’ is contained in the ‘edit_text’ parameter, so it is this that we need to amend.

    we can use a filter to change what this says, so we don’t need to amend that file- so this code put in your child theme functions file

    add_filter ('bbp_before_get_topic_edit_link_parse_args' , 'my_edit_topic_filter', 10 , 1 ) ;
    
    function my_edit_topic_filter ($args) {
    	$args['edit_text'] = 'this' ;
    
    return $args ;
    
    }

    will change ‘EDIT’ to ‘THIS’

    The parameter is effectively output on line 2455 in

    $retval = $r['link_before'] . '<a href="' . esc_url( $uri ) . '">' . $r['edit_text'] . '</a>' . $r['link_after'];

    so if $r[‘edit_text’] outputs the icon, then you are on the way. If the icon is an image, then using html img etc. in the function above should be good.

    let me know that you make progress with this approach – or come back.

    If you fix that one, I’ll help you work out the rest 🙂

Viewing 25 results - 801 through 825 (of 6,774 total)
Skip to toolbar