Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,451 through 12,475 (of 32,521 total)
  • Author
    Search Results
  • #143556

    In reply to: Parent Forum ID #?

    Stephen Edgar
    Keymaster

    https://codex.bbpress.org/shortcodes/

    To get the required numerical ID for $forum_id, $topic_id, $reply_id and $tag_id you will need to visit your /wp-admin/ section and either by editing the post or by hovering your mouse over the applicable forum/topic/reply/tag post type you will see a numeric ID for that post eg. /wp-admin/post.php?post=47

    #143543
    Robin W
    Moderator

    it’s doable, but would need a large re-write of the widget code, so unless you want to dive into deep level code, I suspect that it will just look like that – sorry !

    #143539

    In reply to: What is it?

    Apokh
    Participant

    Solution found

    For Example to add the firstname from the WP User Info add
    <?php $user_info = get_userdata( bbp_get_reply_author_id() ); echo $user_info->first_name . "\n";?>
    in ‘loop-single-reply.php’ somewhere between Line 41 and 59.

    #143537
    Apokh
    Participant

    Okay for anyone, searching this

    For Example to add the firstname from the WP User Info add
    <?php $user_info = get_userdata( bbp_get_reply_author_id() ); echo $user_info->first_name . "\n";?>
    in ‘loop-single-reply.php’ somewhere between Line 41 and 59.

    #143530
    kvr28
    Participant

    Hello, I’m trying to add this shortcode at the bottom of my forum page template and am running into 2 issues, one is in the main forum and the topics it shows fine, if I’m in a sub forum directory it shows the sub forums most recent not the whole sites, second if I go past page 2 on the pagination I get 404 pages, any ideas? Thank you

    #143524
    Thaddeous
    Participant

    Thank you Stephen,
    I got the page to work now with the shortcodes, BUT the shortcodes don’t seem to be displaying what the description says they should be displaying. Backup first…. Here is what we am trying to do with BBPress: We are trying to create forums under specific categories. Sounds easy. We placed all forums under specific categories but this wasn’t quite displaying as we needed them to all on one page. We need them to display like this forum here: http://www.ultimate-guitar.com/forum/

    SO back to the shortcode problem. We cant get any of these forums to display a single forum. The shortcodes are displaying ALL forums no matter if we use single forums shortcodes or not.
    Shouldnt the below shortcodes display these five forum ids only and not ALL forums five times just with a reply form for the associated ID at the bottom?

    [bbp-single-forum id=239]
    [bbp-single-forum id=238]
    [bbp-single-forum id=237]
    [bbp-single-forum id=236]
    [bbp-single-forum id=235]

    Basically we are trying to split up these forums manually with the shortcodes just by displaying what forums we want (and we could separate them with a text box showing the category or something). So the question is, “What is the shortcode for only displaying one forum without a reply form”. This way we can input all forums and organize them how we wish. Make sense? Please help. 🙂

    #143521
    madman_18
    Participant

    Hey!

    Frist sorry for my english 🙂

    Well, i’m starting to use bbPress and have a problems to activate uploads img. I try with the GD bbPress Attachments but don’t works.

    I see the next code, but the button “Add Object” don’t works 🙁
    bbp_the_content( array( 'context' => 'reply','media_buttons',true ) );

    I’m use the last version to bbPress, 2.5.3

    Thanks for the help!

    #143513
    Stephen Edgar
    Keymaster

    Shortcode docs are here https://codex.bbpress.org/shortcodes/

    #143508

    In reply to: Order of Topics

    Stephen Edgar
    Keymaster

    This should work…

    function custom_bbp_has_topics() {
      $args['order'] = 'ASC'; // 'ASC' (Ascending), 'DESC' (Descending, Default)
      
      return $args;
    }
     
    add_filter('bbp_before_has_topics_parse_args', 'custom_bbp_has_topics' );
    
    Thaddeous
    Participant

    Having issue with our site pages and BBPress. We are using WP 3.8.1 and the latest version of BB Press.

    email: theig072@gmail.com
    site: http://www.fretbuzz.com
    site password: test12

    We want to customize our BB Press page (title, maybe input a button or two… who knows) BUT there is no actual BB Press page to customize? The forum seems to be automatically created upon install. Normally we can edit any page by selecting “edit page” at the top of the screen and in this case, there is no edit page button because the page doesn’t exist.
    Following? So the logical next step is to create the page right? Well… when we go to the backend of WP in the admin dashboard -> Settings -> Forums -> we read (about halfway down this page) this text:

    “Forum Root Slug – Customize your Forums root. Partner with a WordPress Page and use Shortcodes for more flexibility.”

    So we created a WP Page named forums. (http://www.fretbuzz.com/forums/) If this page is created then the forums appear until we edit anything. We cant select any option or input any text or the forums do not appear. So we deleted the page and the forums appear again. Then we created a separate WP page and labeled it test (http://www.fretbuzz.com/test/) and then moved the forum root slug to it, the forums again appear but If we again try to put any button shortcode or text or whatever in the page then nothing appears. So this begs the question…. What are the shortcodes BB Press talks about in the settings panel? How do we customize our BB Press Forums page?

    End goal = Create an actual page that hold the forum roots on which we can add a button or two (with maybe some text). With an actual page as the root slug, I have access to turn on or off options as well such as “ratings” and “Author Bio”, which is quite annoying on the forums currently.

    Our theme (DynamiX) has almost 9000 support members and this is what one of the support moderators said:

    “Hi Tad,
    I am not sure if this feature works correctly as I have tested it with DynamiX and the standard WP theme and they both have the same results. It must be a feature of BBPress that does not work properly.
    Tom”

    This cannot be so…. Any suggestions. Any help is highly coveted. 🙂

    #143504
    Robin W
    Moderator

    showing twice is the way bbpress likes doing it !

    You can turn off the forums root slug in settings>forums

    or play with this code

    Layout and functionality – Examples you can use

    Don’t know how the latter would work with your plugin

    #143502
    Robin W
    Moderator
    HorrorUK
    Participant

    Hi all,

    I’m trying to figure out how to get a specific forum to be shown on a page and to keep users on that page.

    I’m using the following shortcode:

    [bbp-single-forum id=9232]

    This does the job of showing the specific forum on the page, but it when a user posts a new topic or clicks on a topic to read it, it takes them to the bbPress page:

    /forums/topic/test-topic

    Is it possible to keep the user on that page throughout the process? I have different forums for separate members (using the Groups plugin), and would like to control who can see what from that single page.

    Thanks 🙂

    #143493
    Robin W
    Moderator

    looks good, have you tried it and does it work,

    If so I’ll add it to the codex

    #143490
    Robin W
    Moderator

    @star100

    Layout and functionality – Examples you can use

    no. 14 & 15


    @bob1nz

    Thanks, I’ve updated the codex, as I say it doesn’t like switching between visual and text, and alters the code if you do. Sop thanks again it should now read correctly

    #143489
    Gilles Vauvarin
    Participant

    Maybe better like this :

    add_action( 'bbp_template_before_single_forum' , 'xxxx_bbp_display_forum_description' );
    
    function xxxx_bbp_display_forum_description() {
    
        $display_forum_description = bbp_get_forum_content();
    
        if ( bbp_is_single_forum() && ! empty( $display_forum_description ) ) {
        
            echo '<div class="bbp-display-forum-description">';
            echo $display_forum_description;
            echo '</div>';
    
        }

    }

    #143488
    Apokh
    Participant

    Okay, one more try now 🙂

    There is one thing I want do do, so I have 2 questions according to that:

    1.) (how) is it possible (I guess it is) to get WP userdata for display in bbpress? Lets say the First Name of the WordPress User Information.
    Must be something get_userdata( <strong>bbpressuser</strong>) ?!

    2.) As I learned, the Userinfos (Avatar, Role etc) of the Reply must be somewhere in loop-single-topic.php – but I really don´t find it.

    Thanks in advance. Hope someone can help with that for the german forums (i´m from germany) are really dead :/

    Best regards
    Apokh

    #143485
    Gilles Vauvarin
    Participant

    I found this solution :

    add_action( 'bbp_template_before_single_forum' , 'xxxx_bbp_display_forum_description' );
    
    function xxxx_bbp_display_forum_description() {
        echo '<div>';
        bbp_forum_content();
        echo '</div>';
    }
    #143484

    In reply to: Fly-Fishing Site

    ZachMatthews
    Participant

    It’s a nice site; no worries about the ad, but I would be curious to see what that code does to an out of the box version of bbPress. It should get it pretty close; I just use a lot of ‘Inspect Element’ clicking to figure out what might be broken and tweak it. The main issue with bbPress and Pinboard is to do with the .onecol format, which for some reason is broken. Just an FYI, I’ve also modified the header.php file and the search.php file in Pinboard to move their built-in slider up to the utmost top of the page, so I can use it as a banner. It doesn’t quite work on my forums page, because that’s actually in a sub-category but in the blog section it slides. Just to explain why that may look different.

    One other thing of note: in building my site I did a multisite install with three different instances of Pinboard running different sections. This allows me to keep the (1) Board, (2) Blog/Gear Reviews/Podcasts/Videos, and (3) Photoblog separate. The photoblog has like 1700 images so I didn’t want those mixed in with general purpose posts, and in order to make the board work with the CSS tweaks above, I had to set it up as a multisite so I could configure the other sections differently, get away from a one column layout, etc. The good news is in a multi-site the user carries their logged in status and identity from section to section regardless of which blog they’re in.

    Zach

    #143479
    Kris35
    Participant

    Hi Robin, thanks for this and sorry for not thanking you sooner – I completely forgot…..oops!! My coder is trying to sort this out for me but it really isnt a simple task. If anyone else out tehre has managed to do this, please let me know and if I manage it, I will post how here.

    #143470
    kvr28
    Participant

    if the topic index shortcode would work in a widget, that would make me happy, I just tried it with a plugin, didn’t work so good

    #143465

    Topic: User Profiles

    in forum Themes
    NovaSev
    Participant

    I’m trying to figure out a few things – I’ve done a search and read through a couple dozen or so items without much luck.

    I’d like to incorporate some more info into the bbPress user profiles – I know I can probably do this using the $curauth params but want to make sure. I also want to make authors/contributors/etc link to the bbPress profiles as well. Is there a quick piece of code I can use to do this within my WordPress theme files?

    I have this function to return an author profile page when the name is clicked on:

    function new_comment_author_profile_link(){
    
        /* Get the comment author information */
        global $comment;
        $comment_ID = $comment->user_id;
        $author = get_comment_author( $comment_ID );
        $url    = get_comment_author_url( $comment_ID );
    
        /* Return the default WordPress comment author link if comment author is not
        a registered user */
        if ($comment_ID == 0){
            if ( empty( $url ) || 'http://' == $url )
                $return = $author;
            else
                $return = "<a href='$url' rel='' class='author-url'>$author</a>";
        } else {
        /* Return the link to the comment author's profile page if otherwise */
            $return = '<a href="'.home_url().'/?author='.$comment_ID.'">'.$author.'</a>';
        }
    
        return $return;
    }

    Can I plug in some line/piece of code to direct it to the bbPress profile instead? If so, what piece?

    Wordpress & bbPress are latest versions – website is http://www.novasev.com
    Appreciate the feedback.

    #143452

    In reply to: No toolbar available

    Liberty
    Participant

    I added the code and got an error message: Connection lost.

    #143449
    Bob1nz
    Participant

    hmm seems the formatting for that code in 14 is not quite right

    $bbp_roles['my_custom_role1'] = array(
    'name' => 'name 1',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
     
    );

    is => supposed to be => (just from other examples I’v seen in other posts)
    it also spat errors at me with the extra empty lines between the lines of code.

    Either way here is the code that works might be worth updating the codex thing

    function add_custom_role( $bbp_roles ) {
    
    $bbp_roles['my_custom_role1'] = array(
    'name' => 'name 1',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants 
    );
    $bbp_roles['my_custom_role2'] = array(
    'name' => 'name 2',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    );
    $bbp_roles['my_custom_role3'] = array(
    'name' => 'name 3',
    'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // the same capabilities as keymaster 
    );
    return $bbp_roles;
    }
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );

    Thanks heaps for your help 🙂
    Now to play around with this and the capabilities.

    #143448

    In reply to: No toolbar available

    Robin W
    Moderator

    Try it with the return added !

    function add_tiny() {
    bbp_get_the_content(array ( 		
    'tinymce' => true,
    ));
    Return $args ;
    }
    add_filter ('bbp_before_get_the_content_parse_args','add_tiny') ;
Viewing 25 results - 12,451 through 12,475 (of 32,521 total)
Skip to toolbar