Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 8,876 through 8,900 (of 32,519 total)
  • Author
    Search Results
  • #161700
    Robkk
    Moderator

    spammers are loving your topic

    usually creating a bbpress.php from a copy of page.php or sometimes single.php and removing unwanted code for comments and blog specific content would fix most theme problems.

    follow this guide on creating a bbpress.php

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

    contact your theme author too since this is a premium theme, and that i cant be more hands on and look at the code of your theme without buying it.

    need more help on this reply back.

    #161696
    kruglikov
    Participant

    I have old version 2.2.4 of bbpress installed on our site.
    I have to use old version because already for a long time have problem that
    if I update the plug-in forums page breaks!
    From forums/ page disappears forums list but all subpages like forums and topics are working and I can access them in browser.

    Forums page is created with Method 1 here https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/#method-1

    I spent a whole day trying to find out what’s wrong with newer version but could not find the reason why Forums page disappeared.

    Please help!

    P.S. I found that forums/ page is registered when forum post type registration happened, but I could not find out where exactly in bbpress code forums page template is plased. Could anyoone at least help me with that?

    #161692
    j0n4h
    Participant

    I posted a bunch of images of examples that I thought would be useful, however the anti-spam tool this forum is using chose to delete my post. That being said, @robkk , these options:

    • Icons for Subcategories that help to differentiate between subcategories – simple css
    • “New” icons for new posts – show icon from date of creation.
    • “Sticky” icons for stickied posts – simple css
    • “Hot” icons for posts that are popular -show the label when a reply level hits

    Would be tremendously useful for me, and though you claim they would be easy to implement, have thwarted me so far. I tried to create a post about it, however apparently the excess of example links deemed it un-postable as dictated by the anti-spam tool.

    I’ve searched for the answer and found this:

    .bbp-forum-34 i:before {
      content: "\e112"; /* glyphicons_ */
    }

    but I’m trying to complete using Font Awesome icons, so I’d imagine I’d have to try:

    .bbp-forum-1168 i:before {
      font-family: FontAwesome;
       content: "\f095";
    }

    however, I have no idea where to pass this into. And I’m also not sure if this is appropriately how you use Font Awesome as read by CSS.

    #161686
    Stephen Edgar
    Keymaster

    I’ve been thinking much about what is mentioned here of late…

    For now, check out some of the plugins on this page https://codex.bbpress.org/feature-plugins-tracking/

    p.s. Post counts will ship with bbPress 2.6, so that is one removed from that list.

    #161679
    majecdad
    Participant

    Hi all,

    I’ve continued to test this with both the capabilities plugin from @johnjamesjacoby as well as some nice custom code to create an entire new bbp role from @robin-w … to no avail. In neither case can I get a bbp user to see private posts unless they can see hidden ones too (or if I make the forum ‘public’).

    Might this be related to my usage of ‘sub-forums’?

    I’m working hard to try different things to figure it out. Can anyone point me in a direction that might resolve?

    Thanks.

    #161678
    novicechess
    Participant

    I believe the left shifting aspect of the posts is the default, but centering my home page and play page posts involved adjusting those specific page dimensions. It seems as though something in the bbforum code is conflicting with the left-shifting aspect of the twenty fourteen theme.

    #161674
    j0n4h
    Participant

    More functionality without plugins and options to change certain aesthetics would be, in my opinion, pretty routine for a forum codex.

    Now I realize that these options are all viable in bbpress, however, not everyone has the time necessary to learn how to implement these things themselves. Many of these things I already have in my forums, but now without extensive research in addition to plugins designed to enable such desired functionality. The thing is, though, should I really need a plugin to allow for signatures or post count?

    If you’re interested, this is a list I would recommend for bbpress to be more competitive out of the box and more user friendly:

    Out-of-the-Box Recommendations:


    Functionality:

    • Ability to Rename bbpress specific vernacular (IE “Last Post” in place of “Freshness”)
    • Posts Count & Join Date Under Username
    • Ability to Change Default Titles & Permissions for Usernames
    • Icons for Subcategories that help to differentiate between subcategories & also dictate if there are “new” or “unread” posts in certain categories
    • “New” icons for new posts
    • “Sticky” icons for stickied posts
    • “Poll” icons for posts containing polls
    • “Hot” icons for posts that are popular
    • Sort Forum by Recently Updated, Most Replies, Most Viewed, Etc.
    • Attachments
    • Private Responses
    • “Like” button
    • Signatures
    • Ability to “Quote” users
    • Basic editor for responses including format help
    • “Report” Option

    Aesthetic:

    • Different color names or title icons for easy recognition between staff & general members
    • Option to change colors of backgrounds to differentiate between posts or headers and posts
    • Format Categories vs SubCategories in Traditional Forum Style

    I also completely understand this may not be within the parameters that the bbpress developers have in mind for this product. They may only be interested in providing the foundation for such things, though without these features, this product is not a feasible option for a comprehensive community forum project for a layman such as myself.

    Robby McCullough
    Participant

    Hey all. I wanted to follow up on this in case anyone finds this through searching..

    We found out it was the bbPress Private Replies plugin that was causing this on our setup. This plugin overrides the subscription emails, and it uses it’s own code (that doesn’t remove the www) to generate the noreply email address.

    I am planning to submit a pull request, but you can cowboy code it and fix with this change:

    In bbp-private-replies.php on line 250 use this code:

    $do_not_reply = '<' . bbp_get_do_not_reply_address() . '>';

    #161666
    Estellka
    Participant

    ok thank you. It would be nice to have such a shortcode

    #161658
    CreativeWP
    Participant

    I am working on this website, I added this code (below) to have the profile redirect to our dashboard using WPML. The nav however is out of order, and I do not know how to arrange this nav.

    So we have Home | About us | Logout | Profile

    The profile is added by the code in the function.php (below), which means it is not arranged by the menu section on the WP. I have a conditional navigation. So when not login, I got Register | Login only. Once I login I have Home | About us |

    So the logout and the profile are added by the code below. How do I arrange it that the logout will be at the end?

    
    	add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) {
        if (!is_user_logged_in())
            return $menu;
        else
            $current_user = wp_get_current_user();
            $user=$current_user->user_login ;
            $profilelink = '<li><a href="' . bp_loggedin_user_domain( '/dashboard' ) . '">' . __('Profile') . '</a></li>';
            $menu = $menu . $profilelink;
            return $menu;
     
    }
    

    Please and thank you,

    #161657
    Henrijs Kons
    Participant

    Tryed repairing forums didnt help. Mybe it is coded so closed topics are excluded from topic query?

    #161611
    Robkk
    Moderator

    since it has this at the end […], which usually is from your theme thinking this page paragraph is a blog post , yes it is a theme issue.

    create a bbpress.php from a copy of page.php or single.php and remove unwanted code that might be affecting your layout.

    this guide will help.

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

    need more help contact the theme author too.

    #161610
    Robkk
    Moderator

    read this to enable the visual editor and also show the buttons from tinymce advanced.

    Enable Visual Editor

    as to your + New button, i dont know how to help with that , if you already created it maybe add a conditional to the function to only show it to Admins/Mods , but im not sure.

    #161605
    muddyfeet
    Participant

    Hi guys,

    I’ve encountered an issue in BBPress 2.5.7 running the Porto theme. Most of the BBPress pages display perfectly fine, however on the user profile pages and the forum details page (which contains number of posts etc.) there is no formatting on any of the text, and viewing the source code shows no HTML tags, it just looks like this:

    Profile Topics Started Replies Created Favorites Subscriptions Edit Profile Forum Role: Participant Topics Started: 1 Replies Created: 0

    Similarly, the forum details page contains just this text:

    Search for: Home › Forums Viewing 5 topics – 1 through 5 (of 5 total) Topic Voices Posts Freshness Happiness and its effect Started by: Mrs Davis in: Member Forum 2 3 1 week, 6 days ago Maria My Needs Started by: rachael in: Member Forum 2 2 1 week, 6 days ago Mary […]

    I have read that this might be a theme issue, but we’re not sure what we can actually do to fix it?

    Thanks

    #161602

    In reply to: Slow to Post

    daniellajos.nl
    Participant

    For our site, with 121 forums, +150k topics and +1.1m replies, it could take up 30s before something is posted. I traced it down to this query:

    
            //$voices = $wpdb->get_col( $wpdb->prepare( "SELECT COUNT( DISTINCT post_author ) FROM {$wpdb->posts} WHERE ( post_parent = %d AND post_status = '%s' AND post_type = '%s' ) OR ( ID = %d AND post_type = '%s' );", $topic_id, bbp_get_public_status_id(), bbp_get_reply_post_type(), $topic_id, bbp_get_topic_post_type() ) );
    

    includes/topics/functions.php, line 2610. It uses an OR clause, and MySQL (only in 5.1.73?) isn’t able to use an index anymore after a certain amount of records in the wp_posts table. I replaced the query with an UNION statement, and it executes much faster now, since it is using indexes again (as the EXPLAIN statements show me on a database with and without this amount of replies/topics):

    
            $unionQuery = "SELECT COUNT( DISTINCT post_author )
                FROM (
                    SELECT post_author
                    FROM {$wpdb->posts}
                    WHERE post_parent = %d AND post_status = '%s' AND post_type = '%s'
                  UNION
                    SELECT post_author
                    FROM {$wpdb->posts}
                    WHERE ID = %d AND post_type = '%s'
                  ) AS alias;";
        $voices = $wpdb->get_col( $wpdb->prepare( $unionQuery, $topic_id, bbp_get_public_status_id(), bbp_get_reply_post_type(), $topic_id, bbp_get_topic_post_type() ) );
    
    #161601
    Estellka
    Participant

    Hello there!
    I would like to understand the difference between

    [bbp-search] – Display the search input form.
    [bbp-search-form] – Display the search form template.

    I tried both of the shortcodes and they gave the same result, and my english is not good enough for me to understand the difference by reading the description. So please help.

    and I have the same question for

    [bbp-reply-form] – Display the ‘New Reply’ form.
    [bbp-single-reply id=$reply_id] – Display a single reply eg. [bbp-single-reply id=32768]

    and for

    [bbp-topic-form] – Display the ‘New Topic’ form where you can choose from a drop down menu the forum that this topic is to be associated with.
    [bbp-topic-form forum_id=$forum_id] – Display the ‘New Topic Form’ for a specific forum ID.
    [bbp-single-topic id=$topic_id] – Display a single topic. eg. [bbp-single-topic id=4096]

    and for

    [bbp-forum-form] – Display the ‘New Forum’ form.
    [bbp-single-forum id=$forum_id] – Display a single forums topics. eg. [bbp-single-forum id=32]

    thank you for your answers!

    #161597
    Estellka
    Participant

    Hello everyone,
    first, I would like to apologize if my writting is not very good, but I’m french and I’m not used in english phrases. And that’s why I dont’ understand some explainations on the blog. so please be soft with me.

    I would like to create a page wich gives a view of the last replies of my forum. I tried to create a new page with the short code [bbp-single-view id="last-replies"] but it does’n work when I clik on that page I have a notice “Aucun sujet n’a été trouvé ici!” which means “no topic has been found here!”

    I have others questions about short-codes meaning, but I’m going to ask it in another topics.

    thanks for your answers.

    here my forum: http://revonssavons.fr/WordPress/forums/Forum/accueil/

    Robert.S
    Participant

    Thanks a bunch for the code, both @robkk and @undergroundnetwork!

    I’m running Avada theme, with latest WordPress 4.2.1 and BBPress 2.5.7 and this works perfectly.

    Seems like this *should* be an option in WordPress when BBPress is installed: “Check the box to include Forum Topics and Replies in the sitewide search”. Would be a helpful addition.

    Luckily we have this resource, so thanks again for the code snippets.

    #161572
    Henrijs Kons
    Participant

    Ok yet again found solution on my own.

    Existing script was almost valid, problem was that author had hard coded table prefixes which I changed to use prefixes from WP configuration, now it works like I wanted.

    And here I posted my edited script for other user use http://pastebin.com/ANBwipYR

    #161570
    Piroglu
    Participant

    Hello,
    I want to show the most recent reply on my home page but when I try to make it with the widget I can only see the related topic name, not reply.

    I am using Enfold theme and I repaired the forum one by one but couldn’t success.
    I checked all forum pages, any help will be very much appreciated.

    http://myboxtr.com

    I am getting;

    Piroglu on I don t want to see the topic name here
    30 minutes ago

    I want to see;

    Piroglu on This is my reply for this topic
    30 minutes ago
    #161558
    23creative
    Participant

    Also in form-reply.php & form-topic.php template files (around line 68ish) you need to insert the following code. i would recommend setting up template overrides for this

    <?php if ( bbp_allow_topic_tags() && current_user_can( 'assign_topic_tags' ) ) : ?>
    
            <?php do_action( 'bbp_theme_before_reply_form_tags' ); ?>
            <p>
                <label for="bbp_topic_tags"><?php _e( 'Tags:', 'bbpress' ); ?></label><br />
                <?php  echo displayTagElements(bbp_get_form_topic_tags(), bbp_get_user_role(get_current_user_id()), 'edit'); ?>
            </p>
    
            <?php do_action( 'bbp_theme_after_reply_form_tags' ); ?>
    
    <?php endif; ?>
    #161557
    23creative
    Participant

    you’re welcome mate. my code actually changed quite a bit form what I posted here. the tag list is pulled from wp-admin > Topics > Topic tags

    updated code below

    //change the seclected terms to string and return
    function restrict_topic_tags( $terms, $topic_id, $reply_id ) {
        if(isset($_POST['bbp_topic_tags'])){
            $bbp_topic_tags = filter_input(INPUT_POST, 'bbp_topic_tags', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
            return returnFormattedTags($bbp_topic_tags, $topic_id);
        }else{
            return $terms;
        }   
    }
    add_filter( 'bbp_new_reply_pre_set_terms', 'restrict_topic_tags' );
    
    //change the seclected terms to string and return
    function restrict_new_topic_tags( $topic_data ) {
       //$bbp_topic_tags = $data   = filter_input(INPUT_POST, 'bbp_topic_tags', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
       if(isset($_POST['bbp_topic_tags'])){
            $bbp_topic_tags = filter_input(INPUT_POST, 'bbp_topic_tags', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
            $topic_data['tax_input'] = array('topic-tag'=>checkTags($bbp_topic_tags)); 
       }
       return $topic_data;
    }
    add_filter( 'bbp_new_topic_pre_insert', 'restrict_new_topic_tags' );
    
    //change return the correct tag on a form error submission, we might need to go through the spam check here. But lets see how this goes
    function loadPostTagArray( $topic_tags ) {
       if( $topic_tags == 'Array'){
            if ( bbp_is_post_request() && isset( $_POST['bbp_topic_tags'] ) ) {
                $bbp_topic_tags = filter_input(INPUT_POST, 'bbp_topic_tags', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
                $topic_tags = returnFormattedTags($bbp_topic_tags); 
            }
       } 
       return $topic_tags;
    }
    add_filter( 'bbp_get_form_topic_tags', 'loadPostTagArray' );
    
    function returnFormattedTags($topicTags){
        foreach ($topicTags as $key => $topicTag){
          if($key > 0) $terms .= ', ';
          $terms .= esc_attr( strip_tags( $topicTag ) );
        }
       return $terms;
    }
    
    function checkTags($selectedTags){
        $tags = get_categories( array('hide_empty'=> 0,'taxonomy' => 'topic-tag'));
        $toReturn = array();
        foreach($tags as $tag){
            if (in_array($tag->name, $selectedTags)) {
               $toReturn[] = $tag->name;
            }
        }
        return $toReturn;
    }
    
    function displayTagElements($selectedTags, $userRole, $task){
        $html = array();
        $tags = get_categories( array('hide_empty'=> 0,'taxonomy' => 'topic-tag'));
        $selectedTagsArray = explode(', ', $selectedTags);
        if($userRole != 'bbp_participant' || $task != 'edit'){    
            $html[] = '<select class="chzn-select" multiple="multiple" name="bbp_topic_tags[]" id="bbp_topic_tags">';
                foreach($tags as $tag){
                    $selected = '';
                    if (in_array($tag->name, $selectedTagsArray)) {
                       $selected = 'selected="selected"';
                    }
                    $html[] = '<option '.$selected.' value="'.$tag->name.'">'.$tag->name.'</option>';
                }
            $html[] = '</select>';
        }else{
            $html[] = $selectedTags;
        }
        return implode('',$html);
    }
    #161552
    Nicolas Korobochkin
    Participant

    Hi. The ending / (trailing slash?) added automaticly if you setup something like /news/%POST_ID%/ on the WordPress permalinks page. And not be added if no slash at the end — /news/%POST_ID%. This works because I use user_trailingslashit() inside the code.

    BuddyPress group forums not supported yet. Something hardcoded inside and I not find the solution to this issue right now but I keep digging. 🙂

    Master
    Participant

    i find just remowe 'show_none' => __( '(No Forum)', 'bbpress' ), from form-topic.php

    #161547
    tylersoden
    Participant

    If anyone stumbles upon this thread and is interested in a css solution, here is the code I use. It goes in the ‘Appearance’ -> ‘Editor’ section on the wordpress control panel or in ‘~/<your theme folder>/style.css’:

    .bbp-template-notice.info { display: none; }

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