Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 8,526 through 8,550 (of 32,505 total)
  • Author
    Search Results
  • #163213
    Robkk
    Moderator
    #163211

    In reply to: Mobile theme conflict

    Robkk
    Moderator

    Go through some troubleshooting steps.

    It might be a conflicting plugin so leave bbPress and Jetpack activated.

    Troubleshooting

    #163210
    Robkk
    Moderator

    @kenneston

    do you have a custom bbPress theme??
    because the forum description should show on the frontend

    the topic description does not show below the topic title like the forum description should do by default.

    All titles should show though.

    for the forum description make sure you have

    <div class="bbp-forum-content"><?php bbp_forum_content(); ?></div>

    in loop-single-forum.php

    #163209

    In reply to: Sidebar Issue

    Robkk
    Moderator

    Try some troubleshooting steps listed here.

    If they say the issue persists in a default theme , then it either is a plugin issue or just how you are trying to set up your forums.

    Troubleshooting

    #163205

    In reply to: Sidebar Issue

    Robkk
    Moderator

    This is caused because bbPress is rendering a certain template in your theme , this happens to be a template that is full width without a sidebar.

    Is your theme a premium theme or a free theme??

    If it is free, I can check it out and tell you what you need to do.

    If it is premium , the theme authors will have to help you as I cannot just buy a theme just to test it.

    see if this guide can help you though?? It tells you about modifying the main template , you can use this to put the sidebar back in.

    If you have any questions about it or suggested improvements please let me know.

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    #163202
    Robkk
    Moderator

    the forums shouldn’t show up in pages > all pages

    I am guessing you have put shortcodes in pages to do this.

    I guess if you want to keep putting shortcodes in pages , which will be time consuming , you can use the [bbp-forum-index] shortcode

    #163191
    nikhilnaik
    Participant

    I was thinking in lines of:

    $reply_count = bbp_get_user_reply_count_raw( $user_id);
    if($reply_count==0)
    echo "<span class='mycustom_new_label'>";
    echo "New";
    echo '</span>';

    Any help would be appreciated regarding how to go about doing it.

    nikhilnaik
    Participant

    Hello!

    I successfully implemented the code put up here – New Topics so as to show a new tag next to a topic in forum. But as per this link, the new tag will flash until 3 days. I would want to modify it such that the tag disappears once a user replies to the topic. Is there any function to get this functionality?

    Thanks!

    #163173
    Robin W
    Moderator

    The bbp-signature plugin is designed to work with bbpress not with buddypress, so it works fine – I’ve amended your original post to reflect that for future users in the first post to save them needing to read the whole thread.

    But the code wasn't too terrible

    General open software etiquette is not to insult other software authors, we are all at different levels and any software that works is useful 🙂

    The original author of this software is unable to continue supporting it, so I have access to it so that it can continue.

    I think it was made to work with buddypress groups whitout xprofiles yes. A simple update could fix that.

    If you’d care to suggest code that would make it work for users with and without buddypress, please contact me via my website, as I’d love to include it in the plugin

    http://www.rewweb.co.uk

    #163171

    In reply to: BBPress fullwidght

    PinkishHue
    Participant

    Your site is not available so I can’t have a look.

    If you’re using a custom theme with ‘theme options’ you need to look at the settings there to see if the default setting is with a sidebar, your forum will use this default page unless you create templates specially for it.

    Here’s some info on the templates that bbpress looks for in your theme:

    https://codex.bbpress.org/theme-compatibility/getting-started-in-modifying-the-main-bbpress-template/

    Usually using page.php in most themes, so you could try opening up your page.php, remove the code that includes a sidebar, then save it as bbpress.php

    PinkishHue
    Participant

    Please can someone advise how the code above could be used only if using the reply form within a certain forum? e.g Forum ID 20

    I’ve tried the following at a guess but it’s not working…

    add_filter( 'bbp_get_the_content', 'amend_reply', 10, 3);
    
    Function amend_reply ($output, $args, $post_content) {
    if ( bbp_is_single_forum('20') ) {
    if ($args['context'] == 'reply' && $post_content == '') $output=str_replace('></textarea>', 'placeholder="Reply..." ></textarea>',$output) ;
    return $output ;
    }
    }
    

    or

    add_filter( 'bbp_get_the_content', 'amend_reply', 10, 3);
    
    Function amend_reply ($output, $args, $post_content) {
    if ($args['context'] == 'reply' && $post_content == '' && bbp_is_single_forum('20') ) $output=str_replace('></textarea>', 'placeholder="Reply..." ></textarea>',$output) ;
    return $output ;
    }
    

    or the same but using ‘bbp_is_forum_archive()’

    Many thanks for any help anyone can give me.

    #163149
    PinkishHue
    Participant

    I was able to do this by adding this to my functions.php / custom plugin:

    
    // Add custom fields to bbpress topics on front end
    add_action ( 'bbp_theme_before_topic_form_content', 'bbp_extra_fields');
    function bbp_extra_fields() {
       $value = get_post_meta( bbp_get_topic_id(), 'YOUR-FIELD-NAME', true);
       echo '<label for="bbp_extra_field">My Extra Field:</label><br>';
       echo "<input type='text' name='YOUR-FIELD-NAME' value='".$value."'>";
    }
    
    //Save and update the values from the front end
    add_action ( 'bbp_new_topic', 'bbp_save_extra_fields', 10, 1 );
    add_action ( 'bbp_edit_topic', 'bbp_save_extra_fields', 10, 1 );
    
    function bbp_save_extra_fields($topic_id=0) {
      if (isset($_POST) && $_POST['YOUR-FIELD-NAME']!='')
        update_post_meta( $topic_id, 'YOUR-FIELD-NAME', $_POST['YOUR-FIELD-NAME'] );
        
    }
    

    I think that’s correct but am in a bit of a code-haze at the moment! Hopefully it puts you on the right track at least. (And I can’t remember where I got the original code so apologies for not crediting original author)

    #163148
    project_subdomain
    Participant

    Hi!
    When clicking through bbpress user pages (profile, edit profil, subscriptions etc..) the avatar and the user navigation will be displayed on the left side on all those pages by default.

    How can I remove avatar’s and user navigation’s div from all pages except the user’s profile home page to get more space?

    Tried this in user-details.php, did not work (blank screen):

    <?php if ( bbp_is_user_home() ){ ?>
    <div id="bbp-user-avatar">
    [...]
    </div>
    <div id="bbp-user-navigation">
    </div>
    }

    Thanks in advance!

    #163140
    project_subdomain
    Participant

    Hi!
    I ‘d like to change the meta titles (browser’s page title) for bbpress’ profile/user pages as it was not catched by the translation in my language.
    So far I tried this which does not work:

    function amend_title () 
    
    { elseif ( bbp_is_single_user() ) { 
    
    	if ( bbp_is_user_home() ) { 
    
    $new_title['text'] = esc_attr_x( 'Translation of Your Profile', 'User viewing his/her own profile', 'bbpress' ); 
    } 
    } else { 
    			$new_title['text'] = sprintf( esc_attr_x( "%s's", 'User viewing another users profile', 'bbpress' ), get_userdata( bbp_get_user_id() )->display_name ); 
    		} 
    
    if ( bbp_is_single_user_topics() ) { 
    			$new_title['format'] = esc_attr__( "%s Translation of topics",        'bbpress' ); 
    
    } elseif ( bbp_is_single_user_replies() ) { 
    			$new_title['format'] = esc_attr__( "%s Translation of replies",       'bbpress' ); 
    
    } elseif ( bbp_is_favorites() ) { 
    			$new_title['format'] = esc_attr__( "%s Translation of favorites",     'bbpress' ); 
    
    } elseif ( bbp_is_subscriptions() ) { 
    			$new_title['format'] = esc_attr__( "%s Translation of subscriptions", 'bbpress' ); 
    } else { 
    			$new_title['format'] = esc_attr__( "%s Translation of profile",       'bbpress' ); 
    		} 
    } elseif ( bbp_is_single_user_edit() ) { 
    if ( bbp_is_user_home_edit() ) { 
    			$new_title['text']   = esc_attr__( 'Translation of edit profile', 'bbpress' ); 
    } else { 
    			$new_title['text']   = get_userdata( bbp_get_user_id() )->display_name; 
    			$new_title['format'] = esc_attr__( "Translation of edit %s's profile", 'bbpress' ); 
    		} 
    
     return $new_title; 
    } 
    add_filter('bbp_before_title_parse_args', 'amend_title' ); 

    Any help is much appreciated!
    Thanks!

    Doctor Psyringe
    Participant

    I’ve provided negativity without solution to my silly issue;

    Unchecking “Prefix all forum content with the Forum Root slug (Recommended)” will remove that slug entirely from the forums listing. That will get the average user most of the way.

    Users with the issue I have running MultiSite – a feature with documentation – I changed the Forum Root to “forumroot” (instead of “Forums”). I then created a new Page called “Forums” and in the content placed “[bbp-forum-index]” – the forum index shortcode.

    Finally, go to Settings/Reading and change “Front page displays” to “A Static Page”. Select the “Forums” Page as the Front Page.

    You should now have “www.website.com/forum/forum/etc.” – although I changed my Single Forum Slug to “content”. So I have “www.website.com/forum/content/etc.”. Had I not made any changes it would have been “www.website.com/forum/forums/forum/etc.”. How redundant for trying to be advanced.

    In the end – “Forums” and “forumroot” are identical. Again suggesting it’s useless.

    *high five*

    #163130
    Robkk
    Moderator

    No you were trying to find this code as if it was already in your theme , I just showed you the original code so you could understand why it was causing the issue.

    But just place this CSS code where you would put custom CSS like what I already listed.

    You do not have to replace any code just add it as custom css

    #bbpress-forums .single_post a {
      font-size: 12px !important;
      margin-left: 0 !Important;
    }

    Since your bbPress forums look custom I can’t tell which is custom and what could be your theme so you would have to edit this code and replace the original code in the bbpress.css file if you want or just place it in some other custom css areas with !important after the width to help out.

    You can place the code in the bbpress.css file where you want , it is your site
    the two places i said would be better for beginners so that the code doesn’t conflict with the media queries.

    li.bbp-forum-topic-count,
    li.bbp-topic-voice-count,
    li.bbp-forum-reply-count,
    li.bbp-topic-reply-count {
    border: 0px none;
    width: 10% !important;
    margin-right: 20px !important;
    margin-top: 0px !important;
    }
    #163129
    stiffmeister12
    Participant

    Okay so if I am understanding this correct (sorry im still learning this stuff)
    for my themes style.css files you want me to find the code

    .single_post a {
    font-size: 14px ;
    margin-left: 0 ;
    }
    and replace it with

    #bbpress-forums .single_post a {
    font-size: 12px !important;
    margin-left: 0 !Important;
    }

    And for this code

    li.bbp-forum-topic-count,
    li.bbp-topic-voice-count,
    li.bbp-forum-reply-count,
    li.bbp-topic-reply-count {
    border: 0px none;
    width: 10% !important;
    margin-right: 20px !important;
    margin-top: 0px !important;
    }
    you want me to open up the bbpress.css and add it above the media queries or just at the top above the other css rules?

    #163127
    Robkk
    Moderator

    Your theme had something similar to this CSS

    .single_post a {
      font-size: 14px ;
      margin-left: 0 ;
    }

    So the new CSS I gave you would overwrite it only on bbPress forums.

    you can add it

    to your child themes style.css

    in a custom css plugin

    and you could add it to the bbpress.css file if you put it in your child theme in a folder called css somewhere above the media queries or just at the top above the other css rules.

    #163124
    stiffmeister12
    Participant

    I just checked my themes style.css and there is nothing with bbpress forums in it right now for some reason there is however css code in my responsive.css for bbpress forums

    #bbpress-forums .status-category li.bbp-in-forum-freshness {
    margin-left: 1px;
    width: 33.494% !important;

    #bbpress-forums .bbp-topics li.bbp-body ul.topic {
    border-bottom: medium none !important;
    border-left: 0 none !important;
    border-top: 2px solid #aaa !important;
    box-shadow: 1px 1px 0.5px 0 rgb(221, 221, 221);

    #163123
    stiffmeister12
    Participant

    thank you for the reply now where would this code go in the bbpress style.css? can it go directly at the end? Or am i editing the code? same goes for the themes style.css. thanks

    Robkk
    Moderator

    @rashedfoundation

    Also, small second question. It happens often that I’m on a site that I *think* I’ve registered on, but haven’t. If someone enters a login that is not correct AND that username doesn’t currently exist, is there a way to redirect to the registration page WITH that username?

    So, for example, I type in username: MyFaveUser pw: 1234, and it doesn’t exist in my user table, so the user is redirected to “Hey, MyFaveUser doesn’t exist, but you can register with it! It’s available!” and then autofill the username field with MyFaveUser and leave the pw field blank?

    This is some custom development , I suggest you hire a developer if you need help.

    As for the login shortcode issue , it might be best for you to link to the default WordPress login page if you are experiencing issue with it. Or just use a better front-end authentication plugin.

    #163112
    Robkk
    Moderator

    This seems very custom , looks pretty good though

    The bbPress forum header labels have certain widths to them. So this is the CSS you might want to adjust.

    li.bbp-forum-topic-count, 
    li.bbp-topic-voice-count, 
    li.bbp-forum-reply-count, 
    li.bbp-topic-reply-count {
      border: 0px none;
      width: 10% !important;
      margin-right: 20px !important;
      margin-top: 0px !important;
    }

    It might look shifted because you are trying to make your forums look more table like.

    The username being shifted is because of some CSS from your theme being added into bbPress.

    This custom css might help.

    #bbpress-forums .single_post a {
      font-size: 12px !important;
      margin-left: 0 !Important;
    }
    #163110
    stiffmeister12
    Participant

    So I am using a custom theme for my site and when I integrated bbpress into my theme the alignment is just off for some reason. On the home page the top bar is a little miss aligned where it says “topics” and “posts” Link – http://dailymut.com/dailymut-forums/

    When I go into a topic the alignment is really off under “topic” and a part of background is missing under “voices” “posts” and “freshness”. And There is a random circle over the “voices” text for some reason. Link – http://dailymut.com/forums/forum/madden/mut-player-reviews/

    Finally when I go into the Topic The picture is not aligned with the username and the text box looks off as well.

    I have tried to change the style.css and I have tried to change the bbpress CSS and nothing has worked maybe im imputing the wrong code or maybe im not in putting it correctly. Either way if anyone can check it out and see what the problem is and could tell me what code to input and where specifically to put it that would be greatly appreciated.

    #163109
    Robkk
    Moderator

    I don’t think that you can exclude forums with the shortcode.

    You could allow your group forums to have a parent forum so that they do not all show up on the forum arhive.

    • go setting > forums
    • scroll all the way down to BuddyPress Integration
    • Now select the group forums to have a parent forum from the drop down list.
    #163094
    Luis Fatorbinario
    Participant

    Can someone please post the link here. I only opted by bbPress over other options because I saw this nice sidebar in this forum.

    And if you guys implement the code as a plugin or something bbPress would have many more installs.

Viewing 25 results - 8,526 through 8,550 (of 32,505 total)
Skip to toolbar