Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 26 through 50 (of 32,467 total)
  • Author
    Search Results
  • yt
    Participant

    Hello everyone

    My site was created with WordPress 6.8.2 and BBPress 6.2.14 with the WordPress 2025 theme block template.

    In the BBPress documentation titled: “Layout and functionality – Examples you can use” at:

    Development & Updates

    in line 12 it says:

    12. Add a modal login (pop-up) window
    This is quite neat and the instructions add it to the menu and, if necessary, add the login/logout.

    The login looks like this
    https://buddypress.org/wp-content/uploads/53/2014/02/modal-login3-300×144.jpg

    There are different styles available and you can have your own style.

    Instructions can be found here:
    https://codex.bbpress.org/modal-login-in-a-menu/

    I tried to access it, but unfortunately the link gives an error of
    Error 404 – Destination Not Found.

    Please advise on how I can enable the above mentioned forum registration and login pop-up in my site’s forum?

    Thank you in advance for your help.

    #245891
    internationaljack
    Participant

    When I try to access a forum, I only see the site header (the rest of the page is blank). This is what shows up in my debug.log:

    [07-Aug-2025 22:39:33 UTC] PHP Warning:  chmod(): Operation not permitted in /var/www/vhosts/[SITEURL]/httpdocs/wp-admin/includes/class-wp-filesystem-direct.php on line 173
    [07-Aug-2025 22:39:34 UTC] PHP Warning:  chmod(): Operation not permitted in /var/www/vhosts/[SITEURL]/httpdocs/wp-admin/includes/class-wp-filesystem-direct.php on line 173
    [07-Aug-2025 22:39:39 UTC] PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/[SITEURL]/httpdocs/wp-content/themes/Avada/includes/class-avada-layout-bbpress.php on line 219
    [07-Aug-2025 22:39:39 UTC] PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/vhosts/[SITEURL]/httpdocs/wp-content/themes/Avada/includes/class-avada-layout-bbpress.php on line 219
    [07-Aug-2025 22:39:39 UTC] PHP Fatal error:  Uncaught Error: Undefined constant "description" in /var/www/vhosts/[SITEURL]/httpdocs/wp-content/themes/Avada-Child-Theme/bbpress.php:22
    Stack trace:
    #0 /var/www/vhosts/[SITEURL]/httpdocs/wp-includes/template-loader.php(106): include()
    #1 /var/www/vhosts/[SITEURL]/httpdocs/wp-blog-header.php(19): require_once('/var/www/vhosts...')
    #2 /var/www/vhosts/[SITEURL]/httpdocs/index.php(17): require('/var/www/vhosts...')
    #3 {main}
      thrown in /var/www/vhosts/[SITEURL]/httpdocs/wp-content/themes/Avada-Child-Theme/bbpress.php on line 22
    [07-Aug-2025 22:39:39 UTC] PHP Warning:  chmod(): Operation not permitted in /var/www/vhosts/[SITEURL]/httpdocs/wp-admin/includes/class-wp-filesystem-direct.php on line 173
    [07-Aug-2025 22:39:47 UTC] PHP Warning:  chmod(): Operation not permitted in /var/www/vhosts/[SITEURL]/httpdocs/wp-admin/includes/class-wp-filesystem-direct.php on line 173

    The above is with this in wp-config.php:
    define('FS_METHOD', 'direct');

    Our sites are normally set to define('FS_METHOD', 'ftpext'); but that produces a much longer error string in the log and a “this site has experienced a critical error” message in the browser.

    Our prod site is on PHP 7.4.33 and doesn’t have any issues in either FS_METHOD mode. Did PHP 8 change something that affected filesystem access?

    Notes:
    – This is a multisite with a bbPress forum on almost all sites.
    – Our theme, Avada, runs fine on our other dev site with PHP 8.4.

    #245885
    manojmohandev
    Participant

    line #956,

    // Only update if reply is published
    if ( ! bbp_is_reply_pending( $reply_id ) ) {

    As per the comment, it should check if reply is published. But this condition will be true even if the reply is marked as spam. Instead it should use if ( bbp_is_reply_published( $reply_id ) ). Same thing I have observed for topic as well. If topic is marked as spam by akismet, the last active parameters reflects the spam topic instead of last published topic.

    #245868
    yt
    Participant

    Hello @robin-w

    The code is tested and works fine. Thank you for that.

    It seems that the code needs two modifications to be converted into a complete code. These two modifications are:

    1- Modification related to the user
    Absolutely directing the logged in user to the first page of the site is not useful in most cases, because

    Suppose the user has entered a forum topic and wants to reply to it. For this purpose, he enters the forum by entering his user information. In the default WordPress mode, the user who is on the current page is considered a logged in user and can send a reply

    However, with the above code, the user is redirected from the current page to the first page of the site and must return to the initial page of the topic in question with a few clicks. This causes user annoyance and increases the bounce rate from the forum.

    Therefore, the code needs to be modified so that the user on the current page (meaning any page of the forum or site that has a comment) is logged in on the same page as the current user after entering his user information and logging in, but at the same time does not have access to the counter.

    2- Correction related to the site and forum administrator
    The same problem as above is true for the administrator. For example, the administrator enters the forum and wants to create a topic or reply to a topic, so he enters the login information. In the default WordPress mode, he is considered logged in on the current page, but at the same time, the WordPress admin bar is displayed at the top of the forum or site, which means he has access to the counter.

    However, with the above code, the administrator is redirected from the current page to the counter, which should return to the original current page with a few clicks, just like the same user.

    Is it possible to modify the code as described?

    Thank you very much in advance for your valuable help.

    yt
    Participant

    Hello everyone

    A code snippet is needed to suspend the publication of topics and replies submitted by forum members until the forum administrator approves (something similar to what is in place for site comments until the administrator approves).

    A code that can be run in a BBPress function file or a WPCode plugin php snippet file and work.

    Thanks in advance for your help

    yt
    Participant

    Hi @robin-w
    The code works fine.
    Thanks for your help.

    jennypins
    Participant

    What Happened to “Views” in bbPress 2.6.14?
    In earlier versions of bbPress, Views were visible as a menu item in the WordPress admin under Forums > Views.

    In version 2.6.14, the admin menu link to Views was removed by default as part of bbPress cleanup and streamlining.

    However, the Views themselves still exist — they’re just hidden from the admin menu unless you’re actively using or registering them.

    How to Restore the “Views” Menu
    You can manually re-enable the Views admin menu by adding a small code snippet to your theme’s functions.php file or a custom plugin:
    add_action( ‘bbp_admin_menu’, function() {
    add_submenu_page(
    ‘edit.php?post_type=forum’,
    ‘Topic Views’,
    ‘Views’,
    ‘manage_options’,
    ‘edit.php?post_type=topic_view’
    );
    });

    Robin W
    Moderator

    Try

    #bbpress-forums .status-closed,
    #bbpress-forums .status-closed a {
    color: #aaa !important;
    background-color: none !important;
    }
    #245833
    Robin W
    Moderator

    now corrected in codes, to this

    /**
    * WordPress function for redirecting users on login based on user role
    */
    function my_login_redirect( $url, $request, $user ){
    if( $user && is_object( $user ) && is_a( $user, 'WP_User' ) ) {
    if( $user->has_cap( 'administrator' ) ) {
    $url = admin_url();
    } else {
    $url = home_url();
    }
    }
    return $url;
    }
    add_filter('login_redirect', 'my_login_redirect', 10, 3 );
    yt
    Participant

    Hello everyone

    My site is using the latest WordPress 6.8.2 with WordPress 2025 theme and BBPress community

    To change the color of closed topics in

    13. Preventing closed topics from going grey

    At address:

    Layout and functionality – Examples you can use

    The following code:

    #bbpress-forums .status-closed,
    #bbpress-forums .status-closed a {
    color: #aaa !important;
    }

    is introduced.

    I put it in the css snippet of WPCode plugin. but the code doesn’t work.

    Can anyone help me fix the problem?

    Thanks

    #245831
    yt
    Participant

    Hi everyone

    My site is using the latest WordPress 6.8.2 with WordPress 2025 theme and BBPress community

    In
    27. Custom Redirect After Login

    At address

    Layout and functionality – Examples you can use

    The following dual-purpose redirect code:

    /**
    * WordPress function for redirecting users on login based on user role
    */
    function my_login_redirect( $url, $request, $user ){
    if( $user && is_object( $user ) && is_a( $user, ‘WP_User’ ) ) {
    if( $user->has_cap( ‘administrator’ ) ) {
    $url = admin_url();
    } else {
    $url = home_url();
    }
    }
    return $url;
    }
    add_filter(‘login_redirect’, ‘my_login_redirect’, 10, 3 );

    It is introduced that I have it in the php sippet file of the WordPress plugin code but I am getting the error

    Your changes are saved but your snippet was deactivated due to an error, please check the syntax and try again. Error message: syntax error, unexpected token ;

    It seems that there is a problem with the code.

    Can anyone help to fix the problem?

    #245819
    Robin W
    Moderator

    Yes, this widget is no longer available.

    For you if you have the style pack plugin, you can use the bsp-profile shortcode instead

    [bsp-profile label="amend profile/password" edit="true"]

    You can simply add a shortcode block after the login widget.

    bbp style pack

    #245810
    #245797
    yt
    Participant

    Thanks for your reply

    I mean the twentytwentyfive WordPress theme block template.

    To view live errors, you can:

    1- By entering the forum home page address

    https://ghazavatonline.ir/forums/

    In the forum search form, enter a desired phrase and then press enter. Instead of displaying the search results, you will see in the header the error:

    Warning: Undefined array key “archive” in /home/ … /public_html/wp-includes/block-template.php on line 180

    Warning: Undefined array key “archive” in /home/ … /public_html/wp-includes/block-template.php on line 180

    2-Also, when you click on any of the tags that have topics assigned to them, instead of displaying the tags, the above error code is displayed and no topics are displayed

    For this, visit the address

    شکایت از قاضی دادگاه به علت عوض کردن جای متهم ها

    Click on the tag “تخلفات انتظامی قضات”

    Or go directly to the link

    https://ghazavatonline.ir/forums/topic-tag/disciplinary-breaches-of-judges/

    to see the same errors in the header and that no topic associated with the selected tag is displayed.

    Of course, it should be noted that the above errors are only generated when the twentytwentyfive block template is activated

    But when the twentytwentyfour and twentytwentythree templates are activated, they are not generated and work without problems.

    #245780
    Robin W
    Moderator

    ok, I took another look at this, and this new version should show ip4 but not ip6

    add_filter ('bbp_get_author_ip', 'rew_hide_v6') ;
    
    function rew_hide_v6 ($author_ip='') {
    	if (strlen($author_ip)>55) $author_ip='' ;
    return $author_ip ;
    }
    #245772
    Robin W
    Moderator

    that would seem to be a good idea.

    Without re-reading this thread, do you have code that fixes?

    #245758
    Robin W
    Moderator

    Did you read the cloudfare link that said they might not be seeing the real IP address, but rather a cloudfare server address? may or not be relevant.

    The classes for that are

    bbp-reply-ip
    bbp-topic-ip

    so should be

    .bbp-reply-ip, .bbp-topic-ip{
      text-align: left !important;
    }
    #245754
    Robin W
    Moderator

    apologies, try this

    add_filter ('bbp_get_author_ip', 'rew_hide_v6') ;
    
    function rew_hide_v6 ($author_ip='') {
    if (strlen($author_ip)>20) $author_ip='' ;
    return $author_ip ;
    }
    #245738
    Robin W
    Moderator

    ok, so we can hide the ip6, but getting the ip4 is harder i think.

    I found this post relating to Cloudfare which tends to indicate that even an ip4 might be just a Cloudflare address, but I only spent 2 minutes reading though !!

    https://wordpress.org/support/topic/real-ip-for-the-customers-cloudflare/

    so to hide an IP6, try this (untested!)

    add_filter ('bbp_get_author_ip', 'rew_hide_v6') ;
    
    function rew_hide_v6 ($author_ip='') {
    if ($strlen($author_ip)>20) $author_ip='' ;
    return $author_ip ;
    }

    Put this in your child theme’s function file –

    ie wp-content/themes/%your-theme-name%/functions.php

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

    or use

    Code Snippets

    Let me know if it works

    @hardel The fixes that were recommended in the ticket you linked to are pretty-much identical to what is now in 2.6.14.

    If that worked for you then, 2.6.14 should work now, but only as long as you aren’t still running the old temporary fix code at the same time.

    (I’ve tested a few different ways & installs, and the latest BuddyPress & bbPress are working together as intended for me.)

    The URLs being generated are different from what I originally posted four years ago.

    They both still look the same to my eyes, but I will believe you 🤣

    #245568
    Robin W
    Moderator

    If I understand you correctly, you use the ‘code’ option

    eg

    <b>
    some words
    </b>

    So you type all your ‘code’ and then highlight it, and click the code button.

    jamieFL
    Participant

    Hello,

    I’ve searched, but I don’t even know what to call what I’m looking for. You know that toolbar above the post? It can bold and italicize, etc. I would like a list of the html tags, if that is what they are called, that can be used within a post. I am creating a forum that will have a lot of YAML and Python code snippets and I want them boxed, or separated some how. I want to create a sticky post showing these codes, what they look like, and how they render…but, I can’t figure out how to post the html tag without it rendering. Sorry if I offended anyone with this basic question, but as I said…I don’t know what to search for.

    How do I add the <b>You may use these HTML tags and attributes:</b> to the bottom of my post page? That may solve my problem.

    #245544
    qiwichupa
    Participant

    Yes, Mingle is still working. I set 10 replies per page to accurately correlate posts to pages on both forums. The number of posts matches.

    I checked the order of the posts from page 1 to page 7 until I found the wrong link – it’s now on the same page 7, in the last post (#120847 – “Бормотунчик – Mitsume ga Tooru”). Up to that point, all posts are present and in the same order as in Mingle.

    https://garage.qiwichupa.net/bbforums/topic/stream-records/page/7
    https://garage.qiwichupa.net/forums?mingleforumaction=viewtopic&t=3.6

    #245536
    qiwichupa
    Participant

    Right here on this page

    https://garage.qiwichupa.net/bbforums/topic/stream-records/page/8

    the link in the top post (#120964) leads to the previous page, the links in the following posts are correct, but at the very bottom (starting from #121101) the links lead to the next page.

    #245527
    qiwichupa
    Participant

    Thanks for trying to help! I followed your advice, but unfortunately none of the above helped. Despite a different theme and disabling plugins the page is generated similarly. Changing and saving permalink settings didn’t lead to any result either (from what I understand, bbpress uses hardcoded settings to generate links).

    Maybe there’s some way to recreate a topic from scratch by copying post by post from the old one into it? So that the bbpress engine is fully responsible for the process (still think the problem might be a result of incorrect import from Mingle). Doing it manually is too time consuming =\

Viewing 25 results - 26 through 50 (of 32,467 total)
Skip to toolbar