Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 9,601 through 9,625 (of 32,580 total)
  • Author
    Search Results
  • #157926
    Stagger Lee
    Participant
    remove_filter( 'bbp_get_reply_content', 'bbp_make_clickable', 4);
    remove_filter( 'bbp_get_topic_content', 'bbp_make_clickable', 4); 
    #157916
    Robin W
    Moderator

    yes, just create a wordpress page and put one of the following shortcodes in it

    [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.

    #157914
    Robin W
    Moderator

    Not quite sure why, but the replies class is not showing

    Try adding

    .forums.bbp-replies {
      clear: both !important;
    }

    to your style.css

    Functions files and child themes – explained !

    that fixed it in my browser

    #157912
    andreippo
    Participant

    @korobochkin, thanks a lot for sharing this.

    Should I just paste you code on bbpress/includes/common/functions.php and change the attributes of it?

    What does selena_network refer to?

    Thanks a lot!

    #157908
    Robin W
    Moderator

    ok, it’s caused by your themes style sheet

    line 5600 says

    .no-touch .reply {
      visibility: hidden;
    }
    

    and this is hiding bbpress reply

    you could try adding

    #bbpress-forums .no-touch .reply {
      visibility: visible !important;
    }
    

    to your css file

    see

    Functions files and child themes – explained !

    Stagger Lee
    Participant

    Try to adapt this:

    add_filter( 'nav_menu_css_class', 'namespace_menu_classes', 10, 2 );
    function namespace_menu_classes( $classes , $item ){
        if ( in_array(get_post_type(), array('forum','topic','reply')) )
    	 {
            $classes = str_replace( 'current_page_parent', '', $classes );
            $classes = str_replace( 'menu-item-22902', 'current-page-parent', $classes );
        }
        return $classes;
    }
    Stagger Lee
    Participant

    You explained a bit confuse. You want parent-child menu highlightning ?
    I am afraid it is not possible that way. Your menu link is simple page with shortcode (page-id-502).

    #157895
    Stagger Lee
    Participant

    Try to play with this in functions.php:
    For some buttons you will need to borrow them from TinyMCE advanced plugin and put in core folder, they dont come in the core. (emoticons, and some else, called “plugins”)

    function bbp_enable_visual_editor( $buttons = array() ) {
    	
    	$buttons['tinymce'] = array( 
    	'toolbar1' =>'bold, italic, underline, strikethrough, blockquote, alignleft, aligncenter, alignright, alignjustify, justifyfull, bullist, numlist, outdent, indent, cut, copy, paste, undo, redo, link, unlink, table, fullscreen, image, media, cleanup, help, code, hr, removeformat, sub, sup, forecolor, forecolorpicker, backcolor, backcolorpicker, charmap, visualaid, anchor, newdocument, pastetext, separator, wp_adv,wptadv,media,image',
        'toolbar2' => 'pastetext, pasteword, selectall, formatselect, fontselect, fontsizeselect, styleselect, strikethrough, outdent, indent, pastetext, removeformat, charmap, wp_more, emoticons, forecolor, wp_help,media,image', // 2nd row, if needed
        'toolbar3' => 'pastetext,pasteword,selectall,paste_as_text,preprocess,paste,media,image', // 3rd row, if needed
        'toolbar4' => 'media,image', // 4th row, if needed 
    	'plugins'  => 'anchor, code, insertdatetime, nonbreaking, print, searchreplace, table, visualblocks, visualchars, emoticons, advlist,wordpress,wplink, paste,fullscreen',
    		   ); // 4th row, if needed 
        $buttons['quicktags'] = array ('buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close');
        return $buttons;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
    add_filter('mce_buttons', 'bbp_enable_visual_editor');
    
    #157889

    In reply to: Add forum roles

    joop.stringer
    Participant

    Hey guys,

    Can you please explain me where to put the functions.php file ?
    If I put it in the child theme directory,my whole site goes blank …

    
    <?php
    /**
     * Functions .. additional to all the programs
     *
     * @package WordPress
     * @subpackage Twenty_Fourteen
     * @since Twenty Fourteen 1.0
     */
    
    function add_custom_role( $bbp_roles ) {
    
    	$bbp_roles['DDC Member'] = array(
    	'name' => 'DDC Member',
    	'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // i just want them to have the same capabilities as participants );
    
    	$bbp_roles['Forumlid'] = array(
    	'name' => 'Forumlid',
    	'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // i just want them to have the same capabilities as participants );
    
    	$bbp_roles['DDC Bestuur'] = array(
    	'name' => 'DDC Bestuur',
    	'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // i just want them to have the same capabilities as participants ); 
    
    	return $bbp_roles;
    }
    
    add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );
    
    ?>
    
    Rosa Parker
    Participant

    This is my website: http://ecoperate.com, WordPress version is 4.0.1 and bbPress version is 2.5.4.

    I have two forum groups running on my website (‘Opportunities’ and ‘Forum’); both of them highlight a different item in the menu when they’re active. Now, what I can’t manage to do is highlighting the respective menu items in the forum topics. At least not in a way they can tell the parent forums apart.

    This works perfectly:

    .single-topic .genesis-nav-menu .menu-item-71 > a

    With the exception that only ONE of the menu-items is highlighted for every single topic (71 refers to menu item ‘Opportunities’). What I want to achieve is differentiation, by somehow linking the single-topics to the right parent forum. How can I do this?

    Any help would be greatly appreciated! 🙂

    Thanks,

    Rosa

    #157875
    Robin W
    Moderator

    ok, at least we know you’ve got the right file !

    Try the following

    delete all the content from wp-content/themes/twentyeleven/bbpress/content-single-forum.php

    and then paste the following in

    
    <?php
    
    /**
     * Single Forum Content Part
     *
     * @package bbPress
     * @subpackage Theme
     */
    
    ?>
    
    <div id="bbpress-forums">
    
    	<?php bbp_breadcrumb(); ?>
    
    	<?php bbp_forum_subscription_link(); ?>
    
    	<?php do_action( 'bbp_template_before_single_forum' ); ?>
    
    	<?php if ( post_password_required() ) : ?>
    
    		<?php bbp_get_template_part( 'form', 'protected' ); ?>
    
    	<?php else : ?>
    
    		<?php bbp_single_forum_description(); ?>
    
    		<?php if ( bbp_has_forums() ) : ?>
    
    			<?php bbp_get_template_part( 'loop', 'forums' ); ?>
    
    		<?php endif; ?>
    
    		<?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'loop',       'topics'    ); ?>
    
    			<?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    		<?php elseif ( !bbp_is_forum_category() ) : ?>
    
    			<?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
    
    		<?php endif; ?>
    
    	<?php endif; ?>
    
    	<?php do_action( 'bbp_template_after_single_forum' ); ?>
    
    </div>
    

    save and then try it.

    #157864
    Haris Zulfiqar
    Participant

    <div class="support-topics">[bbp-single-forum id=383269]</div>

    The above shortcode only works in http mode and not https mode. It stops the entire page content from rendering in SSL mode only.

    Nope, this is not an HTML or CSS issue.

    Any ideas?

    #157857
    Robin W
    Moderator

    see

    https://codex.wordpress.org/Class_Reference/WP_Query

    and look at the heading

    Order & Orderby Parameters

    my guess would be

    ‘orderby’ => array( ‘meta_value_num’ => ‘DESC’, ‘date’ => ‘desc’ ),

    `

    the date is the date of the post ie topic

    #157847
    Robin W
    Moderator

    ok, no problem, I can’t judge how technical people are 🙂

    You can do this in your main theme, but you would do better to create a child theme

    Don’t be intimidated, the following should explain

    Functions files and child themes – explained !

    when you get to

    What is FTP and how do I access it?

    To access your files, you’ll need an FTP client. Some host providers do with within their administration area, check with your host provider if in doubt

    I’m pretty sure form memory that hostgator has an area that does that called c-panel, but check with them if in doubt

    #157810
    Robin W
    Moderator

    and since bbp_reply_count is in the metadata, you’d need to refer to that

    see

    https://codex.wordpress.org/Class_Reference/WP_Query

    so something like

    add_action( 'bbp_init', 'view_twentyplus_posts_init' );
    
    function view_twentyplus_posts_init() 
    {
    		
    	$args  = array( 
    
    	 'meta_key'   => '_bbp_reply_count' ,
              'orderby'  => array( 'meta_value_num' => 'DESC', 'title' => 'ASC' ),
              'meta_query' => array(
    		         array(
    			'key'     => '_bbp_reply_count' ,
    			'value'   => '19',
    			'compare' => '>',
    		),
    
    	);
    
    );
    
    	
    	bbp_register_view( 'twentyplus_posts', __('Popular Posts', 'twentyplus'), $args, false );
    	
    }
    
    
    #157800
    a298e
    Participant

    I could solve this by adding following code to function.php.

    add_filter( ‘bbp_get_the_content’, ‘amend_new_topic’, 10, 3);

    Function amend_new_topic ($output, $args, $post_content) {
    if ($args[‘context’] == ‘topic’ && $post_content == ”) $output=str_replace(‘></textarea>’, ‘>question1 question2 question3</textarea>’,$output) ;
    return $output ;
    }

    Thanks,

    #157766
    Robin W
    Moderator

    your code says

    '_bbp_reply_count' => '19'

    shouldn’t that be

    '_bbp_reply_count' => '>19'

    #157764
    Twist360
    Participant

    Sadly not,

    add_action( 'bbp_init', 'view_twentyplus_posts_init' );
    
    function view_twentyplus_posts_init() 
    {
    	//$args = array( '_bbp_topic_reply_count' => '>20' );
    	
    	$args  = array( 
    	 '_bbp_reply_count' => '19'
    	);
    	
    	bbp_register_view( 'twentyplus_posts', __('Popular Posts', 'twentyplus'), $args, false );
    	
    }

    Shows me posts with no responses 🙁

    #157763

    Topic: Import Forums

    in forum Troubleshooting
    Springgg
    Participant

    Maybe I’m blind but …
    I’ve just installed bbPress plugin to my WP, with the idea to import Mingle forums but “Getting There” is not getting me anywhere as there is no Import Forums tab.
    The only tabs there are All Forums and New Forum
    My Dashboard Printscreen
    Am I in the wrong place or…?

    Help please! 🙁

    #157755

    In reply to: User role upgrade

    Robin W
    Moderator

    ok, getting there, but a solution brief would be good. ie a long description of exactly what you want.

    If it’s easy, I’ll drop some code

    If not, I might look at it as a project

    #157748
    Martyn Chamberlin
    Participant

    Hi Robin,

    Okay, I’m just now realizing that we have two problems going on here then.

    1. Problem #1 was a universal to bbPress problem, and your code above fixes that.

    2. Problem #2 is the fact that at http://thewritepractice.com/bw, the forum does not realize that you are the author of the topic you’re posting. There is no Edit button in the in-box area. Only when I enable “Edit others topics” for Participants via the bbPress Advanced Capabilities plugin do you then see the Edit link in the in-box area.

    Any ideas on how we can fix this problem, and what might be causing it?

    #157734
    Robin W
    Moderator

    ok,

    create a directory on your theme called ‘bbpress’
    ie wp-content/%your-theme-name%/bbpress
    find
    wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php
    Make a copy of this file, and put in in the directory called bbpress that you created above, so you end up with
    wp-content/%your-theme-name%/bbpress/content-single-forum.php
    bbPress will now use this template instead of the original

    then change lines

    <?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
    
    <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    <?php bbp_get_template_part( 'loop',       'topics'    ); ?>
    
    <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    <?php bbp_get_template_part( 'form',       'topic'     ); ?>
    
    <?php elseif ( !bbp_is_forum_category() ) : ?>
    
    <?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
    
    <?php bbp_get_template_part( 'form',       'topic'     ); ?>
    
    <?php endif; ?>
    

    to

    <?php if ( !bbp_is_forum_category() && bbp_has_topics() ) : ?>
    
    <?php bbp_get_template_part( 'form',       'topic'     ); ?>
    			
    <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    <?php bbp_get_template_part( 'loop',       'topics'    ); ?>
    
    <?php bbp_get_template_part( 'pagination', 'topics'    ); ?>
    
    <?php elseif ( !bbp_is_forum_category() ) : ?>
    
    			
    <?php bbp_get_template_part( 'form',       'topic'     ); ?>
    
    <?php bbp_get_template_part( 'feedback',   'no-topics' ); ?>
    
    <?php endif; ?>

    and save

    that should do it

    #157721
    Robin W
    Moderator

    ok, the following code removes the edit for bbpress, but leaves it for normal wordpress pages

    function wpse_remove_edit_post_link( $link ) {
    	if (is_bbpress()) return '' ;
    	else return $link ;
    	}
    add_filter('edit_post_link', 'wpse_remove_edit_post_link');
    

    The users will still be able to edit their topics and replies via the in-box edit buttons

    #157711
    Martyn Chamberlin
    Participant

    Wow. Crazy that nobody has ever tried to use that feature before!

    Here’s the interesting thing though. WordPress.org’s support forum is (I’m 99% sure) built in bbPress and it does successfully allow you to edit topics that you’ve posted. The interface you are sent to when editing your topic does not reside inside the WordPress admin area. Rather it is right there on the publicly facing page.

    I wonder how they are doing that?

    Another interesting wrinkle in this whole thing is that according to the bbPress User Roles and Capabilities, participants should be able to edit their own topics.

    #157710
    Manny Rodrigues
    Participant

    I too had this issue and found countless other posts dated many years ago with no solution. I am using bbpress v2.5.4 and buddypress v2.1.1 on WordPress v4.1. I “resolved” this by editing my functions.php file within the bbpress plugin directory and replacing any character values with a blank. Good enough for me. This “solution” IS NOT RECOMMENDED as any update to bbpress is more than likely to overwrite it. Unless you don’t mind going back in and remembering to re-hack it after each update. No doubt it can be done better. The client just requested I get rid of the code values. Without further to do…

    GoTo: yoursite\wp-content\plugins\bbpress\includes\common\functions.php

    Between Lines 1090 and 1091 Add:

    
    $search_bbpress_titles = array("&# 039;", "&am p;", "&#82 11;", "&qu ot;"); // ' & - "
    $topic_title = str_replace($search_bbpress_titles, '', $topic_title);
    

    Then add the same two lines further down between Lines 1233 and 1234.

    NOTE: You will have to remove the spaces from the $search_bbpress_titles array line as I was unable to post without it parsing that line. Don’t know the coding on this form to post properly. Email me if you need the code.

    Looking forward to any other helpful input. No need to remind me how better you are at coding. 🙂

Viewing 25 results - 9,601 through 9,625 (of 32,580 total)
Skip to toolbar