Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 8,276 through 8,300 (of 32,519 total)
  • Author
    Search Results
  • #164652
    Robkk
    Moderator

    Thanks you for sharing your fork.

    Have you read this for that freezing issue??

    Import Troubleshooting

    Robkk
    Moderator

    Its not a plugin specific error. Your server just can’t handle too much memory usage. WordPress may need more memory to use for your site. It has increased the minimum requirements before.

    https://core.trac.wordpress.org/ticket/21646

    You can follow the link I placed above then follow another link to show you some code to add to your wp-config.php file and see if that fixes your issue, in most cases it likely will. In some situations your server will cap the allowed memory so you may need to contact them about increasing it more.

    If you want you can also google your issue and you will see countless posts on the wordpress.org forums about this, and they have the same exact answer.

    Robkk
    Moderator

    There is probably a better way then CSS but it is all I could find real quick.

    Does this work??

    .activity-list li.bbp_topic_create, 
    .activity-list li.bbp_reply_create {
        display: none;
    }
    Robkk
    Moderator

    Yeah this issue is not because of the bbPress plugin but your site does not have enough memory.

    https://codex.wordpress.org/Common_WordPress_Errors#Allowed_memory_size_exhausted

    Robkk
    Moderator

    You have to copy the main template bbPress is inheriting from your theme for its layout and create a bbpress.php file from it. This would usually require you to remove the sidebar code, then use CSS to make the layout fullwidth.

    Getting Started in Modifying the Main bbPress Template

    #164627
    drinkingsouls
    Participant

    Basically when I activate bbPress on my blog the log out links no longer work. It seems to append a redirect to the end of log out links which prevents it from working. I’m not sure why but it’s definitely to do with bbPress.

    Here is the logout anchor tag when bbPress is deactivated (works)
    <a href="http://test.webshrimp.uk/wp-login.php?action=logout&_wpnonce=1ef350795a">Log out</a>

    Here is the anchor tag when bbPress is activated – doesn’t do anything
    <a href="http://test.webshrimp.uk/wp-login.php?action=logout&_wpnonce=1ef350795a&redirect_to=http%3A%2F%2Ftest.webshrimp.uk%2F%3Floggedout%3Dtrue">Log out</a>

    Any help would be greatly appreciated.
    Thank you.

    #164621
    PinkishHue
    Participant

    I’m assuming by category you mean the forum that the topic is in?

    You can remove the forum dropdown menu and use a hidden field here instead.

    In your theme you need to have this file:

    wp-content/your-theme/bbpress/form-topic.php

    If you don’t have it, copy it over from the bbpress default templates at:

    wp-content/plugins/bbpress/templates/default/bbpress

    Then open your new form-topic.php in a text editor and find this part of the code:

    <p>
    	<label for="bbp_forum_id"><?php _e( 'Forum:', 'bbpress' ); ?></label><br />
    	<?php
    		bbp_dropdown( array(
    		'show_none' => __( '(No Forum)', 'bbpress' ),
    		'selected'  => bbp_get_form_topic_forum()
    		) );
    	?>
    </p>

    and replace it with this:

    <input id="bbp_forum_id" type="hidden" name="bbp_forum_id" value="20">

    Where 20 is the ID no. of the forum you want all topics to be created in.

    Hope that helps 🙂

    #164616
    killer_x10
    Participant

    You could’ve added a function to allow extra tags though.

    I think most people prefer bbcode in the Forums and besides I’m not a Developer, I know very little js and just started with php (You could call me Web Designer though).

    But the close Tags isn’t still working for me, I think I’m just gonna publish the Site without that functionality.

    #164615
    Robkk
    Moderator

    Found this snippet earlier this week, this should help not allow guest users to see BuddyPress Profiles.

    /**
    * Redirect buddypress and bbpress pages to registration page
    */
    function kleo_page_template_redirect()
    {
        //if not logged in and on a bp page except registration or activation
        if( ! is_user_logged_in() && ! bp_is_blog_page() && ! bp_is_activation_page() && ! bp_is_register_page() ) {
            wp_redirect( home_url( '/register/' ) );
            exit();
        }
    }
    add_action( 'template_redirect', 'kleo_page_template_redirect' );
    #164611
    Robkk
    Moderator

    I’ve looked inside the loop-forums.php template, then found this <?php do_action( ‘bbp_template_before_forums_loop’ ); ?> being executed. Which template file is bbp_template_before_forums_loop pulling from ?

    Sorry for the late reply, but that is a hook. If you want the login form only above the forum index just echo the shortcode like so above or below that hook.

    <?php echo do_shortcode("[shortcode]"); ?>

    or if you are pretty good with PHP just use the hook.

    If you want the login form above all bbPress pages, you might have to consider echoing the shortcode in a bbpress.php file.

    Getting Started in Modifying the Main bbPress Template

    #164608
    Robkk
    Moderator

    If what you are looking for is to remove the

    This topic contains blah blah blah

    Look for this in content-single-topic.php

    <?php bbp_single_topic_description(); ?>

    You can also use a function snippet like this to remove it for Forums and topics.

    add_filter( 'bbp_get_single_forum_description', 'ja_return_blank' );
    
    add_filter( 'bbp_get_single_topic_description', 'ja_return_blank' );
    
    function ja_return_blank() {
    
        return '';
    
    }
    #164607
    Robkk
    Moderator

    Try some troubleshooting especially the Theme and Plugin steps.

    Troubleshooting

    #164605
    Robkk
    Moderator

    You have to copy the main template bbPress is inheriting from your theme for its layout and create a bbpress.php file from it. This would usually require you to remove the sidebar code, then use CSS to make the layout fullwidth.

    Getting Started in Modifying the Main bbPress Template

    #164603

    In reply to: Image

    Robkk
    Moderator

    Add all this CSS, it fixes the issue you have created this topic for and whatever else I could find on your site.

    #bbpress-forums .reply a {
        padding: 0;
        display: inline-block !important;
        text-align: inherit!important;
    }
    
    #bbpress-forums .reply a:hover {
        background-color: transparent !important;
    }
    
    #bbpress-forums li.bbp-topic-voice-count, 
    #bbpress-forums li.bbp-topic-reply-count {
        color: inherit;
    }
    
    #bbpress-forums #content p{
        text-align: inherit;
    }
    #164602
    Robkk
    Moderator

    max links allowed in posts are 2 this includes links in embedded images.

    You can remove the http:// from the code, I would know what you are talking about.

    #164600
    Robkk
    Moderator

    Maybe this? Not 100% sure though, if you haven’t contact BuddyPress support.

    if ( is_user_logged_in() || bp_group_is_member() )

    #164595
    drinkingsouls
    Participant

    My replies with code won’t post for some reason..

    #164583
    Stagger Lee
    Participant

    Forgot about this and that I did it without buddyPress. Took code from this plugin and adapted it to my needs. But I see you already found it and adapted it self. Added some additional thing, Non logged User doesnt see online/offline icons, logged in User see them. Good to force curious people to log in.

    https://wordpress.org/support/topic/show-a-red-green-circle?replies=16
    https://wordpress.org/plugins/bbp-user-online-status/screenshots/

    #164580
    killer_x10
    Participant

    @Robkk

    Thank you for the Information but I am just replacing all the HTML Tags with bbcode tags, nothing special because I am very bad at php and javascript, I know very little js and just started with php. Btw I have finished it, just couldn’t get 1 thing right, Close HTML Tags.

    Here’s the Link to the Topic: https://bbpress.org/?post_type=topic&p=164557

    #164578
    Robkk
    Moderator

    if you need to use the user nicename replace

    $user = $current_user->user_login ;

    with

    $user = $current_user->user_nicename ;

    How could I possibly find out the correct menu slug id? Right now the menu appears in every menu (sidebar as well) and regardless of an user’s login status.

    I guess you can try doing what the top answer said here.

    http://wordpress.stackexchange.com/questions/104301/get-menu-id-using-its-name

    Stagger Lee
    Participant

    I help others as much I can and know. I cannot code from scratch. I knew this argument would come soon or later.

    Cannot be more specific. Move plugins from Github to WP repository and if possible maintain them by themselves. Good start.

    Can tell you story of most advanced and most powerfull forum on the world.
    Drupal forum, long time ago in the core, then as “featured plugin” (module) and now lost, not existing.
    I worked few months very intense on it and can witness that it is most advanced and powerful on the world (was).

    But for what use, what is the point. Nobody use it and now everyone forgot about it. Ugly as hell when installed, takes lot of time.

    Learn from mistakes of other people. Not everything is in the code.

    Robin W
    Moderator

    An interesting discussion, and can I perhaps add my thoughts as a plugin developer

    You start from a perspective that bbpress would naturally seek to be all things to all people and should want to compete with other products.
    I cannot speak for bbpress authors, but as a plugin author I write for the enjoyment and challenge of coding and to help others – I am not in an arms race or commercially minded – I can do plenty of that outside bbpress – and if some code I write has one user or thousands as long as it does what I want it to, I am happy. Yes it is nice to have good feedback, and improve it using others suggestions, but when these are posted as pseudo demands, or as a big list of complaints, then I have to say I would turn off. I do this for free, in my spare time, and for my enjoyment, and I suspect that the bbpress authors do the same as well.
    I have to say therefore I find your general thrust of your demands, and your ‘I know better’ how bbpress should be run attitude upsetting.
    This is a free product – if you want to improve it don’t whinge for the sidelines – write a detailed spec or better still write the code and submit it yourself.
    Just telling others how they should do something that costs you nothing seems a very negative way to go about things.

    Just my view 🙂

    #164562
    Robkk
    Moderator

    To edit the templates make sure to copy the files from the bbPress plugin into your child theme in a folder called bbpress.

    Theme Compatibility

    In content-single-forum.php remove this to remove the forum subscription link.

    <?php bbp_forum_subscription_link(); ?>

    In user-subscriptions.php, remove all of this.

    <h2 class="entry-title"><?php esc_html_e( 'Subscribed Forums', 'bbpress' ); ?></h2>
    			<div class="bbp-user-section">
    
    				<?php if ( bbp_get_user_forum_subscriptions() ) : ?>
    
    					<?php bbp_get_template_part( 'loop', 'forums' ); ?>
    
    				<?php else : ?>
    
    					<p><?php bbp_is_user_home()
    						? esc_html_e( 'You are not currently subscribed to any forums.',      'bbpress' )
    						: esc_html_e( 'This user is not currently subscribed to any forums.', 'bbpress' );
    					?></p>
    
    				<?php endif; ?>
    
    			</div>
    #164558
    Robkk
    Moderator

    Should be also possible to make new menu items via functions to one of the menus created in backend design -> menu, right?

    Maybe? maybe do something similar to what Baw login/logout menu uses, but I haven’t dived deep into this yet.

    The way your code looks is a little odd, you might have to construct it similar to what I posted above.

    This is what I made while messing with it, there could be a different class that your theme uses for sub-menu’s though.

    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) {
        if (!is_user_logged_in() && $args->menu->slug == 'mobile_menu')
            return $menu;
        else
            $current_user = wp_get_current_user();
            $user = $current_user->user_login ;
            $class = 'sub-menu';
            $profilelink = '
                <li><a href="/forums/users/' . $user . '/">Your Profile</a>
                    <ul class=' . $class . '>
                        <li><a href="/forums/users/' . $user . '/replies">Replies</a></li>
                        <li><a href="/forums/users/' . $user . '/topics">Topics</a></li>
                        <li><a href="/forums/users/' . $user . '/subscriptions">Subscriptions</a></li>
                        <li><a href="/forums/users/' . $user . '/edit">Edit Profile</a></li>
                    </ul>
                </li>
            ';
            $menu = $menu . $profilelink;
            return $menu;
     
    }
    #164556
    Robkk
    Moderator

    @killer_x10

    There is a toolbar plugin which is quite old. Just so you know if you plan to fix it up, you might as well structure it out better, because with all of its inline javascript it will add about 3 seconds load time to your site.

    There is also a way to hook up other toolbars that could be just for bbcode into bbpress also.

Viewing 25 results - 8,276 through 8,300 (of 32,519 total)
Skip to toolbar