Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,951 through 2,975 (of 32,517 total)
  • Author
    Search Results
  • #210167

    In reply to: CSS styling query

    Chuckie
    Participant

    For the other issue, the only thing I can come up with is Additional CSS:

    .enlighter-default .enlighter-raw {
    	display:none !important;
    }

    But is there a more robust solution that avoids the need for this?

    #210157
    Chuckie
    Participant

    Hi

    I have some queries and I wonder if you can help me get to the bottom of them. I would be grateful for your guidance. Here is the background.

    I am using the latest bbPress plugin and I notice that the bbpress.css file is 1702 lines long.

    I am using a premium theme (seos-video-premium) and even though I am using a child theme, I have noticed that my Support forum is actually using:

    wp-content/themes/seos-video-premium/seos-video-premium/css/bbpress.css

    I assume this is because there is no bbpress.css in my child theme css folder so it uses the themes one instead of the bbPress plugin’s one?

    So I have two specific questions here.

    1/ the bbpress.css file in the premium theme folder is actually 1408 lines of code. So it is 300+ lines shorter than the plugin version. To be honest, I was not expecting to find a bbpress.css file inside the theme. So what am I supposed to do? Simply replace the theme version with your plugin version?

    2/ I have been trying to use a beta version of EnlighterJS Plugin (it is their beta that uses EnlighterJS v3. There was an issue with these styles:

    #bbpress-forums div.bbp-topic-content pre,
    #bbpress-forums div.bbp-reply-content pre {
    	display: block;
    	line-height: 18px;
    	margin: 0 0 24px;
    	padding: 5px 10px;
    	white-space: pre;
    	overflow: auto;
    }

    In their classes they have this styling:

    .enlighter-default .enlighter-raw {
        display: none;
        min-width: 100%;
        line-height: inherit;
        font-size: 12px;
        font-family: inherit;
        margin: 0;
        padding: 0;
        white-space: pre-wrap;
        word-wrap: break-word;
        border: none;
        box-shadow: none;
    }

    The HTML is:

    <pre class="enlighter-raw">.textMaterial {
      /* Uncomment to hide the material */
      /* display:none;*/
      font-size: 10pt;
      font-style: italic;
      font-weight: 700;
      background-color: yellow;
    }
    .textMethod {
      /* Uncomment to hide the method */
      /* display:none;*/
      font-size: 10pt;
      font-style: italic;
      font-weight: 700;
      background-color: cyan;
    }</pre>

    Notice that ttheir CSS style uses display: none;? The bbpress CSS file pre class has a display:block;. This causes a problem with the plugin I am trying to use.

    The author does not want to use !important because he says it is bad design. So how do we fix this? How can we allow bbpress to do what it wants with pre and EnlighterJS do what it wants?

    #210151

    In reply to: Forum roles issue

    Robin W
    Moderator

    yes, participants should be able to create topics and replies viz :

    bbPress User Roles and Capabilities

    I strongly suspect the issue is with active directory, you already have said that it rolls back settings, which makes me suspect that the entire WordPress database is being rolled back – if you create say a test post on the website, does it stay overnight, or does it disappear – this would help determine where to go next.

    #210139
    antonv
    Participant

    I needed to restrict participant topic creation to selected forums but allow replies to all topics in all forums. I came up with this solution

    function my_bbp_restrict_topic_creation( $can ) {
    		
    	$forum_id = array(18,22,56); //change your forum id
    
    	if ( ! bbp_is_user_keymaster() &&  bbp_is_single_forum() &&   !in_array( bbp_get_forum_id(),$forum_id) ) {
    		$can = false;	
    	}
    
    	return $can;
    
    }
    add_filter( 'bbp_current_user_can_publish_topics', 'my_bbp_restrict_topic_creation' );  

    Participants can only create topics in the three forums with IDs 18,22,and 56. Whereas the KeyMaster can create topics in all forums.

    #210133
    Robin W
    Moderator

    I did a code search and found this function in includes/common/functions line 1507 which seems a highly likely candidate.

    function bbp_logout_url( $url = '', $redirect_to = '' ) {
    
    	// If there is no redirect in the URL, let's add one...
    	if ( ! strstr( $url, 'redirect_to' ) ) {
    
    		// Get the forum root, to maybe use as a default
    		$forum_root = bbp_get_root_url();
    
    		// No redirect passed, so check referer and fallback to request uri
    		if ( empty( $redirect_to ) ) {
    
    			// Check for a valid referer
    			$redirect_to = wp_get_referer();
    
    			// Fallback to request uri if invalid referer
    			if ( false === $redirect_to ) {
    				$redirect_to = bbp_get_url_scheme() . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
    			}
    		}
    
    		// Filter the $redirect_to destination
    		$filtered  = apply_filters( 'bbp_logout_url_redirect_to', $redirect_to );
    
    		// Validate $redirect_to, default to root
    		$validated = wp_validate_redirect( $filtered, $forum_root );
    
    		// Assemble $redirect_to and add it (encoded) to full $url
    		$appended  = add_query_arg( array( 'loggedout'   => 'true'   ), $validated );
    		$encoded   = urlencode( $appended );
    		$url       = add_query_arg( array( 'redirect_to' => $encoded ), $url       );
    	}
    
    	// Filter & return
    	return apply_filters( 'bbp_logout_url', $url, $redirect_to );
    }

    so maybe filtering on ‘bbp_logout_url’ would work.

    Let me know if you need further help

    #210131
    ricks033
    Participant

    I have two websites running custom php to create Log In/Log Out entries on the menu.

    The Log Out behavior is different on the two websites. I finally tracked down the problem to bbPress. The URL created by my custom code with w_logout_url() on the bbPress site includes:
    &redirect_to=…

    where the URL created by the site without bbPress installed does not.

    Disabling bbPpress removes the &redirect_to=… and reenabling bbPress makes the redirect_to return.

    That leads me to believe bbPress is changing /setting this value somewhere, but I don’t see any choice to change that value in the bbPress settings?

    add_filter( 'wp_nav_menu_items', 'ccc_add_loginout_link', 10, 2 );
    function ccc_add_loginout_link( $items, $args ) {
        if (is_user_logged_in() && $args->theme_location == 'header-menu') {
            $items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>';
        }
        elseif (!is_user_logged_in() && $args->theme_location == 'header-menu') {
            $items .= '<li><a href="'. site_url('wpflogin') .'">Log In</a></li>';
        }
        return $items;
    }

    Thanks!!

    #210130
    giovanni
    Participant

    Hi,
    I don’t understand why it’s shown the pagination in user profile page.
    I’m refering to this page: https://www.make4future.com/forums/users/giovanni/

    I was thinking of hiding it with css for example:
    .pagination { display:none; }

    But the question is:
    what is it caused by ?
    There is a better way to resolve the problem ?

    Thanks in advance !

    Regards,
    Giovanni.

    Robin W
    Moderator

    can you list your plugins please- the original error
    Line 1: <div class="error"> <p>This Plugin needs BBpress to work, pls. install it first and activate.</p></div>

    is not from bbpress

    Solitary_bee
    Participant

    Yes I get that, and I see my settings are configured to automatically now give this status to new additions, and supposedly the ability to post, but ‘half’ of those that already have the status cannot.

    It’s a real shame that there are no codes written into the error messages.

    I guess my two questions are (in the context of my above post)

    1. When did all my historically inactive users get all their statuses changed to participants, it could only be with a recent BBpress plugin update?
    2. Is there another encoded condition that has to be satisfied aside from “if user = Participant then validate post or reply?”.

    I know an invalid or heavy file may stop posting, but I have increased the values of the attachments so this is out. Failed posters have however not always been uploading anything more than their text.

    Anyway I should stop speculating and see when the successful and failed posters were entered into the system.

    #210117
    webcreations907
    Participant

    <!-- nextpage-> converts to paginated links when using wp_link_pages() WordPress function for pages, posts, etc content, some themes add it some may not. As stated on WordPress wp_link_pages() must be in a loop/used for post content output.

    I don’t think(maybe wrong) that it would be a good idea to use it in topics and replies for bbpress since bbpress has it’s own pagination functionality.

    Thought I’d mention it. 🙂

    #210107
    Robin W
    Moderator

    hmm..not come across this before, from googling seems to be a wrodpress.com thing – doesn’t mean that I’m right – there’s tons on the internet that I don’t know, but just tried <!-- nextpage-> on posts in a couple of test sites, and it does nothing.

    Can only suggest you find out what is adding it, but you may need to accept that it doesn’t work in bbpress

    #210106
    Juha Metsäkallas
    Participant

    Eh, I’ve thought that that code is built in into WP. If that is not the case, then it must come with some of the bundles that accompany my theme. Could it be Kirki Customizer Framework?

    #210102
    Juha Metsäkallas
    Participant

    I tried to fix some typos, but it seems that it was interpreted as breach. Let me try anew.

    Steps to reproduce.

    1. Have the lorem ipsum text with <!--nextpage-->

    >
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    <!–nextpage–>
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    <

    2. If I create a page in my site with that text (and only that text), I see the first part and the navigation to the second part as my theme defines. The navigation works i.e. by clicking I can go to the second part.

    3. If I create a topic in my bbPress forum with that text (and only that text), I see the first part and the navigation to the second part as my theme defines. However the navigation does not work, i.e. by clicking I get the “too many redirects” error.

    #210091

    In reply to: bbPress + Elementor

    jaffray
    Participant

    I got it working without needing to modify the code. Use Single – “Any Child Of” – form name.

    #210090
    Juha Metsäkallas
    Participant

    Hello!

    I don’t know whether my site has had this from the beginning or not, since I haven’t used <!-- nextpage-> before, but…

    Paging works on normal pages (post_type=page), but on forums paging causes the “too many redirects” error (even with a post with just text, no links, no images).

    My site has a DV certificate from the web host provider (they took care of everything), Settings → General has the same https address for WP and the site.

    WP 5.4 and bbPress 2.6.4

    #210064
    Robin W
    Moderator

    ok, this could take some debugging !

    firstly in dashboard>replies how many replies do you have?

    can you copy the

    All (1,090) | Mine (129) | Published (1,089) | Pending (1) | Bin (1) | Spam (2)

    answer into this thread

    #210045
    Chuckie
    Participant

    Hi @robin-w

    RThanks for your latest bbp updates. I have activated your new bug fix check box and removed my code from functions.php and I can still split topics. Woo hoo!

    #210041
    devansh1995
    Participant

    hey robin .. nice to see you man. in past weeks i went through lot of bbprees forum topics & found your comments so useful. Even above code that i shared is suggested by you only years ago. Thanks a lot again. it worked like a charm. God bless man.

    #210040
    Robin W
    Moderator

    try changing the argument line

    if (($args['context'] == 'reply' || $args['context'] == 'topic') && $post_content == '') $output....etc.

    #210031
    lesbelleshistoires
    Participant

    Here it is :

    <?php
    /**
     * Statistics Content Part
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    // @codingStandardsIgnoreFile
    // Allow plugin text domain in theme.
    
    // Get the statistics.
    $stats = bbp_get_statistics(); ?>
    
    <?php do_action( 'bbp_before_statistics' ); ?>
    
            <div class="widget_display_stats">
    
                    <div class="row stats_list">
    
                            <div class="col-12 stats_list_item mb-2">
                                    <div class="bg-black-faded rounded-card p-2 h-100">
                                            <div class="row align-items-center">
                                                    <div class="col-auto text-center d-flex pr-0 align-items-center justify-content-center">
                                                            <i class="cera-icon cera-users text-primary fa-2x p-3 card"></i>
                                                    </div>
                                                    <div class="col">
                                                            <h3 class="mb-0"><?php echo esc_html( $stats['user_count'] ); ?></h3>
                                                            <h5 class="text-muted text-uppercase small font-weight-bold mb-0"><?php esc_html_e( 'Registered Users', 'bbpress' ); ?></h5>
                                                    </div>
                                            </div>
                                    </div>
                            </div>
    
                            <div class="col-12 stats_list_item mb-2">
                                    <div class="bg-black-faded rounded-card p-2 h-100">
                                            <div class="row align-items-center">
                                                    <div class="col-auto text-center d-flex pr-0 align-items-center justify-content-center">
                                                            <i class="cera-icon cera-message-square text-primary fa-2x p-3 card"></i>
                                                    </div>
                                                    <div class="col">
                                                            <h3 class="mb-0"><?php echo esc_html( $stats['forum_count'] ); ?></h3>
                                                            <h5 class="text-muted text-uppercase small font-weight-bold mb-0"><?php esc_html_e( 'Forums', 'bbpress' ); ?></h5>
                                                    </div>
                                            </div>
                                    </div>
                            </div>
    
                            <div class="col-12 stats_list_item mb-2">
                                    <div class="bg-black-faded rounded-card p-2 h-100">
                                            <div class="row align-items-center">
                                                    <div class="col-auto text-center d-flex pr-0 align-items-center justify-content-center">
                                                            <i class="cera-icon cera-alert-circle text-primary fa-2x p-3 card"></i>
                                                    </div>
                                                    <div class="col">
                                                            <h3 class="mb-0"><?php echo esc_html( $stats['topic_count'] ); ?></h3>
                                                            <h5 class="text-muted text-uppercase small font-weight-bold mb-0"><?php esc_html_e( 'Topics', 'bbpress' ); ?></h5>
                                                    </div>
                                            </div>
                                    </div>
                            </div>
    
                            <div class="col-12 stats_list_item mb-2">
                                    <div class="bg-black-faded rounded-card p-2 h-100">
                                            <div class="row align-items-center">
                                                    <div class="col-auto text-center d-flex pr-0 align-items-center justify-content-center">
                                                            <i class="cera-icon cera-radio text-primary fa-2x p-3 card"></i>
                                                    </div>
                                                    <div class="col">
                                                            <h3 class="mb-0"><?php echo esc_html( $stats['reply_count'] ); ?></h3>
                                                            <h5 class="text-muted text-uppercase small font-weight-bold mb-0"><?php esc_html_e( 'Replies', 'bbpress' ); ?></h5>
                                                    </div>
                                            </div>
                                    </div>
                            </div>
    
                    </div>
    
            </div><!-- .widget_display_stats -->
    
    <?php do_action( 'bbp_after_statistics' ); ?>
    
    <?php unset( $stats );
    #210026
    lesan
    Participant

    Hello,

    after about 3 years of using bbPress without any issues, we have an issue with the index page – the standard one that is specified in settings -> forum is not working. There is just the header and the footer displayed from the theme, no content at all.

    When I create a new page using the shortcode [bbp-forum-index], it is working fine. And all the threads and posts as well, they work fine on the original URLs. So it is really just the index page.

    I haven’t done any changes in the forum in the last year or even more.

    It is password protected, happy to share the password via a direct message.

    Thanks,

    Jan

    edublogger
    Participant

    Hi, if someone could assist I would appreciate it.

    I have a new bbPress install here: https://classthink.com/forums/forum/microsoft/

    I’ve created a new page with the [bbp-forum-index] shortcode here: https://classthink.com/forums/

    But when I visit https://classthink.com/forums/ all I get is the Forums Archive.

    It’s my — possibly incorrect — understanding that if you create a page with the same address as the forum slug, it should redirect to the page (in this case the forum index) rather than the archive.

    Can someone please point me in the right direction?

    Thanks,

    Solitary_bee
    Participant

    Hello all,
    I have been running BBpress for more than three of years, but started getting feedback that ‘Participants’ could no longer post or reply a month ago.
    The user error message gives me no clue as to what’s behind the issue ‘ERROR your reply/post cannot be created’, and there’s nothing in the settings that gives a clue either.

    I paid up to get ‘Pro tools’ to contribute something financially to the developer pot, but found no new clues in the tools either.

    So this morning I thought I would chance a deactivation of the plugin and reinstall.

    The moment I pressed deactivate, I got the message in the title of the post. My entire site is out of action – nothing public except the error message in the title. I can’t access the wp-admin only the FTP, but what to do? My site is out completely.
    I believe I am up to date on all WP software (as flagged by the WP admin zone)… and anyway, I cannot offer any other info now.

    The source code behind the message says:
    Line 1: <div class="error"> <p>This Plugin needs BBpress to work, pls. install it first and activate.</p></div>
    Please help. It’s my busy time of the year.
    http://www.abeillessauvages.com

    #210003

    Topic: Learning curve?

    in forum Installation
    robbytherobot
    Participant

    Hello, sorry first of all I am not a full on developer so forgive any basic questions, I have only just considered using bbpress for a forum I want to setup, I am familiar with WordPress and working with various plugins, can modify basic code etc when I need to, however it’s not my main job. I’ve installed bbpress and am looking at getting a theme to work well with it. Am willing to pay for a pro theme that is simple for users, nothing that special is required.

    I just want to ask how hard is it as a fairly competent end user with some technical know how to set up a basic bbpress site, add a fairly functional user friendly theme, and get a forum up and running? It’s not wordpress.org, it might have max 100 users, closed/private forum.

    I had assumed like most plugins bbpress would work fairly well “out of the box” and adding a template and maybe a few additional plugins to improve functionality would not be a big deal.

    However I’ve just been quoted $2500 by a developer to do the above, to say my jaw hit the floor would be an understatement! Is bbpress THAT hard to implement that I need to pay mega bucks to get something simple up and running with it?? 🙁

    PS the only reason I considered paying someone was to get it done in a few days rather than a few weeks as I have my main work to be getting on with as well… Otherwise I’d sit down and work through it step by step usually!

    #209996
    Robin W
    Moderator
Viewing 25 results - 2,951 through 2,975 (of 32,517 total)
Skip to toolbar