Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 5,701 through 5,725 (of 32,518 total)
  • Author
    Search Results
  • #179875

    In reply to: Sort topics in a Forum

    Robin W
    Moderator

    date order:

    put this in your functions fil :

    function rew_date_topic_order( $args ) {
                    $args['orderby']='date';
                    $args['order']='DESC';  //change to ASC to put oldest at top
                    return $args;
    }
    add_filter('bbp_before_has_topics_parse_args','rew_date_topic_order');

    Functions files and child themes – explained !

    #179869

    In reply to: Prefix Recommendation

    yikesitskevin
    Participant

    Hi @deall & @robin-w,

    I found this topic by googling around because I am having an issue and I think my issue is the reason this Prefix all forum content with the Forum Root slug (Recommended) option is recommended. If you don’t prefix, you can run into URL conflict issues. For example, if your forum is on your homepage, and there is no prefix, your pagination links will be something like www.{your_site_url}.com/page/2. The problem is www.{your_site_url}.com/page may be one of your pages. Obviously you could also have a page named ‘forums’, but it’s much less likely.

    Does this explanation sound correct?

    Pascal Casier
    Moderator

    Hi Bruce,
    To change the breadcrumbs have a look here: https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/#4-turning-off-or-changing-breadcrumbs

    If you don’t want to do it yourself, check out plugins like ‘bbP Toolkit’ where you should be able to configure it.

    Pascal.

    Bruce
    Participant

    I found the answer here

    #179839
    BenM
    Participant

    Hi,

    If I copy/paste html content to topic content, all html tag appears in text, all quotes are converted to french quotes and content can overflow screenshot (link to full image)

    I try this below but It doens’t change anything !

    remove_filter( 'bbp_get_reply_content', 'wptexturize' , 3);
    remove_filter( 'bbp_get_topic_content', 'wptexturize', 3);

    I remove ALL plugins and I erase functions.php !

    I also try this :

    function bbp_tinymce_paste_plain_text( $plugins = array() ) {
        $plugins[] = 'paste';
        return $plugins;
    }
    add_filter( 'bbp_get_tiny_mce_plugins', 'bbp_tinymce_paste_plain_text' );

    even if I want to permit copy/paste of (filtered) html, just to try, but it doesn’t make any change.

    Do you have an idea of what happens?
    Thanks.

    #179838
    Chad R. Schulz
    Participant

    A much appreciated restructuring.

    This simplifies a lot by renaming the core roles from within both front-end and back-end user role editors.

    Love learning new code/tricks.

    Thanks,
    Chad

    inderdeepbajwa
    Participant

    I have the latest 4.7 version of WordPress and installed the latest bbPress plugin (updated 4 days ago).

    When I click on Forums->All forums, in the WP Dashboard, it shows me a full white blank page. Upon typing website.com/forums, it shows a blank page. The newly created forum link website.com/forums/forum/forum is also completely blank. I’ve tried this on two themes – Twenty Sixteen and Twenty Seventeen. Both showed blank page.

    I tried creating a new page and pasting [bbp-forum-index] but that gave me the following code as the result:
    {{ partial “head.html” . }}
    {{ partial “header.html” . }} {{ partial “sidebar.html” . }} {{ partial “post/header-cover.html” . }}
    {{ $paginator := .Paginate (where .Data.Pages “Type” “post”) }} {{ range $paginator.Pages }} {{ .Render “summary” }} {{ end }} {{ partial “pagination.html” . }}
    {{ partial “footer.html” . }}
    {{ partial “foot.html” . }}

    #179835
    Bruce
    Participant

    bbpress Version 2.5.12
    wordpress Version 4.6.1
    TwentyThirteen-Child theme

    You’ll see I don’t know what I’m doing here. What follows is what I tried.

    I put the following into my 2013 child theme:
    1. a folder titled “bbpress” which contained the following all copied from the bbpress plugin folder:
    2. a folder titled “bbpress”
    3. a folder titled “css”
    4. a folder titled “extras”
    5. a folder titled “js”
    6. a file titled “bbpress-functions.php

    I replaced the top of the bbpress.css file which was in the “css” folder with this:

     /*
    Theme Name: bbpress bbpress-child
    Theme URI: http://neighborsconnect/neighborsnation/wp-content/themes/twentythirteen-child/bbpress-child/
    Description: bbpress-child theme for bbpress
    Version: 1.0
    Author: Bruce Wilson
    Author URI: http://neighborsnation.org/
    Template: bbpress-default
    Tags: bbpress, bbpress-child
    */ 

    Then I increased the font-size for the bbpress forums from 12 px to 20px and other such changes to see if it worked.

    Surprise! Surprise! It didn’t work.

    What do I need to do to make it work?

    ~ Bruce

    #179827
    Stephen Edgar
    Keymaster

    Thanks @chadschulz is this more along the lines of what you are after?

    A quick modification of your code above, with some tweaks via https://codex.bbpress.org/custom-capabilities/

    
    function chadschulz_bbpress_customized_roles( $bbp_roles ) {
    	// Keymaster -> Captain
    	$bbp_roles['bbp_keymaster'] = array(
    		'name'         => 'Captain',
    		'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() )
    	);
    	// Moderator -> Commander
    	$bbp_roles['bbp_moderator'] = array(
    		'name'         => 'Commander',
    		'capabilities' => bbp_get_caps_for_role( bbp_get_moderator_role() )
    	);
    	// Participant -> Ensign
    	$bbp_roles['bbp_participant'] = array(
    		'name'         => 'Ensign',
    		'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
    	);
    	// Spectator -> Visitor
    	$bbp_roles['bbp_spectator'] = array(
    		'name'         => 'Visitor',
    		'capabilities' => bbp_get_caps_for_role( bbp_get_spectator_role() )
    	);
    	// Blocked -> Banned
    	$bbp_roles['bbp_blocked'] = array(
    		'name'         => 'Banned',
    		'capabilities' => bbp_get_caps_for_role( bbp_get_blocked_role() )
    	);
    	// Lieutenant (Based on Participant role caps)
    	$bbp_roles['bbp_lieutenant'] = array(
    		'name' => 'Lieutenant',
    		'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() )
    	);
    	return $bbp_roles;
    }
    add_filter( 'bbp_get_dynamic_roles', 'chadschulz_bbpress_customized_roles' );
    
    #179825
    Chad R. Schulz
    Participant

    Sure,

    I’ve been going with Star Trek ranks;-)

    function my_custom_roles( $role, $user_id ) {
      if($role){
        switch ($role) {
          case 'Participant': $role = 'Ensign'; break;
          case 'Keymaster': $role = 'Captain'; break;
          case 'Moderator': $role = 'Commander'; break;
          case 'Blocked': $role = 'Banned'; break;
          case 'Spectator': $role = 'Visitor'; break;  
        }
      }
      return $role;  
    }
    add_filter( 'bbp_get_user_display_role', 'my_custom_roles', 10, 2 );
    
    function add_new_roles( $bbp_roles )
    {
        /* Add a role called lieutenant */
        $bbp_roles['bbp_lieutenant'] = array(
            'name' => 'Lieutenant',
            'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ),
            );
     
        return $bbp_roles;
    } 
    add_filter( 'bbp_get_dynamic_roles', 'add_new_roles',  1 );

    As I said, things are all working properly now without any issues.

    But, maybe there’s a deeper problem during the update process that might be affecting others as well.

    Anyhoo, Thanks.
    Chad

    ddlange
    Participant

    I’d like to add my thanks to @fpradmin also. The code increases the font size of all parts of the forum page. Thanks!

    johnsantina
    Participant

    Hi everyone,

    I started a gaming website and to my surprise it isn’t doing too badly. I’m hoping to grow a community around it, but am really struggling to get everything right.

    I’ve managed to get my forum posts to replace comments:

    8 Wonderful Christmas Presents For Zelda Fans

    I’ve installed a Plugin to put Register/Login/Forgot at the top of the forum, which works very well, and shows on the main forum pages too: http://www.growngaming.com/forums/forum/grown-gaming-community/?view=all

    Now, my problem is I also want to offer the option to login with social media, rather than filling in all details, etc. I’ve successfully found and fully installed/integrated a widget to do this, which fits into the sidebar perfectly. However, I’d also like this to display in the top right hand corner of the forum (on every sub-forum and topic), so that people can see that they can comment on my posts (and, thus post in the forum) very easily.

    Is it possible for me to add this to my forum? I have a shortcode for the widget and have put it into pages etc, but I cannot figure out how to have it automatically added to every page/topic in my forum.

    Thank you for your help.

    #179809

    In reply to: topics.php on line 943

    yoshidesu
    Participant

    i decided to use code [bbp-forum-index]

    then everything ok..

    thanks

    #179807
    sally
    Participant

    Hello, i have installed the plugin wp-post ratings

    https://wordpress.org/plugins/wp-postratings/installation/

    I want to show the rating in bbpress.

    Find: <?php while (have_posts()) : the_post(); ?>
    Add Anywhere Below It (The Place You Want The Ratings To Show): <?php if(function_exists(‘the_ratings’)) { the_ratings(); } ?>

    In which files, i have to add the php code?

    Thanks a Lot!

    Best Regards
    Sally

    #179804
    Kona Macphee
    Participant

    Hi guys, the ticket was created and has been marked as fixed and closed.

    However, the problem is still occurring in bbPress 2.5.12, so the bug has not actually been fixed.

    Could somebody please fix this issue? I’m still having to manually patch the bbPress code with every update.

    Thanks!

    #179801
    Stephen Edgar
    Keymaster

    Can you share your code for how you’re defining your custom roles please?

    If you’d rather keep the code private you could join the #bbPress channel in Slack

    You can sign up for WordPress Slack here: https://chat.wordpress.org

    #179800
    Stephen Edgar
    Keymaster

    Can you add some more details please?

    Does this happen if you do this yourself with a new test user?

    If you could add some reproducible steps like these:

    1. Create a new user testuser
    2. Add the participant role to testuser
    3. Signed in as admin I create a topic xyz
    4. Log out of admin, login as testuser
    5. Reply to topic xyz

    Actual Result:

    I see the reply author as….

    Expected Result:

    I expected to see the reply author as….

    #179795
    Chad R. Schulz
    Participant

    I’ve added a dynamic role to my forums that no longer appears in any display user role capacity.
    I used the bbp_get_dynamic_roles hook as before.

    However, the capabilities from this role do transfer over–just not the name.

    I’m using custom functions that require this role’s name be defined. So basically this update breaks my site.

    Any attempt to role back to an earlier version of bbPress seems to crash the site.

    Help!?

    #179779
    Robin W
    Moderator

    sorry – that was for the code via ftp.

    If you just want a list then go into dashboard>appearance>widgets and just look for all those that’s tart with (bbpress)

    #179767

    Topic: Sorting Forums

    in forum Installation
    rhj4
    Participant

    How do I control the order in which the forums appear on the page? I am currently using this shortcode:

    [bbp-forum-index]

    lamitdeptvolunteer
    Participant

    Hi,
    I noticed textarea for newtopic description is generated using bbp_the_content function. I.e., not available in form-topic.php site specific copy.

    • bbPress 2.5.11
    • WordPress 4.6.1
    • site (internal)

    If this is worth your time, how do I add placeholder attribute in the following list, without breaking the upgrade mechanism? I mean if it is a five minute job for any of you. Otherwise I can spend my own time to work around it using css… it’s nagging me that you all would not have forgotten to allow for this …reasonably important thing… I think.

    	function bbp_get_the_content( $args = array() ) {
    
    		// Parse arguments against default values
    		$r = bbp_parse_args( $args, array(
    			'context'           => 'topic',
    			'before'            => '<div class="bbp-the-content-wrapper">',
    			'after'             => '</div>',
    			'wpautop'           => true,
    			'media_buttons'     => false,
    			'textarea_rows'     => '12',
    			'tabindex'          => bbp_get_tab_index(),
    			'tabfocus_elements' => 'bbp_topic_title,bbp_topic_tags',
    			'editor_class'      => 'bbp-the-content',
    			'tinymce'           => false,
    			'teeny'             => true,
    			'quicktags'         => true,
    			'dfw'               => false
    		), 'get_the_content' );
    

    Here is what I am trying to do, i.e., add the words “… and a short description of the topic here.” in the blue area.
    _________
    Create a new conversation topic using the form below

    Create a new Conversation

    Editing — Apparently, the image didn’t show. Here is the link, if you like
    https://drive.google.com/open?id=0B1Jr2Alfov9eZVVhT2U0dGRDQVVWeVE0WGh4OTZ1QW50RFdR

    Thank you!

    #179732
    Stephen Edgar
    Keymaster

    I’m not seeing any issues with this @piratesjv81

    If you look at this screenshot https://cloudup.com/c-PvKdbwPl0

    The forum testtesttest is a sub-forum of the revision tests forum and they both have the subscribe link to subscribe to the forums

    #179723
    ysiggen
    Participant

    So I am using bbpress alongside buddypress. This is great because running a little gaming community, it is awesome having the ability to use the widely know traditional forums as bbpress offers them while adding some great social features brought by buddypress.

    Now I’ve done my research and figured out that bbpress relies on the wp profile informations (since well wp and bbpress work great together). Aside of that, there is some synchronisation between buddypress and wp profile informations.

    What I’d like is be able to use only one avatar for both plugins. bbpress fetches the wp profile avatar while buddypress as one on its own. So my idea is to fetch buddypress’s image when displaying the user’s avatar on the forums.

    I tried to search for documentation on this and didn’t find much. I ended up digging the plugin code and stumbled upon, while looking in the /plugins/bbpress/includes/users/template.php file, bbp_current_user_avatar() which uses bbp_get_current_user_avatar() that calls get_avatar() with the desired size and user id.

    So I guess the obvious step is telling bbpress to look for the buddypress profile image rather than use this get_avatar() function, which I suspect is fetching the wp profile image.

    But I am stuck here, mainly because I am new to wordpress, also to php. I should be able to sort myself out with some indications (how and what to use) or even some pseudo code.

    I want to do this because I want people to not use their wp profile (there is not much there anyway) and rather go through their buddypress profile only.

    Thank’s in advance for any help.

    #179715
    erich199
    Participant

    @hotloverspassion,

    did you create a new page and name it “new topic”. This is where you will place the short code [wpmu_bbp_topic]

Viewing 25 results - 5,701 through 5,725 (of 32,518 total)
Skip to toolbar