Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,176 through 5,200 (of 32,505 total)
  • Author
    Search Results
  • #184419
    Robin W
    Moderator

    not a css problem, but a div one

    the content should be contained like this

    <div class="bbp-reply-content">
    <p>dsfgdsfdf</p>
    </div>
    

    but on your site you have

    <div class="bbp-reply-content"> </div>
    </div>
    </li>
    <li></li>
    <p>There is a bill named by congress </p>
    
    etc.

    so you are closing the content div and another div before your post content

    not sure what you are doing – have you amended any templates?

    or is your theme doing this – as a test try another theme to se if it persists

    #184413
    virusek89
    Participant

    Thank you, the code works properly 🙂

    #184399
    Robin W
    Moderator

    ok, try

    enable the root breadcrumb in

    dashboard>settings>bbp style pack>breadcrumbs

    so that you’ve disabled breadcrumb home and breadcrumb current

    Then in custom css have

    
    .bbp-breadcrumb-root::before {
    
    content: "Back to ";
    
    }
    
    .bbp-breadcrumb-forum {
    display : none ;
    }
    #184398
    forums1234
    Participant

    Rats! Almost!

    Unfortunately, this solution returns to a third page created by bbPress that displays the entire forum, which is great but not what I need.

    I need it to return to the previous “page” that I created with the forum shortcode that got them to that particular topic. This way, members could go from host page to topic, back to host page and to second topic, and back to the host page and to a third topic.

    This would open unimaginable opportunities for web designers for creativity. For instance, hosting multiple forums on the same page without any need for navigation.

    #184397
    sharlene_c
    Participant

    I am having this problem also. Not getting email notifications as should be according to https://codex.bbpress.org/features/subscriptions/

    Is there anything else that needs to be checked? so that subscribers are notified of new posts and new comments.

    #184385
    Robin W
    Moderator

    try adding this to your theme’s functions file

    add_filter( 'bbp_redirect_login', 'rew_ignore' );
    
    function rew_ignore ()  {
    	$url = '' ;
    	return $url ;
    }
    #184370
    Robin W
    Moderator

    simplest way is to install my style pack

    https://wordpress.org/plugins/bbp-style-pack/

    navigate to

    dashboard>settings>bbp style pack>breadcrumbs

    disable breadcrumb home, breadcrumb Root, and breadcrumb current

    This just leaves the ‘previous’ showing

    then put this into the custom css tab of my plugin

    .bbp-breadcrumb-forum::before {
    
    content: "Back to ";
    
    }
    

    The breadcrumb will then become ‘back to xx’ with xx being whatever they came from

    #184356
    Robin W
    Moderator

    put this into your custom css

    #bbpress-forums div.bbp-topic-content img, #bbpress-forums div.bbp-reply-content img {
      max-width: 70%;
    }
    
    #184349

    In reply to: Query error

    bjorngus
    Participant

    Ok, i have something that seems to work, try it out if you want to, feel free to give me feedback on it.

    function fix_default_search_string_is_bool($args)
    {
        //bbpress gives FALSE as search string causing no replys to show, this fixes it.
        if ($args['s'] === false) {
            unset($args['s']);
        }
        return $args;
    }
    
    add_filter('bbp_after_has_replies_parse_args', 'fix_default_search_string_is_bool');
    #184348
    guruprasadmulay
    Participant

    Hi Robin, If it is small code change. I would like to work on it and customize it for my site.

    Thanks
    Guru

    #184321
    semperaye
    Participant

    I’ve been searching for a very long time and all I can find is how to hide a sidebar, or make a full width page. I need to keep my sidebars in my forums, but they are causing the forums to be rather small to the point where it’s almost hard to read. I’ve tried this:

    #sidebar-left .widget, #sidebar-right .widget {
    margin: 0 0 1em;
    }

    But I think I might need something else to force the forum wider because the code above did nothing for me.

    #184311
    possip
    Participant

    hey, hope you’re well.

    i could need some help on fixing my filter options in the activity stream for topics and replies. they just don’t filter, i’m still seeing everything

    This is what i found:

    	
    function activity_filter_options() {
    	?>
    
    		<option value="<?php echo $this->topic_create; ?>"><?php esc_html_e( 'Topics',  'bbpress' ); ?></option>
    		<option value="<?php echo $this->reply_create; ?>"><?php esc_html_e( 'Replies', 'bbpress' ); ?></option>
    
    	<?php
    	}
    

    I’m pretty bad at php, but i have a feeling there must be something wrong. 😀 tried changing topic_create to bbp_topic_create, but no. Can you help me? 🙂

    #184308
    ruperty
    Participant

    Hello,
    I am considering bbPress. I would like to migrate posts from an old style mailing list into a modern forum.

    Is there a current way of doing this?

    If not, I may write a Java application for this purpose. Is it practical then to access the bbPress database directly for the Java code in order to insert posts? I’d like to retain the original timestamps. I’d also need to create users, associated with the email addresses of the posters.

    Regards,
    Rupert

    #184289
    Ismail
    Participant

    You can use bbp_get_reply_content filter, but this can be a disaster when you take off all the links that other plugins or the theme could have in the reply content. A good example is the mentions being added by BuddyPress, but after using this, they turn into the restriction notice..

    add_filter('bbp_get_reply_content', 'restricted_links', 20, 2);
    
    function restricted_links($content, $post_id) {
      if ( is_user_logged_in() )
        return $content;
    
      return preg_replace_callback( '/<a(.*?)href(.*?)>(.*?)<\/a>/si', function($m){
        return sprintf(
          '<span class="protected-link" style="background:#f3f3f3;padding: 2px 5px;display:inline-block;border-radius:3px">[Restricted Link] Please <a href="%s">register</a> to view this link</span>',
          home_url('/wp-login.php?action=register')
        );
      }, $content );
    }

    You may pass-in the link text after the notice or something, it is all up to you so play around with the code or ping me if you needed help.

    dominikb
    Participant

    Hi folks,
    i added the following code to a php file in the /mu-plugins/ folder, to deactivate a plugin for logged-in users:

    add_filter( 'option_active_plugins', 'disable_logged_in_plugin' );
     
    function disable_logged_in_plugin( $plugins ) {
    
        require (ABSPATH . WPINC . '/pluggable.php');
        if ( is_user_logged_in() & !is_admin() ) {
            $key = array_search( 'bloom/bloom.php' , $plugins );
            if ( false !== $key ) {
                unset( $plugins[ $key ] );
            } 
        }
        return $plugins;
    }

    Strangely bbPress gets also deactivated by it, while all other plugins run without any problem.

    Do you have an idea why this happens and what to change?

    Regards
    Dominik

    #184286
    Robin W
    Moderator

    Not totally sure what you are trying to achieve as I’ve not used this plugin but in

    wp-content/themes/flex-mag/style.css

    line 3779 has

    #comments {
      display: none;
      float: left;
      font-size: 0.8rem;
      line-height: 120%;
      margin-top: 30px;
      overflow: hidden;
      width: 100%;
    }

    try setting display to visible

    you could do this by adding

    #comments {
      display: visible !important;
      }
    

    to the custom css tag in my style pack plugin that you have loaded

    #184276
    davebevan
    Participant

    I am trying to replace my comments on posts with bbpress topics. This plugin is working for the most part…I’m able to auto create new topics of my published posts on the forum. However, my comment box has disappeared on the posts. There is a comment button to click. But when clicked, there is nothing displayed for posting comments.

    I have found out that this is a theme issue and not a plugin issue. When I change to a different theme, such as a WordPress default theme, the plugin works. However, I do not want to lose my current theme. Does anyone know if there is any css code I can add to my theme in order to make the bbpress comment box to appear on the WordPress posts.

    Website: http://bamadigest.com
    Thank you!

    Robin W
    Moderator

    looks fine to me – all quite readable, but it is your site so your call!

    play with the following numbers

    so overall you might try

    /* Change margin */
    @media only screen and (max-width: 499px) {
    
    	/* Change the width of the author column */
    	#bbpress-forums div.bbp-forum-author, #bbpress-forums div.bbp-topic-author, #bbpress-forums div.bbp-reply-author {
    		width: 50px;
    	}
    
    	/* position the left hand side of the content column */
    	#bbpress-forums div.bbp-reply-content {
    		margin-left: 70px;
    	}
    
    	/* hide the avatar */
    	a.bbp-author-avatar {
    		display: none;
    	}
    
    }
    #184238
    Robin W
    Moderator

    yes put this in your functions file – untested but should work

    add_filter ('bbp_before_get_search_terms_parse_args', 'pluus_amend_search') ;
    
    function pluus_amend_search ($args) {
    	$args['post_type'] =  bbp_get_topic_post_type() ;
    return $args ;
    }
    #184221
    pluus
    Participant

    Hmph… okay… I’ve noticed that /plugins/bbpress/includes/search/template.php is actually responsible for that feature:

    
    function bbp_has_search_results( $args = '' ) {
    	global $wp_rewrite;
    
    	/** Defaults **************************************************************/
    
    	$default_post_type = array( bbp_get_forum_post_type(), bbp_get_topic_post_type(), bbp_get_reply_post_type() );
    
    	// Default query args
    	$default = array(
    		'post_type'           => $default_post_type,         // Forums, topics, and replies
    		'posts_per_page'      => bbp_get_replies_per_page(), // This many
    		'paged'               => bbp_get_paged(),            // On this page
    		'orderby'             => 'date',                     // Sorted by date
    		'order'               => 'DESC',                     // Most recent first
    		'ignore_sticky_posts' => true,                       // Stickies not supported
    		's'                   => bbp_get_search_terms(),     // This is a search
    	);
    
    

    So, changing ‘post_type’ => $default_post_type to ‘post_type’ => bbp_get_topic_post_type() works. However, it’s not clearly the best practice to modify the plugin directly anyother way to override this?

    #184191
    mrcanoa
    Participant

    Hi bb Team,

    I found a bug, maybe, on bbpress ver.: 2.5.12 if I use action bbp_author_metabox

    I try to add some user info on metabox but if I call this:

    add_action('bbp_author_metabox', array($this, 'bbp_author_details'));
    function bbp_author_details($post_id) {
    	echo "<p>Test</p>";
    }

    in html code I’ve this on start tag:
    `<p>Test</p><!DOCTYPE html>
    <!–[if IE 8]>`

    and on the right place:

    <div id="bbp_author_metabox" class="postbox " >
    <button type="button" class="handlediv button-link" aria-expanded="true"><span class="screen-reader-text">Commuta il pannello: Informazioni autore</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class='hndle'><span>Informazioni autore</span></h2>
    <div class="inside">
    		<p>
    			<strong class="label">ID:</strong>
    			<label class="screen-reader-text" for="bbp_author_id">ID</label>
    			<input type="text" id="bbp_author_id" name="post_author_override" value="xxxxx" data-ajax-url="xxxx" />
    		</p>
    <p>
    		<strong class="label">IP:</strong>
    		<label class="screen-reader-text" for="bbp_author_ip_address">Indirizzo IP</label>
    		<input type="text" id="bbp_author_ip_address" name="bbp_author_ip_address" value="xxxxxx" disabled="disabled" />
    	</p>
    	<p>Test</p></div>
    </div>

    I found that do_action( ‘bbp_author_metabox’, get_the_ID() ) it’s called twice:
    -on author_metabox function (bbpress/includes/admin/topics.php)
    -on bbp_author_metabox function (bbpress/includes/admin/metaboxes.php)
    -on author_metabox function (bbpress/includes/admin/replies.php)

    This cause html error code.

    I think it’s name error on bbpress/includes/admin/topics.php and should be do_action( ‘bbp_author_attributes_metabox’, get_the_ID() );

    Thank you
    David

    felixwaters
    Participant

    You may try https://imgcave.com all image types are accepted. It generates numerous codes to easily link to images.

    #184166
    tweichart
    Participant

    Hey guys,

    I get a 500 error after the latest update:

    
    AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Error: [] operator not supported for strings in /var/www/vhosts/<url>/wp-content/plugins/bbpress/includes/forums/functions.php:1800
    Stack trace:
    #0 /var/www/vhosts/<url>/wp-includes/class-wp-hook.php(298): bbp_pre_get_posts_normalize_forum_visibility(Object(WP_Query))
    #1 /var/www/vhosts/<url>/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
    #2 /var/www/vhosts/<url>/wp-includes/plugin.php(515): WP_Hook->do_action(Array)
    #3 /var/www/vhosts/<url>/wp-includes/class-wp-query.php(1681): do_action_ref_array('pre_get_posts', Array)
    #4 /var/www/vhosts/<url>/wp-includes/class-wp-query.php(3238): WP_Query->get_posts()
    #5 /var/www/vhosts<url>/wp-includes/class-wp.php(617): WP_Query->query(Array)
    #6 /var/www/vhosts/<url>/wp-includes/clas...'
    

    ln 1800 looks like this:

    
    $post_stati = $posts_query->get( 'post_status' );
    
    // Default to public status
    if ( empty( $post_stati ) ) {
        $post_stati[] = bbp_get_public_status_id();
    
    // Split the status string
    } elseif ( is_string( $post_stati ) ) {
        $post_stati = explode( ',', $post_stati );
    }
    

    could be fixed by forcing the array:

    
    $post_stati = $posts_query->get( 'post_status' );
    if (!is_array($post_stati)){
        $post_stati = array($post_stati);
    }
    
    // Default to public status
    if ( empty( $post_stati ) ) {
        $post_stati[] = bbp_get_public_status_id();
    
    // Split the status string
    } elseif ( is_string( $post_stati ) ) {
        $post_stati = explode( ',', $post_stati );
    }
    

    side note: wp version 4.7.4, bbpress version 2.5.12

    Thanks in advance,
    Toby

    #184165
    Chad R. Schulz
    Participant

    When I say single forum/topic/reply slug I actually meant for the single post-type slugs of forum/topic/reply. As the /forums/ slug is just a wrapper for all those bbPress custom post-types. So you could effectively remove the /forums/ wrapper and end up with just http://wwww.somesite.com/forum/name-of-specific-forum/. If you rename the single /forum/ slug to /forums/ it would become http://wwww.somesite.com/forums/name-of-specific-forum/ or something similar with topics like http://wwww.somesite.com/topics/name-of-specific-topic/

    And adding the topic slug after the forum slug is not intuitive as the topics don’t actually exist inside the forums, they are simply linked to it–similar to a shortcut. This is something that can be done with breadcrumbs, however.

    Again, permalinks can be rather tricky. In fact I’m fairly certain they’re the reason the “Private” forums are leading not-logged in visitors to a 404 page. I’d try putting everything back to the default settings and seeing if that fixes the error. Also, look at any customizing, plugins you might have that could interfere with bbPress defaults.

    BTW, bbPress has a default error message for not-authorized users and “private” forums that should display. Again, something must be off in the settings/configuration.

    My forum has no “private” forums, so I have little experience with this particular issue. Sorry.

    Best of luck,
    Chad

    #184160
    Young Prodigy
    Participant

    Hi @chadschulz

    When I’m not logged in, the forum link goes to an error page. I’ve set forum visibility to “Private” because I only want course members for a specific online course I host on my site to have access to the forum. So the “private” issue doesn’t show up when not logged in because nothing shows up.

    Here, take a look: https://satdecoded.com/forums/forum/support-clinic/
    It leads to an error page (which I don’t know why it does) when not logged in. Any way to NOT make it lead to error page, but a custom page that just says you must be a course member to see the private forum?

    I’m confused what you mean by renaming the slug for the single forum/topic/reply. I see the settings for single forum, but what I’d really like is this:

    http://www.somesite.com/forums/name-of-specific-forum/some-topic/

    I plan to have different forums for different online classes. Thanks!

Viewing 25 results - 5,176 through 5,200 (of 32,505 total)
Skip to toolbar