Skip to:
Content
Pages
Categories
Search
Top
Bottom

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

Viewing 25 results - 1,026 through 1,050 (of 6,788 total)
  • Author
    Search Results
  • #197795
    Olivier
    Participant

    Hi !

    Some texts are missing on the dashboard Widget : any idea ?
    I tried with only bbpress plugin enabled and the default WP theme, same problem.

    It was working when I installed bbpress the first time.
    I already tried the tools provided to repair bbpress.

    Thanks 🙂

    Dashboard widget capture

    #197781
    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 deosnlt 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

    #197754
    shemakeswebsites
    Participant

    Hello everyone. I’m using the following snippet that will display the first name and last initial for users in buddypress. However, in bbpress it has no effect. Any ideas on how I could edit this to get it to work for bbpress? I’m so sad that something like this isn’t a default option.

    $changeLastInitial = new changeLastInitial;
    add_filter('bp_displayed_user_fullname', array(
        $changeLastInitial,
        'last_initial'
    ), 7, 1);
    add_filter('bp_get_member_name', array(
        $changeLastInitial,
        'last_initial'
    ), 7, 1);
    add_filter('bp_get_the_profile_field_value', array(
        $changeLastInitial,
        'last_initial_xprofle'
    ), 7, 3);
    add_filter('bp_core_get_user_displayname', array(
        $changeLastInitial,
        'bp_core_get_user_displayname'
    ), 7, 2);
    
    class changeLastInitial
    {
        function bp_core_get_user_displayname($name, $id)
        {
            $name = $this->last_initial($name);
            return $name;
        }
        function last_initial_xprofle($value, $type, $id)
        {
            if ($id == 1) {
                $value = $this->last_initial($value);
            }
            return $value;
        }
        function last_initial($name)
        {
            $name_a = explode(' ', $name);
            // if there is at least two parts to the name
            if (count($name_a) == 2) {
                // replace the last part of the name with the first letter of the last part
                $name_a[count($name_a) - 1] = substr($name_a[count($name_a) - 1], 0, 1);
                // put it all back together
                $name  = implode(' ', $name_a).".";
            }
            return $name;
        }
    }
    #197723
    Robin W
    Moderator

    ok, let’s try something more basic

    this code just replaces the bbp_get_user_favorites_link, but puts the home url as the permalink

    function rew_get_user_favorites_link( $args = '', $user_id = 0, $wrap = true ) {
    		if ( ! bbp_is_favorites_active() ) {
    			return false;
    		}
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'favorite'  => __( 'Favorite',  'bbpress' ),
    			'favorited' => __( 'Favorited', 'bbpress' ),
    			'user_id'   => 0,
    			'topic_id'  => 0,
    			'before'    => '',
    			'after'     => ''
    		), 'get_user_favorites_link' );
    
    		// Validate user and topic ID's
    		$user_id  = bbp_get_user_id( $r['user_id'], true, true );
    		$topic_id = bbp_get_topic_id( $r['topic_id'] );
    		if ( empty( $user_id ) || empty( $topic_id ) ) {
    			return false;
    		}
    
    		// No link if you can't edit yourself
    		if ( ! current_user_can( 'edit_user', (int) $user_id ) ) {
    			return false;
    		}
    
    		// Decide which link to show
    		$is_fav = bbp_is_user_favorite( $user_id, $topic_id );
    		if ( ! empty( $is_fav ) ) {
    			$text       = $r['favorited'];
    			$query_args = array( 'action' => 'bbp_favorite_remove', 'topic_id' => $topic_id );
    		} else {
    			$text       = $r['favorite'];
    			$query_args = array( 'action' => 'bbp_favorite_add',    'topic_id' => $topic_id );
    		}
    
    		$permalink = home_url() ;
    
    		$url  = esc_url( wp_nonce_url( add_query_arg( $query_args, $permalink ), 'toggle-favorite_' . $topic_id ) );
    		$sub  = $is_fav ? ' class="is-favorite"' : '';
    		$html = sprintf( '%s<span id="favorite-%d"  %s><a href="%s" class="favorite-toggle" data-topic="%d">%s</a></span>%s', $r['before'], $topic_id, $sub, $url, $topic_id, $text, $r['after'] );
    
    		// Initial output is wrapped in a span, ajax output is hooked to this
    		if ( ! empty( $wrap ) ) {
    			$html = '<span id="favorite-toggle">' . $html . '</span>';
    		}
    
    		// Return the link
    		return apply_filters( 'rew_get_user_favorites_link', $html, $r, $user_id, $topic_id );
    	}

    so remove my previous suggestion, and add the above function

    Then where you have

    bbp_user_favorites_link($fav_args); in your code

    replace with

    echo rew_get_user_favorites_link($fav_args);

    #197673

    In reply to: Create new forum error

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

    #197533
    gamersk
    Participant

    Hello,

    I have problem. I have on website bbPress with demo data but when i chose some forum or some subpage it’s blank. https://gamenice.sk/forum/

    functions.php

    <?php
    show_admin_bar(false);
    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);
    function theme_enqueue_scripts() {
    
        $template_directory_uri = get_template_directory_uri();
    
        wp_enqueue_style( 'reset', $template_directory_uri . '/assets/css/reset.min.css', false, '1.0' );
        wp_enqueue_style( 'app', $template_directory_uri . '/assets/css/app.min.css?v=' . time(), array( 'reset' ), '1.0' );
        wp_enqueue_style( 'forum', $template_directory_uri . '/assets/css/forum.min.css?v=' . time(), array( 'app' ), '1.0' );
    
        wp_enqueue_script( 'html5shiv', $template_directory_uri . '/assets/js/html5shiv.min.js' );
        wp_script_add_data( 'html5shiv', 'conditional', 'lt IE 9' );
        wp_enqueue_script( 'selectivizr', $template_directory_uri . '/assets/js/selectivizr.min.js' );
        wp_script_add_data( 'selectivizr', 'conditional', 'lt IE 9' );
    
        wp_enqueue_script( 'jquery', $template_directory_uri . '/assets/js/jquery.min.js', false, '3.3.1' );
        wp_enqueue_script( 'app', $template_directory_uri . '/assets/js/app.js', array( 'jquery' ), '1.0' );
    
        wp_localize_script( 'app', 'carouselSettings', array( 'timeout' => get_option('carousel_timeout').'000' ) );
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_scripts' );
    
    function get_excerpt($where = ''){
        $excerpt = get_the_content();
        $excerpt = strip_shortcodes($excerpt);
        $excerpt = strip_tags($excerpt);
        switch ($where) {
            case 'carousel':
                if ( wp_is_mobile() )
                    $excerpt = substr($excerpt, 0, 120);
                else $excerpt = substr($excerpt, 0, 250);
                break;
            case 'head':
                $excerpt = substr($excerpt, 0, 200);
                break;
            default:
                if ( wp_is_mobile() )
                    $excerpt = substr($excerpt, 0, 300);
                else $excerpt = substr($excerpt, 0, 725);
                break;
        }
        $excerpt = substr($excerpt, 0, strripos($excerpt, " "));
        $excerpt = $excerpt.'...';
        return $excerpt;
    }
    
    function get_thumbnail_url() {
        $thumbnail = get_the_post_thumbnail_url() != '' ? get_the_post_thumbnail_url() : get_template_directory_uri() . '/assets/img/og-image.png';
        return $thumbnail;
    }
    
    function themename_custom_logo_setup() {
        $defaults = array(
            'height'      => 111,
            'width'       => 220,
            'flex-height' => true,
            'flex-width'  => true,
        );
        add_theme_support( 'custom-logo', $defaults );
    }
    add_action( 'after_setup_theme', 'themename_custom_logo_setup' );
    add_theme_support( 'post-thumbnails' );
    function register_my_menus() {
      register_nav_menus(
        array(
          'header-menu' => __( 'Header Menu' ),
          'footer-menu' => __( 'Footer Menu' )
        )
      );
    }
    add_action( 'init', 'register_my_menus' );
    function show_menu($menu_name) {
        $defaults = array(
            'theme_location'  => '',
            'menu'            => $menu_name,
            'container'       => '',
            'container_class' => '',
            'container_id'    => '',
            'menu_class'      => $menu_name,
            'menu_id'         => '',
            'echo'            => true,
            'fallback_cb'     => 'wp_page_menu',
            'before'          => '',
            'after'           => '',
            'link_before'     => '',
            'link_after'      => '',
            'items_wrap'      => '<ul class="inline-list %2$s">%3$s</ul>',
            'depth'           => 0,
            'walker'          => ''
        );
        wp_nav_menu($defaults);
    }
    
    include 'inc/theme-settings.php';

    forum.php

    <?php include 'header.php'; ?>
    
    <section class="forum-wrapper">
        <div class="container">
            <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    
                <?php the_content(); ?>
    
            <?php endwhile; endif; ?>
        </div>
    </section>
    
    <?php include 'footer.php'; ?>
    
    #197495
    odevbul
    Participant

    bbpress/templates/default/bbpress/pagination-replies.php line:15

    div class="bbp-pagination" temprop="interactionStatistic" itemscope itemtype="http://schema.org/InteractionCounter">
    	<link itemprop="interactionType" href="http://schema.org/CommentAction" />
    	<div class="bbp-pagination-count" itemprop="userInteractionCount">

    bbpress/templates/default/bbpress/loop-single-reply.php line:42

    <span itemprop="author" itemscope itemtype="http://schema.org/Person">
    	<span itemprop="name"><?php do_action( 'bbp_theme_before_reply_author_details' ); ?>

    your template page.php edit

    <article itemid="<?php the_permalink(); ?>" itemscope itemtype="http://schema.org/DiscussionForumPosting" id="post-<?php the_ID(); ?>" <?php post_class( 'clearfix' ); ?>>
    								<h1 class="post-title" itemprop="headline"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    #197397
    Robin W
    Moderator

    ok, I think you will need to do some more testing

    so it could be a theme or plugin issue

    Plugins

    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.

    Themes

    If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentyfifteen, and see if this fixes.

    Then come back

    #197379
    simjohna
    Participant

    As far as I know, the default fonts in OWA can be manually configured:

    All options>settings>mail>message format>choose message font.

    And we can choose various fonts as we like.
    Thank You

    #197106

    In reply to: Trackbacks

    cdwed
    Participant

    I dont get it. I copied your code exactly as below. Is there an AND symbol getting in there in the copy function?

    // Force ping_status on bbPress post types
    add_filter( ‘pings_open’, ‘rew_force_ping_status’ );

    function rew_force_ping_status( $open, $post_id = 0 ) {

    // Get the post type of the post ID
    $post_type = get_post_type( $post_id );
    // Default return value is what is passed in $open
    $retval = $open;
    // Only force for bbPress post types
    switch ( $post_type ) {
    case bbp_get_forum_post_type() :
    case bbp_get_topic_post_type() :
    case bbp_get_reply_post_type() :
    $retval = false;
    break;
    // Allow override of the override
    return apply_filters( ‘rew_force_ping_status’, $retval, $open, $post_id, $post_type );
    }

    #197103

    In reply to: Trackbacks

    cdwed
    Participant

    I put in the code and got a syntax error. I loaded it in just as you wrote it. So it will not run.

    Can you check on this please?
    Here is what you posted:

    // Force ping_status on bbPress post types 
    add_filter( 'pings_open', 'rew_force_ping_status' ); 
    
    function rew_force_ping_status( $open, $post_id = 0 ) { 
    
    <strong>// Get the post type of the post ID 
    $post_type = get_post_type( $post_id ); 
    // Default return value is what is passed in $open 
    $retval = $open; 
    // Only force for bbPress post types 
    switch ( $post_type ) { 
    case bbp_get_forum_post_type() : 
    case bbp_get_topic_post_type() : 
    case bbp_get_reply_post_type() : 
    	$retval = false; 
    break; 
    // Allow override of the override 
    return apply_filters( 'rew_force_ping_status', $retval, $open, $post_id, $post_type ); 
    } </strong>
    #197060
    Robin W
    Moderator

    I cannot replicate that on my test site, and from its positioning I suspect it is theme related rather than bbpress as it seems to be within after an <article> div that bbpress doesn’t use, and I cannot find ‘comments-area’ anywhere in the bbpress plugin.

    If you want to prove that, switch to a default theme and check that it disappears.

    #196895
    seanrowe
    Participant

    So I work as a web developer using wordpress, however I do not use bbPress on any of my sites currently. However I am a member of a forum that I really enjoy, however it severely lacks some elements of responsive design for mobile phones. I cannot say for sure it’s something directly related to bbPress, however being that bbPress is such a large platform I have to assume there is a solution.

    The problem:

    The problem is related to multiple quotes inside of a post. When a person quotes a reply that was also quoting a previous reply we get multple “quote” section before the new content. The result on a mobile phone is that the quotes get squished into single character per line so it looks

    l
    i
    k
    e

    t
    h
    i
    s

    Is there a solution to making the previous quotes either hidden in a spoiler tag by default or simply show only the 1 quote per post on mobile?

    Here is a screenshot of what I’m talking about: https://drive.google.com/open?id=1DbJjmuCinBhP1yhprZXcNC_ZMz4gj-cT

    P.S. I am not a developer on this website, but I thought I’d present a solution to the owner to help him out 🙂

    P.P.S. I noticed he uses elementor as well, so not sure if that has any relation.

    #196829
    Robin W
    Moderator

    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

    find
    wp-content/plugins/bbpress/templates/default/bbpress/form-user-register.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/form-user-register.php
    bbPress will now use this template instead of the original
    and you can amend this file.

    #196764

    In reply to: phpBB import (again)

    Gregg
    Participant

    Resolved!

    Grab a cup of coffee and a seat and I’ll tell you the story of how you might be able fix this. It may take several hours so be prepared…

    Situation I was in:
    Older version of phpBB 3.1v and wanting to port all topics, replies, and users to bbPress (latest version at the time). A handful of issues existed that were causing more trouble than they were worth. Host of the old site is GoDaddy. The new site is on WP Engine.

    Forum Stats (approx)
    Users: 2200
    Topics: 7800
    Replies: 22500

    Outcome:
    Successfully ported all topics, replies, and users to bbPress.

    Updated phpBB
    REMOVE ALL MODS, STYLES, anything that’s not a part of the out-of-the-box install. Then follow the upgrade instructions. Make backups (I kept a copy of the existing site on my local machine and duplicate database on the host). I found these instructions most helpful: https://www.phpbb.com/support/docs/en/3.2/ug/upgradeguide/upgrade31/

    The Issues
    There were two issues I ran into (in different flavors but it turns out they just stemmed from these two). 1st – utf8 formatting and 2nd missing fields. These issues are with the import and NOT the upgrade for phpBB. I was able to resolve those issues by making sure I followed the instructions on that link to the letter.

    The first error (I don’t remember the exact error string but it was either utf8mb4 or just utf8 but it simply means the database holds the data in an older format. The solution is to export the date from the database then create a new database and restore the data into it. By creating the new database the fields will use the proper format and when the restoration is complete this issue should be resolved.

    The second error was a little more mysterious – as in I’m not sure why it happened but essentially the import routine is looking for fields that don’t exist in the phpBB install even after I successfully updated it. The solution was to create the fields needed. How?

    How to create the fields to get rid of the missing field errors
    Note I created a copy of the functioning database on my phpBB install so I could screw it up and not hurt the functioning website. So here’s an example.

    The error I got basically said the script couldn’t find “users.user_from” in the database I was trying to import from. That’s not an exact quote but the gist. So I edited the copy of my database and added the missing field (user_from) to the table it was looking for it in (users) using datatype VARCHAR and length of 255 (all else was left to default). I had to do this about a dozen times between the users, topics, and forums tables.

    I should note I imported all of my users as well. I had to try this whole process several times. I’ve spent 40+ hours trying to figure this all out (I’m not that familiar with phpBB or bbPress) but the actual process once I figured out the issues – took about 6 hours – mostly waiting for the script to process the data. If your import bombs – read the error and look carefully at what it’s looking for or doesn’t like. Most likely it’s looking for something that’s not there.

    I was worried that the connections between topics and replies and users would somehow be messed up. But in the end, it looks like it all came out fine. I’m pretty sure I’ll find something amiss – that’s my cynical side but maybe I’ll be pleasantly surprised.

    Good luck!

    #196722

    In reply to: Trackbacks

    Robin W
    Moderator

    I just looked in trac, and fixing this is now a 2.8 goal.

    However this looks like it might help

    // Force ping_status on bbPress post types 
    add_filter( 'pings_open', 'rew_force_ping_status' ); 
    
    function rew_force_ping_status( $open, $post_id = 0 ) { 
    
    // Get the post type of the post ID 
    $post_type = get_post_type( $post_id ); 
    // Default return value is what is passed in $open 
    $retval = $open; 
    // Only force for bbPress post types 
    switch ( $post_type ) { 
    case bbp_get_forum_post_type() : 
    case bbp_get_topic_post_type() : 
    case bbp_get_reply_post_type() : 
    	$retval = false; 
    break; 
    // Allow override of the override 
    return apply_filters( 'rew_force_ping_status', $retval, $open, $post_id, $post_type ); 
    } 
    #196598
    Robin W
    Moderator

    ok, take the change above out.

    Then find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php
    Make a copy of this file to your pc

    The edit this file to be this

    <?php
    
    /**
     * Replies Loop - Single Reply
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    ?>
    <div class='rew-border'>
    <div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header">
    
    	<div class="bbp-meta">
    
    		<span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span>
    
    		<?php if ( bbp_is_single_user_replies() ) : ?>
    
    			<span class="bbp-header">
    				<?php _e( 'in reply to: ', 'bbpress' ); ?>
    				<a class="bbp-topic-permalink" href="<?php bbp_topic_permalink( bbp_get_reply_topic_id() ); ?>"><?php bbp_topic_title( bbp_get_reply_topic_id() ); ?></a>
    			</span>
    
    		<?php endif; ?>
    
    		<a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id(); ?></a>
    
    		<?php do_action( 'bbp_theme_before_reply_admin_links' ); ?>
    
    		<?php bbp_reply_admin_links(); ?>
    
    		<?php do_action( 'bbp_theme_after_reply_admin_links' ); ?>
    
    	</div><!-- .bbp-meta -->
    
    </div><!-- #post-<?php bbp_reply_id(); ?> -->
    
    <div <?php bbp_reply_class(); ?>>
    
    	<div class="bbp-reply-author">
    
    		<?php do_action( 'bbp_theme_before_reply_author_details' ); ?>
    
    		<?php bbp_reply_author_link( array( 'sep' => '<br />', 'show_role' => true ) ); ?>
    
    		<?php if ( bbp_is_user_keymaster() ) : ?>
    
    			<?php do_action( 'bbp_theme_before_reply_author_admin_details' ); ?>
    
    			<div class="bbp-reply-ip"><?php bbp_author_ip( bbp_get_reply_id() ); ?></div>
    
    			<?php do_action( 'bbp_theme_after_reply_author_admin_details' ); ?>
    
    		<?php endif; ?>
    
    		<?php do_action( 'bbp_theme_after_reply_author_details' ); ?>
    
    	</div><!-- .bbp-reply-author -->
    
    	<div class="bbp-reply-content">
    
    		<?php do_action( 'bbp_theme_before_reply_content' ); ?>
    
    		<?php bbp_reply_content(); ?>
    
    		<?php do_action( 'bbp_theme_after_reply_content' ); ?>
    
    	</div><!-- .bbp-reply-content -->
    
    </div><!-- .reply -->
    </div>
    
    <div class='rew-spacer'><p/> </div>

    Then put this in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-single-reply.php

    Finally in your theme’s custom css area put

    
    #bbpress-forums ul.bbp-replies {
    border : none ;
    }		
    
    .rew-border {
    border: 1px solid #eee;
    }		
    #196588
    Robin W
    Moderator

    ok,

    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

    find
    wp-content/plugins/bbpress/templates/default/bbpress/loop-replies.php
    Make a copy of this file to your pc

    The edit this file to add this line after line 50

    <div class='rew-spacer'> <p/> </div>

    so you end up with

    <?php bbp_get_template_part( 'loop', 'single-reply' ); ?>
    
    <div class='rew-spacer'> <p/> </div>

    Then put this in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/loop-replies.php

    You may need to do some styling to get it how you want it, but I would need to see your site to help on that

    #196407
    bennny91
    Participant

    Hello all, recently upgraded to PHP 7.2 on WPengine and our BBpress Forums has decided to throw a HTTP error 500.

    The error message shown in log:

    [Wed Nov 21 2018] [php7:error] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function blockchain_replace_the_title(), 1 passed and exactly 2 expected in /nas/content/live/ep18/wp-content/themes/blockchain/inc/default-hooks.php:60\nStack trace:\n#0 [internal function]: blockchain_replace_the_title(‘Forums’)\n#1 /nas/content/live/ep18/wp-includes/class-wp-hook.php(286): call_user_func_array(‘blockchain_repl…’, Array)\n#2 /nas/content/live/ep18/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘Forums’, Array)\n#3 /nas/content/live/ep18/wp-content/plugins/bbpress/includes/core/theme-compat.php(519): apply_filters(‘the_title’, ‘Forums’)\n#4 [internal function]: bbp_template_include_theme_compat(‘/nas/content/li…’)\n#5 /nas/content/live/ep18/wp-includes/class-wp-hook.php(286): call_user_func_array(‘bbp_template_in…’, Array)\n#6 /nas/content/live/ep18/wp-includes/plugin.php(203): WP_Hook->apply_filters(‘/nas/content/li…’, Array)\n#7 /nas/content/live/ep18/wp-content/plugins/bbpress/includes/core/sub-actions.php(436): apply_filters(‘bbp_temp in /nas/content/live/ep18/wp-content/themes/blockchain/inc/default-hooks.php on line 60, referer: https://ep18.wpengine.com/

    Can anyone help?

    Is BBpress compatible with PHP 7.2?

    Thanks
    Ben

    #196307
    Robin W
    Moderator

    It could be a theme or plugin issue issue, so you’ll need to test to find out which

    Themes

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

    Plugins

    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

    #196287
    Robin W
    Moderator

    lots of ways to do this, you might want to have a think about the best for you

    I have a plugin called

    Private groups

    which lets you set up groups and may be the best solution

    alternately

    if you are able to ftp and edit files the message is held in

    wp-content/plugins/bbpress/templates/default/bbpress/feedback-no-forums.php

    so

    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

    find
    wp-content/plugins/bbpress/templates/default/bbpress/feedback-no-forums.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/themes/%your-theme-name%/bbpress/feedback-no-forums.php
    bbPress will now use this template instead of the original
    and you can amend this

    so go into it and amend the message to what you desire.

    You could instead put this in your functions file or put it in a code plugin such as

    PHP code snippets (Insert PHP)

    function rew_change_text( $translated_text, $text, $domain ) {
    	if ( $text == 'Oh bother! No forums were found here!' ) {
    	$translated_text = 'whatever you want it to say in here!' ;
    	}
    	return $translated_text;
    }
    
    add_filter( 'gettext', 'rew_change_text', 20, 3 );
    
    #196256
    GeekyJules
    Participant

    I’m trying to write a conditional statement to auto tag new topics based on forum.

    This is what I have so far

    add_action ( 'bbp_insert_topic', 'myprefix_assign_tag_to_post' , 10, 1 );
    add_action ( 'bbp_new_topic', 'myprefix_assign_tag_to_post', 10, 1 );
    add_action ( 'bbp_edit_topic', 'myprefix_assign_tag_to_post', 10, 1 );
    
    function myprefix_assign_tag_to_post($topic_id) {
    if( bbp_is_forum ( '168' ) && bbp_current_user_can_publish_topics() ) {
    	wp_set_post_terms( $topic_id, 'introductions', 'topic-tag', true );
    }
    
    elseif( bbp_is_forum ( '1343' ) && bbp_current_user_can_publish_topics() ) {
    		wp_set_post_terms( $topic_id, 'discovery', 'topic-tag', true );
    
    }
    }
    

    The problem is, this automatically tags the new topics with “Introductions” regardless of the forum. I tried replacing ‘bbp_is_forum’ with ‘bbp_is_single_forum’, and the same thing happens. I’ve tried replacing it with ‘bbp_is_forum_archive’ and nothing happens. I’ve even tried replacing the ID with slug, with and without the single quotes, trying it with just one IF statement, and I’m not getting the desired results.

    I also tried using is_page, hoping it would be using the default WordPress call since it used in the functions.php for topics. No joy.

    So, if someone could please tell me what I should be using instead of is_forum, is_single_forum, is_etc, that would be great.

    #196220
    BrianHenryIE
    Participant

    I’ve been working on a converter to import our Invision v4 forum to bbPress. I’ve got the users, forums and topics all importing reasonably well.

    https://github.com/EnhancedAthlete/bbPress-Invision-v4-Converter

    I’m having trouble with the titles which are stored in a language table:

    core_sys_lang_words

    | word_id | ... | word_app | ... | word_key | word_default | word_custom | ...
    | 8379 | ... | forums | ... | forums_forum_2 | Generic Discussion | Generic Discussion | ...

    To retrieve a single forum title, I can use:
    SELECT word_default as forum_name FROM ipbforum.core_sys_lang_words WHERE word_key = CONCAT('forums_forum_', 2)

    or to retrieve them all, something like:

    
    SELECT word_default 
    FROM ipbforum.core_sys_lang_words 
    WHERE word_app = 'forums' 
    	AND word_key IN 
        (SELECT CONCAT(prefix, id)  FROM 
    		(SELECT 'forums_forum_' as prefix, ipbforum.forums_forums.id 
            FROM ipbforum.forums_forums) 
            AS t)
    

    Or all with the forum ids:

    
    SELECT ipbforum.core_sys_lang_words.word_default as forum_name, word_key_table.forum_id as forum_id 
    FROM ipbforum.core_sys_lang_words, 
    	(SELECT CONCAT(prefix, id) AS word_key, 
    					id AS forum_id 
    			FROM 
    				(SELECT 'forums_forum_' AS prefix, 
    								ipbforum.forums_forums.id 
    						FROM ipbforum.forums_forums) 
                            AS temp)
    	AS word_key_table
    WHERE ipbforum.core_sys_lang_words.word_key = word_key_table.word_key
    

    but I’m struggling to figure out how to write that in the BBP_Converter_Base extended class field_map[].

    I’ve looked at some other converters and don’t see anything similarly complicated so I’m assuming there’s a more straightforward way.

    Any pointers appreciated! Once this is figured, the converter should be good enough for most people’s use.

    #196109
    lookingahead
    Participant

    Oh wow — I figured it out, nm!! 🙂

    You can do it via CSS….like this:

    #group-admins {
      pointer-events: none;
      cursor: default;
      text-decoration: none;
      color: black;
    }

    And in bbPress apparently that is the correct way to write that code; the #group-admins part will likely work for everyone, just as it is, because it appears to be the default name for that.

    Whew!

    lookingahead
    Participant

    @robin-w oh, i used a string modifier to change ‘forum’ to ‘discussion’ — that is how i got the tabs in buddypress groups to say ‘discussion’ versus ‘forum’

    i’ll go back and modify it to say ‘chat’ later, but for now many things in the site that used to say ‘forum’ say ‘discussion’….because i can change that at-will and it’s not causing conflicts, i’ve not updated it yet to say ‘chat.’

    the problem that is currently unmovable though is the group forum slug name; it still says ‘forum’ at the end of all buddypress groups. that was unaffected by the string modifier, and is apparently hard-coded.

    i went to the wp_options table and it does currently say ‘chat’…..sooooo…….apparently that setting is not being used in buddypress when it creates group forum slugs. it is defaulting to ‘forum’ no matter what i do.

    is there another place within bbpress where the instructions on how to create a slug for any type of forum whatsoever is listed…even ‘hard-coded’ as a default setting?

Viewing 25 results - 1,026 through 1,050 (of 6,788 total)
Skip to toolbar