Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,301 through 5,325 (of 32,518 total)
  • Author
    Search Results
  • #183382
    paperprofit
    Participant

    That worked. Tesseract does have an area for “customizing additional CSS” and that is where I put the code you entered.

    Incidentally, is there a good plugin to customize my bbPress look and feel?

    Thank you very much.

    #183381
    Robin W
    Moderator

    ok, I think your theme is doing this

    this should fix

    .reply {
      margin-left: 0 !important;
    }

    If your theme has a custom css area, then out this in there

    #183375
    Pascal Casier
    Moderator

    Hi @myrax

    Should be something like this:

    #bbpress-forums fieldset.bbp-form legend {
        background-color: #121212;
        color: #DDDDDD;
    }
    #183370
    nesiditsa
    Participant

    Hi, dayan89! You should do corrections in core code of bbpress – https://bbpress.trac.wordpress.org/changeset/5338. After that it needs to run “Recalculate the position of each reply” repair tool (Пересчитать положение каждого ответа – in Russian).

    #183367
    @mercime
    Moderator

    First pass at diagramming bbPress Theme Compat. Have not included info at https://codex.bbpress.org/themes/theme-compatibility/template-hierarchy-in-detail/ – haven’t read the source code for it nor played with those yet.

    SVG embedded in HTML – use Ctrl/Cmd + to zoom in and Ctrl/Cmd - to zoom out. Right click + drag right/left as needed after zooming in.

    The arrows showing template partials pointing to the other partials pointing to the main template file/s could be confusing for many. Possibly, itemizing each main template file in association to the partials would be clearer e.g.

    
    /theme-folder
         |__ archive-forum.php
                  |__ /bbPress folder 
                            |__ content-archive-forum.php
                                       |__ form-search.php
                                       |__ loop-forums.php
                                       |__ feedback-no-forums.php
    
    #183366
    Rixter
    Participant

    Thanks to this thread: https://bbpress.org/forums/topic/how-do-i-change-the-color-of-the-text-and-box/ I was able to change a lot of colors, since the theme of my site is dark background with white letters.

    There is one code I’m still looking for.
    When you reply to a topic, above the large reply field it says ‘Reply to [name of topic].
    This text is still in white and it needs to be black.

    Can anyone provide me with the right code so I can add this to the custom CSS?
    Much appreciated!

    #183363
    fabianno0572
    Participant

    Hi, May I know where can I get Function.php file? I couldn’t find it. And is it necessary to paste the code below into the file?

    function jm_bbp_shortcodes( $content, $reply_id ) {
    return video( $content );
    }
    add_filter(‘bbp_get_reply_content’, ‘jm_bbp_shortcodes’, 10, 2);
    add_filter(‘bbp_get_topic_content’, ‘jm_bbp_shortcodes’, 10, 2);

    This post happened 2 years ago. Is there anything new that I need to do?

    #183360
    jaroslawistok
    Participant

    Since are buddypress and bbpress now cooperating I thing there is more compatibility in their Plugins. When I put a media Link to buddypress wall it shows in player (Video and audio).

    But bbpress only has an option to embed media which maybe even mostly work but on buddypress the media link than appears as code (Video scr = ….and so).

    Why doesn’t bbpress use just mediaelements.js script as core from WP and maybe ads oEmbed instead?

    There is no possible to have similar design in both.

    eather buddypress shows links in Player or bbpres.
    Any Idea?

    Also there is a problem to have this also in comments.

    jetpack makes also codes. It shows it in player but in buddypress stream again (video src=…)

    Is there any solution to have media Links and embedded elements in the same way on buddypress, bbpress and comments?

    Thankfully for any Idea :o)

    #183333
    tananaev
    Participant

    I added functions to “functions.php” in my theme:

    I’m not a PHP developer and I’m not a WordPress expert, so I’m sure it’s far from perfect, but here is my code:

    function custom_bbp_notify_topic_subscribers( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data = false, $reply_author = 0 ) {
    
        // Bail if subscriptions are turned off
        if ( !bbp_is_subscriptions_active() ) {
            return false;
        }
    
        /** Validation ************************************************************/
    
        $reply_id = bbp_get_reply_id( $reply_id );
        $topic_id = bbp_get_topic_id( $topic_id );
        $forum_id = bbp_get_forum_id( $forum_id );
    
        /** Topic *****************************************************************/
    
        // Bail if topic is not published
        if ( !bbp_is_topic_published( $topic_id ) ) {
            return false;
        }
    
        /** Reply *****************************************************************/
    
        // Bail if reply is not published
        if ( !bbp_is_reply_published( $reply_id ) ) {
            return false;
        }
    
        // Poster name
        $reply_author_name = bbp_get_reply_author_display_name( $reply_id );
    
        /** Mail ******************************************************************/
    
        // Remove filters from reply content and topic title to prevent content
        // from being encoded with HTML entities, wrapped in paragraph tags, etc...
        remove_all_filters( 'bbp_get_reply_content' );
        remove_all_filters( 'bbp_get_topic_title'   );
    
        // Strip tags from text and setup mail data
        $topic_title   = strip_tags( bbp_get_topic_title( $topic_id ) );
        $reply_content = strip_tags( bbp_get_reply_content( $reply_id ) );
        $reply_url     = bbp_get_reply_url( $reply_id );
        $blog_name     = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    
        // For plugins to filter messages per reply/topic/user
        $message = sprintf( __( '%1$s wrote:
    
    %2$s
    
    Post Link: %3$s
    
    -----------
    
    You are receiving this email because you subscribed to a forum topic.
    
    Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
    
            $reply_author_name,
            $reply_content,
            $reply_url
        );
    
        $message = apply_filters( 'bbp_subscription_mail_message', $message, $reply_id, $topic_id );
        if ( empty( $message ) ) {
            return;
        }
    
        // For plugins to filter titles per reply/topic/user
        $subject = apply_filters( 'bbp_subscription_mail_title', '[' . $blog_name . '] ' . $topic_title, $reply_id, $topic_id );
        if ( empty( $subject ) ) {
            return;
        }
    
        /** Users *****************************************************************/
    
        // Get the noreply@ address
        $no_reply   = bbp_get_do_not_reply_address();
    
        // Setup "From" email address
        $from_email = apply_filters( 'bbp_subscription_from_email', $no_reply );
    
        // Get topic subscribers and bail if empty
        $user_ids = bbp_get_topic_subscribers( $topic_id, true );
    
        // Dedicated filter to manipulate user ID's to send emails to
        $user_ids = apply_filters( 'bbp_topic_subscription_user_ids', $user_ids );
        if ( empty( $user_ids ) ) {
            return false;
        }
    
        $to_email = apply_filters( 'bbp_subscription_to_email', $no_reply );
    
        do_action( 'bbp_pre_notify_subscribers', $reply_id, $topic_id, $user_ids );
    
        for ( $i = 0; $i <= count($user_ids); $i++ ) {
            if ( $i % (50 - 1) === 0 || $i === count($user_ids) ) {
                if ( $i !== 0 ) {
                    $headers  = apply_filters( 'bbp_subscription_mail_headers', $headers );
                    wp_mail( $to_email, $subject, $message, $headers );
                }
    
                $headers = array( 'From: ' . get_bloginfo( 'name' ) . ' <' . $from_email . '>' );
            }
    
            if ( $i < count($user_ids) ) {
                // Don't send notifications to the person who made the post
                if ( !empty( $reply_author ) && (int) $user_ids[$i] === (int) $reply_author ) {
                    continue;
                }
    
                // Get email address of subscribed user
                $headers[] = 'Bcc: ' . get_userdata( $user_ids[$i] )->user_email;
            }
        }
    
        do_action( 'bbp_post_notify_subscribers', $reply_id, $topic_id, $user_ids );
    
        return true;
    }
    
    function custom_bbp_notify_forum_subscribers( $topic_id = 0, $forum_id = 0, $anonymous_data = false, $topic_author = 0 ) {
    
        // Bail if subscriptions are turned off
        if ( !bbp_is_subscriptions_active() ) {
            return false;
        }
    
        /** Validation ************************************************************/
    
        $topic_id = bbp_get_topic_id( $topic_id );
        $forum_id = bbp_get_forum_id( $forum_id );
    
        /**
         * Necessary for backwards compatibility
         *
         * @see https://bbpress.trac.wordpress.org/ticket/2620
         */
        $user_id  = 0;
    
        /** Topic *****************************************************************/
    
        // Bail if topic is not published
        if ( ! bbp_is_topic_published( $topic_id ) ) {
            return false;
        }
    
        // Poster name
        $topic_author_name = bbp_get_topic_author_display_name( $topic_id );
    
        /** Mail ******************************************************************/
    
        // Remove filters from reply content and topic title to prevent content
        // from being encoded with HTML entities, wrapped in paragraph tags, etc...
        remove_all_filters( 'bbp_get_topic_content' );
        remove_all_filters( 'bbp_get_topic_title'   );
    
        // Strip tags from text and setup mail data
        $topic_title   = strip_tags( bbp_get_topic_title( $topic_id ) );
        $topic_content = strip_tags( bbp_get_topic_content( $topic_id ) );
        $topic_url     = get_permalink( $topic_id );
        $blog_name     = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
    
        // For plugins to filter messages per reply/topic/user
        $message = sprintf( __( '%1$s wrote:
    
    %2$s
    
    Topic Link: %3$s
    
    -----------
    
    You are receiving this email because you subscribed to a forum.
    
    Login and visit the topic to unsubscribe from these emails.', 'bbpress' ),
    
            $topic_author_name,
            $topic_content,
            $topic_url
        );
    
        $message = apply_filters( 'bbp_forum_subscription_mail_message', $message, $topic_id, $forum_id, $user_id );
        if ( empty( $message ) ) {
            return;
        }
    
        // For plugins to filter titles per reply/topic/user
        $subject = apply_filters( 'bbp_forum_subscription_mail_title', '[' . $blog_name . '] ' . $topic_title, $topic_id, $forum_id, $user_id );
        if ( empty( $subject ) ) {
            return;
        }
    
        /** User ******************************************************************/
    
        // Get the noreply@ address
        $no_reply   = bbp_get_do_not_reply_address();
    
        // Setup "From" email address
        $from_email = apply_filters( 'bbp_subscription_from_email', $no_reply );
    
        // Get topic subscribers and bail if empty
        $user_ids = bbp_get_forum_subscribers( $forum_id, true );
    
        // Dedicated filter to manipulate user ID's to send emails to
        $user_ids = apply_filters( 'bbp_forum_subscription_user_ids', $user_ids );
        if ( empty( $user_ids ) ) {
            return false;
        }
    
        $to_email = apply_filters( 'bbp_subscription_to_email', $no_reply );
    
        do_action( 'bbp_pre_notify_forum_subscribers', $topic_id, $forum_id, $user_ids );
    
        for ( $i = 0; $i <= count($user_ids); $i++ ) {
            if ( $i % (50 - 1) === 0 || $i === count($user_ids) ) {
                if ( $i !== 0 ) {
                    $headers  = apply_filters( 'bbp_subscription_mail_headers', $headers );
                    wp_mail( $to_email, $subject, $message, $headers );
                }
    
                $headers = array( 'From: ' . get_bloginfo( 'name' ) . ' <' . $from_email . '>' );
            }
    
            if ( $i < count($user_ids) ) {
                // Don't send notifications to the person who made the post
                if ( !empty( $topic_author ) && (int) $user_ids[$i] === (int) $topic_author ) {
                    continue;
                }
    
                // Get email address of subscribed user
                $headers[] = 'Bcc: ' . get_userdata( $user_ids[$i] )->user_email;
            }
        }
    
        do_action( 'bbp_post_notify_forum_subscribers', $topic_id, $forum_id, $user_ids );
    
        return true;
    }
    
    function custom_bbp_init () {
    
        remove_action ('bbp_new_reply', 'bbp_notify_topic_subscribers', 11);
        add_action ('bbp_new_reply', 'custom_bbp_notify_topic_subscribers', 11, 5);
    
        remove_action ('bbp_new_topic', 'bbp_notify_forum_subscribers', 11);
        add_action ('bbp_new_topic', 'custom_bbp_notify_forum_subscribers', 11, 4);
    
    }
    
    add_action ('bbp_init', 'custom_bbp_init', 99);
    
    #183326
    Pascal Casier
    Moderator

    Sorry.
    There is no specific function for that. I just wanted to point you to my code so you get the necessary bbp functions that you can call. There is nothing already created for you there, I just wanted to give you some examples about how to handle subscriptions.

    #183320
    haddlyapis
    Participant

    Hey,
    Where would i find the necessary code in your plugin?

    #183318
    Pascal Casier
    Moderator

    With my bbP Toolkit plugin an admin or moderator could force that for a specific user.
    If you want this automated for an existing forum and the existing topics, you would find the necessary code in my plugin.
    But probably you want to somewhere keep a record of the users that clicked this button so that for every new topic, that user also gets subscribed automatically.

    Thinking of it, it might be easier to create an extra capability/role, apply them to users that want to have a ‘subscribe-all’ and then on every new topic creation check that and add the subscriptions…

    Just some ideas, no codes, but I hope it gives you a start.

    #183317

    In reply to: bbp_reply_admin_links

    Robin W
    Moderator

    try

    function hw_get_reply_admin_links($args) {  
    $args['before'] = '<div class="list">' ;
    $args['after'] = '</div>' ;
    return $args ; 
    }  
    
    add_filter('bbp_before_get_reply_admin_links_parse_args','hw_get_reply_admin_links'); 
    haddlyapis
    Participant

    Hi,
    I am looking for a plugin/piece of code that i can apply to the main forum page so that users can subscribe to all topics and sub-topics in one go.
    Can you help?

    #183300

    This is a classic question/problem, that has many-many possible answers.

    Your first resource for improving anything should be what’s available on this codex page:

    Improving Performance

    Everything that’s on that page should be considered, implemented, and tuned. Most of that isn’t specific to bbPress (and is appropriate even just for most WordPress installs) but plugins like bbPress will show huge improvements with adequate caching available.

    * Concurrent users
    * Database slowness
    * Page load times
    * Excessive database queries

    Improving each of those 4 things requires tweaking & tuning specific things for your specific hardware setup. And if you’re on shared hosting, you might not be able to change any of that configuration at all.

    The “concurrent users” problem that BuddyPress & bbPress sites have is actually a good problem to have – it means people are using your site and participating in your community. Server configuration is critical here, as is having adequate hardware that will be ready to serve those requests to your users.

    The reason most WordPress installations don’t have the same problem, is because there are fewer (if any) logged in users interacting with a traditional blog, news, or website without participation. Comments are the only database interaction, and most people disable them these days anyways.

    There are companies (such as WeFoster) whose primary focus is on optimizing their hosting environments for active communities. They’ll offer all of the above and more to help you tune specific things.

    In my experience, it’s easier to identify a specific performance concern, and improve that one thing until you’re happy enough to move onto the next concern.

    #183298

    In reply to: Language

    Roman Matovsky
    Participant

    I use last version. And I downloaded from here https://translate.wordpress.org/projects/wp-plugins/bbpress/stable/ru/default
    But problem is: files shouldn’t be here /wp-content/languages/bbpress/ , files should be here /wp-content/languages/plugins/
    Change instruction please https://codex.bbpress.org/getting-started/bbpress-in-your-language/

    #183297

    In reply to: bbp_reply_admin_links

    Robin W
    Moderator

    untested, but this should work

    function hw_get_reply_admin_links($args) {  
    args['before'] = '<div class="list">' ;
    args['after'] = '</div>' ;
    return $args ; 
    }  
    
    add_filter('bbp_before_get_reply_admin_links_parse_args','hw_get_reply_admin_links'); 
    #183295

    Topic: Query error

    in forum Plugins
    kbaldac
    Participant

    We are running WordPress 4.7.3 with bbpress 2.5.12 at http://one-name.org. This mysql error started appearing last night when accessing any forum, topic or reply. I believe it relates to the ‘AND ((()))’ clause:

    Apr 06, 13:03:46
    WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘))) AND ggx_posts.post_type IN (‘topic’, ‘reply’) AND (ggx_posts.post_status = ‘ at line 1 for query SELECT ggx_posts.* FROM ggx_posts FORCE INDEX (PRIMARY, post_parent) WHERE 1=1 AND (ggx_posts.ID = 29822 OR ggx_posts.post_parent = 29822) AND ((())) AND ggx_posts.post_type IN (‘topic’, ‘reply’) AND (ggx_posts.post_status = ‘publish’ OR ggx_posts.post_status = ‘closed’ OR ggx_posts.post_status = ‘retained’ OR ggx_posts.post_author = 5528 AND ggx_posts.post_status = ‘private’ OR ggx_posts.post_author = 5528 AND ggx_posts.post_status = ‘hidden’) ORDER BY ggx_posts.post_date ASC made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), apply_filters(‘template_include’), WP_Hook->apply_filters, call_user_func_array, bbp_template_include, apply_filters(‘bbp_template_include’), WP_Hook->apply_filters, call_user_func_array, bbp_template_include_theme_compat, BBP_Shortcodes->display_topic, bbp_get_template_part, bbp_locate_template, load_template, require(‘/plugins/bbpress/templates/default/bbpress/content-single-topic.php’), bbp_has_replies, WP_Query->__construct, WP_Query->query, WP_Query->get_posts

    #183291

    In reply to: Language

    Roman Matovsky
    Participant

    If you only want to change it on your local installation, you can read the codex on https://codex.bbpress.org/getting-started/bbpress-in-your-language/

    Thank you! That’s what I need.

    #183282
    Pascal Casier
    Moderator

    So it’s display only ? But the input of the topics and replies is happening somewhere in a ‘normal’ bbPress forum, right ?

    I think you need to create a theme that only displays what you need. It will be easier then just displaying everything with the shortcodes.

    Step-by-Step Guide to Creating a Custom bbPress Theme

    #183281

    In reply to: bbp_reply_admin_links

    Pascal Casier
    Moderator

    $args is only the 3rd argument of the bbp_get_reply_admin_links function !
    So if you want to deal with the args, it should be:

    function hw_get_reply_admin_links ($retval, $r, $args) {
    $args = array (
    			'before' => '<div class="list">',
    			'after'  => '</div>',
    );
    return $retval;
    }
    add_filter ('bbp_get_reply_admin_links', 'hw_get_reply_admin_links', 10, 3 );
    #183280
    Pascal Casier
    Moderator

    Hi,
    It’s a bit difficult to understand where this is coming from (it might be part of your theme), so if the site is publically availalble, a link to it might be nice.

    It might be that following point 3 of this codex page will help you: https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/

    #183278

    In reply to: bbp_reply_admin_links

    theredeclipse
    Participant

    Thanks a lot, it works now! I’ve removed “class=”bbp-author-” and rest of the code doesn’t display so its suits perfectly for me.

    Now I trying to change args of bbp_get_reply_admin_links (stored in bbpress/includes/replies/template.php)

    Thats my hook

    function hw_get_reply_admin_links ($args) {
    $args = array (
    			'before' => '<div class="list">',
    			'after'  => '</div>',
    );
    return $args;
    }
    add_filter ('bbp_get_reply_admin_links', 'hw_get_reply_admin_links' );

    What’s wrong here?

    #183277
    DessertGuru
    Participant

    I’m going to use bbPress but via shortcodes so that only topics and posts within the topics are displayed on pages. I don’t want the full Forum Root, Forums, Topics etc., displayed on a page. so I’m going to create individual pages for each topic assign the bbpress shortcode for the topic and posts. So is it really necessary to do page/slug assignments in bbpress setup and have the full thing displayed even though I’m not going to use the full bbpress forum display structure and I certainly don’t want to the public to see it.

    or does anyone have any other suggestions on how to accomplish this?

    The “forum” will the individual Page, the Topic will be the posts from users on the assigned page. there won’t be an actual “topic” for each forum since the forum is the topic.

    #183267

    In reply to: Language

    Pascal Casier
    Moderator

    Hi,
    bbPress translation is centralized here: https://translate.wordpress.org/projects/wp-plugins/bbpress/stable/ru/default

    If you want to propose a new translation so everybody in the world that uses it in Russian gets your update (when it gets approved), then you can do that using the above link.

    If you only want to change it on your local installation, you can read the codex on https://codex.bbpress.org/getting-started/bbpress-in-your-language/

Viewing 25 results - 5,301 through 5,325 (of 32,518 total)
Skip to toolbar