Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,051 through 11,075 (of 32,521 total)
  • Author
    Search Results
  • #150152

    In reply to: Importing VB4 Database

    Stephen Edgar
    Keymaster

    bbPress includes two vBulletin importers, one is vBulletin3 for vBulettin 3.x and the other vBulletin is for the 4.x versions.

    Did you try the both or only the 3.x version?

    #150151

    In reply to: Last post first

    Stephen Edgar
    Keymaster

    Typically if you want to reverse the order of replies then also adding bbPress “Show lead topic” is handy:

    bbp_show_lead_topic

    #150147
    Stephen Edgar
    Keymaster

    @farsite281 Thanks for this though you should submit your translations in the GlotPress project you linked above:

    https://translate.wordpress.org/projects/bbpress/2.5.x/ca/default
    https://translate.wordpress.org/projects/bbpress/dev/ca/default

    Catalan Language

    • /dev 43% translated, 466 strings translated, 602 Strings untranslated and 401 strings waiting approval
    • /2.5 44% translated, 467 strings translated, 572 Strings untranslated and 160 strings waiting approval

    The best resources to help get you started are:

    The main transators handbook: https://make.wordpress.org/polyglots/handbook/

    The WordPress translator community blog: https://make.wordpress.org/polyglots/

    bbPress translations reference: https://codex.bbpress.org/bbpress-in-your-language/

    WordPress Catalan project site: https://ca.wordpress.org/

    The reason I state that it is best to provide (and update) the bbPress (including WordPress, BuddyPress and Akismet) translations at https://translate.wordpress.org/projects is because each of these projects can have the translations updated as part of WordPress’ “Automatic Updates”, just like you see updates for your plugins and themes, if any of these projects are 100% translated you will be offered to update all of your translations from the WordPress dashboard updates page.

    #150146
    Enric
    Participant

    Hello,

    I’m trying to modify aspect of bbPress installed in my wordpress. I’ve read diferents posts but I can’t find the solution.

    Layout and functionality – Examples you can use

    I need to change aspect buttons in bbPress because of font color and layout are similar and you can’t distinguish them.

    http://i.imgur.com/71FmGz2.jpg

    Could anyone help me or give me a clue to resolve this issue?

    I use Rush theme and wordpress 3.9.1

    Inici

    Thank you

    #150137
    Robkk
    Moderator

    which one would you suggest?

    i have no idea , i have no opinions on any of them since i havent tried any of them.
    You can try each one on a local site if you want and make your decision off that.

    But what i can say is that this rating plugin https://wordpress.org/plugins/rating-widget/

    is on https://codex.bbpress.org/feature-plugins-tracking/

    and it also has some integration with bbpress.

    Basically I want it to show up in only a few of my subforms next to the bb codes on top ^^^

    I have no idea how your going to show the ratings on a few subforums , your probably going to need help on that too, (i have no idea how to help you on this)

    #150135
    cybarmitzvah
    Participant

    which one would you suggest?

    Basically I want it to show up in only a few of my subforms next to the bb codes on top ^^^

    Robin W
    Moderator

    yes that’ll do it, put the ‘or’ in and it should be fine eg

    <?php 
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user)  || $role == 'bbp_moderator'  ) {
    
     echo " <div class=\"reply-author-role\">";
    	
    	echo bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) );
    	
    	echo "</div>";
    	
             }
            else {
    
    }
    ?>
    
    

    The || is an ‘or’ argument, so the if line says ‘if user is keymaster or (||) moderator’ then…

    The else is not really needed, as I presume you’ll do nothing, as you only want it to display if…

    Come back and let us known that it worked.

    Robkk
    Moderator

    ok @robin-w i got it where it just shows for keymaster but how do i add moderator

    heres what i have

    <?php 
    $displayed_user = bbp_get_reply_author_id() ;
    if ( bbp_is_user_keymaster($displayed_user)  ) {
    
     echo " <div class=\"reply-author-role\">";
    	
    	echo bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) );
    	
    	echo "</div>";
    	
             }
            else {
    
    }
    ?>
    Robkk
    Moderator

    @robin-w

    ok this works great when i tryed it on a default theme.

    but on my custom bbpress theme , i seperated each item in the bbp_get_reply_author_link code and wrapped them in a class so i could better position each item.

    so im using

    <div class=bbp-reply-author-av><?php bbp_reply_author_link( array( 'show_role' => false, 'type' => 'avatar' ) ); ?></div>

    <div class=bbp-reply-author-name><?php bbp_reply_author_link( array( 'show_role' => false, 'type' => 'name' ) ); ?></div>

    <div class=reply-author-role><?php bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) ); ?></div>

    now i have 3 avatars, 3 author links, 3 author roles displaying on 1 reply now.

    how should the code be if i dont want to mess with the args and i just want to display this..

    <div class=reply-author-role><?php bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) ); ?></div>

    if the display user in the reply is only a keymaster and a moderator.

    something kind of like this but where it actually works for my bbpress custom theme.

    <?php 
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user) ||$role == 'bbp_moderator');
    
     echo " <div class=\"reply-author-role\">";
    	
    	echo bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) );
    	
    	echo "</div>";
    	
            else {
    
    }
    ?>
    
    Robin W
    Moderator

    wasn’t setting who the user was ! Try

    function role_show () {
    $displayed_user = bbp_get_reply_author_id() ;
    $role = bbp_get_user_role( $displayed_user);
    if ( bbp_is_user_keymaster($displayed_user) ||$role == 'bbp_moderator')  $args['show_role'] = true ;
    else $args['show_role'] = false ;
    return $args ;
    }
    add_filter ('bbp_before_get_reply_author_link_parse_args', 'role_show' ) ;
    
    #150121

    In reply to: Last post first

    Robkk
    Moderator

    found this code, add this to your function.php in your child theme

    function custom_bbp_has_replies() {
      $args['order'] = 'DESC'; // 'ASC' (Ascending, Default), 'DESC' (Descending)
      
      return $args;
    }
     
    add_filter('bbp_before_has_replies_parse_args', 'custom_bbp_has_replies' );
    Robkk
    Moderator

    @robin-w the code doesnt work for me

    Robin W
    Moderator

    untested but the following bar typos should work – add to your functions file

    function role_show () {
    $role = bbp_get_user_role( $user_id );
    if ( bbp_is_user_keymaster() ||$role == 'bbp_moderator')  $args['show_role'] = true ;
    else $args['show_role'] = false ;
    return $args ;
    }
    
    add_filter ('bbp_before_get_reply_author_link_parse_args', 'role_show' ) ;
    
    #150115

    In reply to: Full Width Forum Help

    Robin W
    Moderator

    ok, after the line

    <?php do_atomic( ‘after_main’ ); // oxygen_after_main ?>
    

    add

    <?php get_sidebar( ‘subsidiary’ ); // Loads the sidebar-subsidiary.php template. ?> 
    
    Robkk
    Moderator

    i want to only display user role on keymaster and moderators users.

    I dont want every participant to have the role shown , only the keymaster and moderators are important enough to me to show their role next to their avatar.

    How would i do that??

    im just using this code to display the users role

    <div class=reply-author-role><?php bbp_reply_author_link( array( 'show_role' => true, 'type' => 'role' ) ); ?></div>

    #150106
    Nitac
    Participant

    Cheers for the response. Figured out a simple way to handle it.

    When I register the CPTs i just need to define exclude_from_search' => true for the CPTs I don’t want to appear in the WP search, then i dont need to run the above filter and BBP looks after itself.

    #150103

    In reply to: Lastest Activity wrong

    Stephen Edgar
    Keymaster

    Things look correct now, did you fix this?

    If not please give specific links to show what your issue is, you have too many topics and forums for me to guess which one you are talking about.

    Have you run any of the repair tools to see if they fix the issue?

    https://codex.bbpress.org/repair-forums/

    Also, WordPress doesn’t support multiple timzezones for users so this is not included with bbPress for that reason, they appears to be a few plugins that might be able to do this though I haven’t seen any that are compatible with bbPress, but you could have a look yourself.
    https://wordpress.org/plugins/

    #150090
    Nitac
    Participant

    My site is running mainly CPTs but I filter my search results to a subset of these using this technique:

    function filter_search($query) {
        if ($query->is_search) {
    	$query->set('post_type', array('A','B', 'C'));
        };
        return $query;
    };
    
    add_filter('pre_get_posts', 'filter_search');

    which works fine for wordpress but when I search within BBP i get the ‘Oh bother! No search results were found here!’ message as you’d expect because of the above filter.

    If i remove the filter the BBP search works fine, and if I add ‘forum’, ‘topic’, ‘reply’ to the above filter BBP search works fine, but the problem is get I the forum results appearing in the main search results page.

    Also, If i remove the filter all together I still get forum results appearing in the main results page.

    Is there a way to exclude forums results from appearing in the main search?

    #150088

    In reply to: Random Topic Link

    Robkk
    Moderator

    @joejozwowski @robin-w i think stephen already cracked this

    i was browsing on how to make custom views and yeah stumbled upon this.

    there is a random topic view in his code.

    https://gist.github.com/ntwb/8167699

    #150083

    In reply to: Importing for SMF 1.x

    Stephen Edgar
    Keymaster

    Most likely you are either not using or an incorrect table prefix.

    Open your SMF Settings.php with a text editor, the file should be in the root folder of your SMF install.

    It should have something like this:

    ########## Database Info ##########
    $db_type = 'mysql';
    $db_server = 'localhost';
    $db_name = 'ntwb_smf';
    $db_user = 'mydatabaseusername';
    $db_passwd = 'mydatabasepassword';
    $ssi_db_user = '';
    $ssi_db_passwd = '';
    $db_prefix = 'smf_';
    $db_persist = 0;
    $db_error_send = 1;
    

    Use the database prefix shown there in the import settings screen, in my case it is smf_

    #150075
    Stephen Edgar
    Keymaster

    Make sure your users are triggering any ‘bad words’ in WordPress comment moderation.

    Moderation and BlackListing

    #150073
    Stephen Edgar
    Keymaster

    If you only want to have a forum on that site install WordPress and bbPress in the domain forums.example.com. If you want to have separate blog and forum you should look at WordPress Multisite using sub domains, your forums would be the 2nd site at forums.example.com and your WordPress blog would be at eaxample.com.

    A good starting point is https://codex.wordpress.org/Create_A_Network

    #150069
    Stephen Edgar
    Keymaster

    I am not sure what you mean, bbPress does not include any links titles details

    Could you explain it in more detail please, maybe some screenshots if that will help and/or a link to your forums.

    #150068
    Stephen Edgar
    Keymaster

    This is neat, thanks for sharing your code @korobochkin

    #150067
    Stephen Edgar
    Keymaster

    This is a theme issue, you should make a copy of your page.php file and rename it bbpress.php in your themes folder.

Viewing 25 results - 11,051 through 11,075 (of 32,521 total)
Skip to toolbar