Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,276 through 5,300 (of 32,505 total)
  • Author
    Search Results
  • #183493
    Steve
    Participant

    OK. I know this exist. I see people talking about it, but I have no idea how to create the link to it.

    Where is the member profile page? How do I add a link to my menu for people to access their profile an update it.

    I don’t see shortcode, I don’t see it as a menu link… I just don’t see it.

    But do see I can click the name of someone who post to the forum and see their profile. So it does exist.

    I just can’t find any documentation on how to add a link to a members profile page to the menu.

    Please help. Thanks.

    #183491
    Martin
    Participant

    Hi!, I need to do this in my wordpress. I’ver already installed rpb-chessboard and bbpress-do-short-codes plugins, but i don’t know where i have to call function
    add_filter (‘pw_bbp_parse_shortcodes_cap’ , ‘publish_topics’ ) ;

    When I active bb-press-do-shot-codes [pgn] and [fen] sections were disappeard.

    Thanks!

    #183487

    In reply to:

    blasterspike
    Participant

    I have tried again from a dump of a phpBB 3.1.9 and I’m back at the

    Error establishing a database connection

    error. Every time I have to do a test, I’m sure I use the “Reset Forums” function (tools.php?page=bbp-reset) and at the import I select both
    “Start a fresh conversion from the beginning”
    “Purge all information from a previously attempted import”

    #183485
    Robin W
    Moderator

    where did you put that code?

    #183471

    In reply to: No toolbar available

    adiek84
    Participant

    Hi guys,

    I have the same problem, and I’d really love to solve this by using your solution, but I’m not very good in coding etc. Can you tell me where you put the
    <?php wp_footer(); ?>

    Thanks!

    #183461
    Robin W
    Moderator

    This in your css should take it away

    .topic .entry-meta {
      display: none;
    }
    

    Please confirm or come back

    tweichart
    Participant

    Hey guys,

    just stumbled over a small 500 error in the functions file:

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

    Should be fixeable, ln 1850-1854 is in the bbp_pre_get_posts_normalize_forum_visibility function and looks like this:

    
    // Get any existing meta queries
    $meta_query   = $posts_query->get( 'meta_query' );
    
    // Add our meta query to existing
    $meta_query[] = $forum_ids;
    

    adding an array check to ln 1850 should suffice (i do actually not know what one’s trying to achieve here, so this is just a quickfix):

    
    $meta_query   = is_array( $posts_query->get( 'meta_query' ) ) ? $posts_query->get( 'meta_query' ) : array( $posts_query->get( 'meta_query' ) );
    

    side-note: wp version 4.7.3, bbpress version 2.5.12, php version 7.1.3

    Cheers,
    Toby

    #183437
    Col_Blimp
    Participant

    Looking to filter/replace all instances of <img src="http:// with <img src="https:// is there any hooks that allow this to happen on topic/reply creation and edit?

    #183429

    In reply to: bbp_reply_admin_links

    Robin W
    Moderator

    on 1. just rechecked, and the code works – make sure you are looking at a reply not a topic.

    on 2. more seriously, there are no strict rules, as often you want to put in an #ID that related to say a topic number, so need to do this within the code.

    #183422

    In reply to: bbp_reply_admin_links

    theredeclipse
    Participant

    Not working :[

    Just my curiosity, but why html markup is included in code? I worked in past with DLE engine and all markup was purely inside of template.

    #183407
    dominikb
    Participant

    Hi folks,
    I added 2 custom roles via

    function add_custom_role( $bbp_roles ) {
    
    $bbp_roles['my_custom_role1'] = array(
    'name' => 'Kursteilnehmer',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role2'] = array(
    'name' => 'Mentor',
    'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() ) // the same capabilities as moderator
    );
    return $bbp_roles;
    }
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );

    I tried to assign them via the WP-Users page, but they do not appear in the forum-roles dropdown.

    Whats going wrong here?

    Regards
    Dominik

    #183405
    Rixter
    Participant

    Do you happen to have the answer to this as well…?
    It is WooCommerce related, not bbPress though.

    I would like to change the color of the text when filling out username.
    Through WooCommerce I have a page ‘My account’ and in it two text boxes. One for username, one for password.
    The text on my site is white, the background of these fields also.
    So when you type name or passwords, it’s invisable.

    I would like to add code to custom CSS to solve this.

    What would be the code for this?

    I think the element is called something like this…
    input#username.woocommerce-Input.woocommerce-Input–text.input-text.

    (I am slowly learning how CSS works, tried to do it myself but it didn’t work…)

    #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'); 
Viewing 25 results - 5,276 through 5,300 (of 32,505 total)
Skip to toolbar