Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 7,776 through 7,800 (of 32,519 total)
  • Author
    Search Results
  • #167103
    myndphunkie
    Participant

    Fixed by installing the Custom CSS plugin and adding code to there (that way it over-rides all other CSS)

    #167092

    In reply to: Sidebar Help

    Robkk
    Moderator

    Well since you did not place the shortcode in a page. bbPress is inheriting a template in your theme. And it could be one that you can just modify in your theme settings to include a sidebar or not.

    To fix the issue you can create a bbpress.php file in your theme and just make sure that the sidebar code is inserted.

    Getting Started in Modifying the Main bbPress Template

    While using the What The File plugin to spot what templates are being used on your forum archive page and also single forum/topic pages, you can see if they are two separate templates being used.
    Or you can just stick to using a sidebar in your theme and not using a fullwidth layout at all on archive/single pages.

    #167091
    Robkk
    Moderator

    Here is some common issues that could create the White Screen of Death issue.

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

    You can try to see if another plugin is also causing the issue with bbPress and your site.

    And you can try to find some debug information on your site by using WP-Debug set to true.

    https://codex.wordpress.org/Editing_wp-config.php#Debug

    #167089
    Robkk
    Moderator

    my apologies for not replying faster.

    Its all good.

    Since I see you do not have a VPS already when using BuddyPress, you may not have enough memory at all on your current plan.

    Having VPS hosting or better is usually recommended if you are going to use BuddyPress. But I guess a small community should be able to handle something like shared hosting.

    Getting Started

    As a test and since the error is related to the Activity component in BuddyPress, you can just try disabling the component in BuddyPress to see if the error disappears.

    For the second error you are getting, hopefully you are not trying to edit the BuddyPress plugin and causing more issues.

    You can also try reinstalling BuddyPress as a last resort to see if that would resolve any issues.

    #167088
    Akawey
    Participant

    Okay, this seems to be an old issue but I’m having the same problem now.
    How about having a shortcode that just does it?
    I didn’t see a bbpress ‘users’ shortcode amongst those listed in the documentation.

    Or is there another fix to this problem…

    @joopstringer
    where do I add the code you suggested?

    I’m setting up a site and only my admin user page comes up, all others are 404 pages.
    Any help please?

    #167086
    Robkk
    Moderator

    It is just a conflicting piece of javascript somewhere in the file. If they already have a fix somewhere in that file for comment threading then something similar may need to be done to bbPress reply threading since both their scripts are very similar.

    Try this custom php code snippet. Place it in your child themes functions.php file or in a functionality plugin.

    add_action( 'wp_print_scripts', 'rkk_reply_threading_divi' );
    
    function rkk_reply_threading_divi() {
    
        if( function_exists( 'is_bbpress' ) && bbp_is_single_topic() && bbp_thread_replies() ) {
            wp_dequeue_script( 'divi-custom-script' );
        }
    }
    #167072
    nikhilnaik
    Participant

    Hello all,

    I wanted to seek help in modifying the following piece of code. I have a site with buddypress groups inside which I have bbpress forums for the respective groups. I want the users of the group to be automatically subscribed to the forums within that group. I tried the following code:

    add_filter( 'bbp_get_user_subscribe_link', 'invert_get_user_subscribe_link', 10, 4 ); //invert forum subscription
    add_filter( 'bbp_is_user_subscribed_to_forum', 'invert_is_user_subscribed_to_forum', 10, 4 ); //invert forum subscription
    add_filter( 'bbp_get_forum_subscribers', 'invert_get_forum_subscribers' ); //invert forum subscription
    add_filter( 'bbp_is_user_subscribed', 'invert_is_user_subscribed', 10, 4 ); //invert forum subscription
    
    function invert_is_user_subscribed($retval, $user_id, $object_id, $subscribed_ids) {
    	if (get_post_type( $object_id ) == bbp_get_forum_post_type())
    		return !$retval;
    	else	
    		return $retval;
    }
    
    function strContains($needle, $haystack) {
    	if (strpos($haystack, $needle) !== false) {
    		return true;
    	} else {
    		return false;
    	}
    }
    
    function invert_get_user_subscribe_link ($html, $r, $user_id, $topic_id) {
    	if (strContains( "bbp_unsubscribe", $html )) {
    		$html = str_replace("bbp_unsubscribe", "bbp_subscribe", $html);
    	} else {
    		$html = str_replace("bbp_subscribe", "bbp_unsubscribe", $html);
    	}
    	return $html;
    }
    
    function invert_get_forum_subscribers( $users ) {
    	$args = array('fields' => 'id');
    	$all_users = get_users($args);
    	$send_to_users    = array_diff($all_users, $users);
    	return $send_to_users;
    }
    
    function invert_is_user_subscribed_to_forum( $retval, $user_id, $forum_id, $subscribed_ids ) {
    	return !$retval;
    }
    

    But there is a problem. Using the following code leads to the user getting subscribed to all the forums of all the groups (even those which they aren’t a part of). I just want them to be automatically subscribed to those forum topics created inside the group which they are a part of. Kindly help me in getting this right.

    Thanks!

    #167062
    wpfundi
    Participant

    WP version: 4.3.1 multisite
    BuddyPress version: 2.3.3
    bbPress version: 2.5.8

    I have been trying to migrate BuddyPress legacy forums to bbPress following the instructions on this link https://codex.buddypress.org/getting-started/guides/migrating-from-old-forums-to-bbpress-2/

    But the migration/import is not going well, after the process:

    1) Topics are missing
    2) Replies are missing

    And during the process I can see “No topics to convert”, No replies to convert.

    When I check the database I can see wp_bb_topics etc.

    What am I doing wrong?

    Thank you in advance.

    #167059
    nikhilnaik
    Participant

    @casiepa, thanks for your response. I tried this:

    function user_subscriptions_count( $user_id = 1) {	
    	$forum_count = count(bbp_get_user_subscribed_forum_ids($user_id));	
    	echo  $forum_count;
    }

    but didn’t seem to work, could you assist in getting it right?

    #167054

    In reply to: Sidebar Help

    wesphily
    Participant

    This is the response I got from Nimva:

    Your code source and current page template might be generated using BBPress templates not by Nimva page templates. Try to edit that Forums page and see if it is possible change the current page template to Default page template under Page Attributes -> Templates. See if that does anything

    I think what they are asking me to do is create a page and put the forum index shortcode in it. Then they want me to try to adjust the page template to see if a sidebar shows up. This might work, but it would only work for the main index page. I don’t think this would work for every category/topic/ect.. unless I create shortcode pages for all of them.

    Can you all please advise?

    #167040
    thrivehau
    Participant

    I’m trying to follow https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/ step 6, and every time I make a “forums page” the permalink becomes “forums-2” and I can’t edit it to just “forums”, like there’s already a link with that “forums” even though I don’t have a “forums” page already.

    When I delete the forums-related pages, the mydomain.com/forums is still there.

    I tried the method 2 from the codex, but I do not like it as the Home > forums is there and when I click on forums, it takes me to a blank page.

    How do I fix this permalink issue?

    #167038
    nikhilnaik
    Participant

    Hello All,

    I am using a buddypress+bbpress intergrated site, hence the bbpress profiles are disabled. Only buddypress profiles are made visible because of which I can’t figure out which user is subscribed to which forum. Is there a function or a shortcode using which I can display on the user dashboard the topics/forums he is subscribed to?

    Thanks.

    #167036
    Robkk
    Moderator

    Hi Rob, it is my theme’s style sheet with changed colour code and it’s not styling.

    Did you try adding !important to see if that would work??

    The index was fine – I assume because I filled in description and it’s filled out. Specific board indexes don’t fill to 100% nor do thread pages without much written in the posts.

    Yes. Sorry my mistake. It might be that bbPress is inheriting different templates for archive and single pages. Try to check that by installing the What the File plugin and see what template is being inherited from the forum archive and single topic pages and see if it is different.

    #167035

    In reply to: Sidebar Help

    Robkk
    Moderator

    Do you want full width forums and just the sidebar placed under the forums??

    If you do remove this part of the CSS code.

    .bbpress .sidebar {
      width: 0;
      display: none;
    }

    i can tell you are also using a full width template from your theme, and of course that will hide the sidebar.

    #167033
    Robkk
    Moderator

    Right after this in the code.

    <?php echo do_shortcode("[bbp-login]"); ?>

    Just add any additional forms you want using similar code like this. Or just add any html links to the pages.

    <?php echo do_shortcode("[bbp-register]"); ?>

    If you need to style them better add a custom class around them.

    #167032
    mica123
    Participant

    Thank you so much both of you – that’s very helpful indeed. I will now have to try and position it on one line. I hope I’ll manage it although it is not easy at all – @dannyfoo you seem to have managed it. Is there any way to add Register and Lost password to the code? Many thanks – I was getting really desperate.

    #167031
    Robkk
    Moderator

    It is in loop-single-topic.php and loop-single-forum.php.

    In the files you will see something similar to this. In this example I am editing the loop-single-topic.php file.

    <span class="bbp-topic-freshness-author">
        <?php bbp_author_link( array( 'post_id' => bbp_get_topic_last_active_id(), 'size' => 14 ) ); ?></span>

    Change it to something like this. You see I just added the extra attribute. 'type' => 'avatar'

    <span class="bbp-topic-freshness-author">
    	<?php bbp_author_link( array( 
                    'post_id' => bbp_get_topic_last_active_id(), 
                    'size' => 14 , 
                    'type' => 'avatar'
                    ) );
           ?>
    </span>

    bbp_author_link

    #167030
    Robkk
    Moderator

    You can create a bbpress.php file in your theme to avoid issues like that.

    Getting Started in Modifying the Main bbPress Template

    #167029
    Robkk
    Moderator

    Place something like this in content-forum-archive.php if you copied it into your child theme to display the login form above the forum archive. You can also place it above single forums by adding this exact code into content-single-forum.php and for topics in content-single-topic.php.

    <?php if ( !is_user_logged_in() ) : ?>
    
        <div class="bbp-forum-login-form">
            <?php echo do_shortcode("[bbp-login]"); ?>
        </div>
    
    <?php endif; ?>
    #167028

    In reply to: Sidebar Help

    wesphily
    Participant

    Robkk,

    Thanks for that. It fixed the space issue. Now I have to figure out how to get a sidebar working.
    I have been trying to do this by going to the page labelled “forums” that has the index shortcode in it and then adding a sidebar that I have created. I then added widgets to that sidebar. I have also tried content aware and bbpress wp tweak. I still can’t get a sidebar to show on the bbpress page. I can get it to show on any other page.

    #167027
    Danny
    Participant

    @mica123 Placing the login form above on the main Forums page created in your WordPress is easy.

    1. Edit your WP page containing [bbp-forum-index]
    2. Include [bbp-login] above that line
    3. Update the page

    And the login form will show above your forum index.

    I’ve not fully experimented placing the login above all the forum pages. Though I think it’s very much possible, and the answer may lie in other forum topics.

    What I could share though is I tried adding <?php echo do_shortcode("[bbp-login]"); ?> to loop-forums.php and loop-topics.php but it didn’t work.

    What happened was the list of forums and topics disappeared.

    I hope this was helpful.

    #167021
    aaron2310
    Participant

    Place the CSS code I gave you your child themes stylesheet or in a separate custom css plugin.

    Hi Rob, it is my theme’s style sheet with changed colour code and it’s not styling.

    The /forums page looks fine now, now it is only the single forums pages. Clear any cache to see if that could fix anything.

    The index was fine – I assume because I filled in description and it’s filled out. Specific board indexes don’t fill to 100% nor do thread pages without much written in the posts.

    #167019
    project_subdomain
    Participant

    I’d like to display the count of all existing replies for one topic like
    “Topic name One (56)”
    where 56 is the amount of replies.

    Is bbp_forum_reply_count() correct for this?

    How could I get the count to a specific menu which had been created through the backend’s design->menu,
    when the menu ID is 2 and the menu item ID of Topic name One is 11 and of Topic name Two is 22?

    Many thanks for any help!

    #167014
    Robkk
    Moderator

    Did you try some troubleshooting first? Check to see if it works fine in a default theme. If it still does not work in a default theme, try to see if a plugin could be causing the issue also by doing the listed steps for troubleshooting a plugin issue.

    Plugin/Theme updates could cause an issue to pop up without it previously being there before.

    Troubleshooting

Viewing 25 results - 7,776 through 7,800 (of 32,519 total)
Skip to toolbar