Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,826 through 2,850 (of 32,492 total)
  • Author
    Search Results
  • #210868
    Robin W
    Moderator
    #210866
    Robin W
    Moderator
    #210860
    Robin W
    Moderator

    make forums private to make them visible to users only

    use shortcode

    [bbp-register]

    or anything in WordPress that does registration – bbpress just uses WordPress registration

    #210854
    Robin W
    Moderator

    I believe this is it

    https://bbpress.org/feed/?post_type=topic/

    but come back and confirm

    #210846
    Robin W
    Moderator

    thanks,

    this will add throttle to the participant role

    Put this in your child theme’s function file – or use

    Code Snippets

    add_filter( 'bbp_get_caps_for_role', 'brandi_role_caps_filter', 10, 2 );
    
    function brandi_role_caps_filter( $caps, $role )
    {
        /* Only filter for roles we are interested in! */
        if( $role == 'bbp_participant' )
            $caps['throttle'] = true ;
         return $caps;
    }
    David13_13
    Participant

    Hey!

    I’ve been trying several codes but I can’t get what I want.

    I just simply need a rss URL that shows recent topics in all forums but not their replies. Is that possible?

    Thanks

    #210838
    Robin W
    Moderator

    bbp_get_topic_forum_id

    #210835
    Robin W
    Moderator

    I used to take part in the European Tall Ships races in the 1980’s – so recognise the logo! many happy memories.

    start by reading

    Step by step guide to setting up a bbPress forum – Part 1

    Section 8 is the bit to read

    #210808
    robertherold
    Participant

    Hello,

    I use add_theme_support ('title-tag'); and the <title></title> does not show the user’s name if I am on their profile.

    Has anyone ever experienced this?

    #210805

    In reply to: subforum parent name

    Robin W
    Moderator

    change

    $forum = bbp_forum_id() ;

    to

    $forum = bbp_get_forum_id() ;

    #210801

    In reply to: subforum parent name

    momomoko
    Participant

    Thank you dear for your quick reply ; i copy/past the loop single forum file into my child theme root (what i did is the good way to do that ?) , then i added your script like this :

    <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>"> 
    <?php $forum = bbp_forum_id();  
    $parent = wp_get_post_parent_id($forum);
    if (!empty($parent)) {
       echo esc_html( get_the_title($parent) ) ;
       } 
       ?> : <?php bbp_forum_title(); ?></a>

    The result is that i got the id forum behind each forum title (on the main parents forums list) and on the subforum list (when i click on a forum on the forums list), i got the subforum id attached to parent title : subforum title

    #210790

    In reply to: subforum parent name

    Robin W
    Moderator

    untested but try

    $forum = bbp_forum_id() ;
    $parent = wp_get_post_parent_id($forum) ;
    if (!empty($parent)) {
     echo esc_html( get_the_title($parent) ) ;
    }
    alekspayne
    Participant

    How can I fix the dubbing of responses and topics in the activity filter in some templates in bbpress 2.6.4?

                    <select id="activity-filter-by">
                        <option value="-1">— Everything —</option>
    
                        <option value="new_member">New Members</option>
    <option value="updated_profile">Profile Updates</option>
    <option value="activity_update">Updates</option>
    <option value="bbp_topic_create">Topics</option>
    <option value="bbp_reply_create">Replies</option>
    
            <option value="bbp_topic_create">Topics</option>
            <option value="bbp_reply_create">Replies</option>
    
                    </select>
    ashifahmed
    Participant

    I am using the bbPress forum on my Android Blog (Droidfeats forum) but unable to get the breadcrumbs as I don’t use the Yoast Breadcrumbs feature.

    I tried to search in this forum several times but unable to get any custom breadcrumbs plugin specific to bbPress forum pages.

    Why I don’t use Yoast breadcrumbs is because it’s for the entire site. I don’t want breadcrumbs over the whole site’s post because it destroys my site layout and ad positioning. But I only want them on my forum pages and topics.

    Is there any way to get it? Or any code to implement on Snippets?

    Chuckie
    Participant

    I was told that :

    https%3A%2F%2Fwww.publictalksoftware.co.uk%2Fxxx%2F%3Ftopic%3Dthis-is-a-test%26paged%3D3%23post-5572

    is not a very “pretty” link. I don’t rightly know. But how is this url created? Does bbPress format it like this?

    I tried deactivating everything except bbpress and the links were still like that.

    In short, is this by design?

    #210706
    Robin W
    Moderator

    no I can’t – you would need code to create the ability to upload a csv file into bbpress – and that is beyond free help

    #210690
    Robin W
    Moderator

    newer versions of php no longer like that code – use this

    add_filter( 'bbp_get_user_edit_profile_url', 'rew_redirect');
    
    function rew_redirect () {
    $url = 'https://www.facebook.com/' ;
    return $url ;
    }
    #210688
    David13_13
    Participant

    Hey!

    I’ve used this code in my child theme functions.php:

    add_filter( 'bbp_get_user_edit_profile_url', 'http://example.com');
    

    But it doesnt work, if I now click “Edit” it does nothing instead of go to example.com

    Thanks

    #210680
    Ellis Benus
    Participant

    I did something very similar to what you suggested. I hadn’t found the ‘bbp_new_reply_post_extras’ action so I tied it into wp_insert_post.

    I added a drop-menu/select field inside form-reply.php which I’m able to then access the data through the $_POST['d20_char'] variable in the wp_insert_post action.

    I’m populating that select box by simply running a wp_query and selecting all the CPT Characters and populating them. I will eventually limit that list of Characters based on a User’s role, and who the author of the Character is. DMs can post as Player’s Characters, and players can post as more than 1 character. (I’m not sure yet how I’m going to allow other people to use the website with their players and character lists, but I’ll cross that bridge some day in the future)

    Below is the really rudimentary version of my code. I will be adding a $post->post-type check to make sure I will then only the run code if a reply is being created, and also a check to make sure the POST data I’m looking for is present.

    function rpg_bbp_new_topic_handler( $post_id , $post , $update ) {
    	
    	update_post_meta( $post_id , 'd20_char' , $_POST['d20_char'] );
    	
    } add_action( 'wp_insert_post', 'rpg_bbp_new_topic_handler', 10, 3 );
    #210673
    Robin W
    Moderator

    I did some thinking around this last night.

    Basically bbpress looks for an author ID in the posts table.

    Now there’s a hook in the topic/reply handlers (topic for topics, reply for replies, so they mirror) after a topic/reply is created.

    do_action( ‘bbp_new_reply_post_extras’, $reply_id );

    so if each of your characters has a WordPress user ID, then you could just hook to this, and change the post author to the worpress user ID.

    so say

    add_action ('bbp_new_reply_post_extras' , 'your function') ;
    
    function your_function ($reply_id) {
    $id = [either use the $_POST if still available and maybe have the value as the WordPress user ID , or get_post_meta for d20_character in the reply_id and do a look up to translate value to WordPress user ID]
    $my_post = array(
          'ID'           =>$reply_id,
          'post_author'   => $id,
          );
     
    // Update the post into the database
      wp_update_post( $my_post );
    
    }

    that way each topic/reply has a real author that happens to be your character chosen in the topic/reply form.
    that would save a ton of coding in the output, and risk of missing one and exposing the real user.

    #210639
    Robin W
    Moderator

    nothing exists as far as I know. Like everything it could be coded, but beyond free help.

    Robin W
    Moderator

    ok, this may or may nogt work

    can you download this file

    RSS Test

    and then open it and paste the contents into code snippets ion the php/code section

    then let me know if it does anything (at all!!)

    Robin W
    Moderator

    ok, let me play with some code and come back

    Lars Henriksen
    Participant

    Hi Robin

    Thanks for answering.
    If ‘technical’ means able to fiddle with readymade code snippets, then yes.
    If it means actual coding skills, the no 🙂

    Lars

    #210592

    In reply to: removing the sidebar

    Robin W
    Moderator

    one of the most annoying things in bbpress and a regular topic !

    Step by step guide to setting up a bbPress forum – Part 1

    item 8 is your starting point

    come back if you need further help

Viewing 25 results - 2,826 through 2,850 (of 32,492 total)
Skip to toolbar