Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 6,426 through 6,450 (of 32,519 total)
  • Author
    Search Results
  • #174816
    Robkk
    Moderator

    What will be the action code for this section?

    Use these two hooks instead.

    add_action( 'bbp_theme_after_reply_content', 'rkk_add_reply_link' );
    add_action( 'bbp_theme_after_topic_content', 'rkk_add_reply_link' );
    #174815

    In reply to: bbPress 2.5.9

    Robkk
    Moderator

    @soulkitchen

    Can you link me to the exact patch you worked on??


    @kineta

    Create a ticket in the bbPress trac. Login using your WordPress.org/bbPress.org login credentials. Find any more bugs, please report them.

    https://bbpress.trac.wordpress.org/


    @rf0854

    Yeah not having wp_footer(); will mess up the editor because the script is enqueued in the footer of your page.

    #174812
    Robkk
    Moderator

    Here is the CSS you will need add it to your child themes style.css file or in a custom css plugin.

    #bbpress-forums div.bbp-the-content-wrapper textarea.bbp-the-content {
      font-size: 16px;
    }
    #174808
    cmfdrj
    Participant

    Thank a lot Robkk, it’s fixed now.

    The theme we are using, Brunelleschi, does have a convenient “Custom CSS:” box in which I simply pasted the code you posted and voila.

    #174805
    Robkk
    Moderator

    This is caused by some styles from your theme that is for WordPress comments reply link.

    Add this custom CSS snippet to a custom css plugin or in a child themes style.css file

    #bbpress-forums .reply {
      text-transform: inherit;
      font-family: inherit;
      font-size: inherit;
      letter-spacing: inherit;
    }
    Robin W
    Moderator

    There are lots of ways to achieve a login

    Via Widgets – Dashboard>appearance>widgets
    Via a login page – put this shortcode on a page [bbp-login]
    or using say my plugin – https://wordpress.org/plugins/bbp-style-pack/ Install the plugin and then Dashboard>settings>bbp style pack>login

    #174786
    ugarnono01
    Participant

    Hi.

    I am creating a dashboard and want to create a link which will directly take the member to their forum topics. What would this link be? When i look at the url for mine, it shows my username so that would take people straight to my topics.

    Also is there a shortcode to show a members recent topics as a widget?

    thanks

    stephen

    #174774
    JAMMI2580
    Participant

    Hello all, I managed to completely customize bbPress, but I have something I can not change, nor with legacy functions of my theme, nor with my child css3 theme: the font ( fat size and color) in the response area

    <div id="wp-bbp_reply_content-editor-container" class="wp-editor-container">
    <div id="qt_bbp_reply_content_toolbar" class="quicktags-toolbar">
    <textarea id="bbp_reply_content" class="bbp-the-content wp-editor-area" name="bbp_reply_content" cols="40" tabindex="103" rows="12"></textarea>
    </div>
    

    Someone can it help me?
    Vous aurez deviné, je suis Français! 6Merci beaucoup!” 🙂

    #174773

    Topic: 2 tech questions

    in forum Installation
    laurelo
    Participant

    I created a page where users login to the forum. But once logged-in, the page just says “you are now logged in.” But it stays on my main site and doesn’t take users inside the forum. Is there code snippet or something I need to do to make it go to the forum once they click “log in”?

    Also, if I want to add “courses” inside my forum with video “how-to’s”, where would that exist? is that considered a topic? or a page? I created it as a page and the link shows up in my forum widget, but when you click on it, the page takes you out of the forum and exists on my main site.

    thanks for your help!

    #174768

    In reply to: Help needed

    myuver
    Participant

    i think this plugin will help you to hide the top bar https://wordpress.org/plugins/wp-admin-no-show/ and about the size try this code

    bbpress-forums .bbp-topic-content p,
    bbpress-forums .bbp-reply-content p {

    font-size: 12px; /* enter the size u want */

    }

    #174765

    In reply to: Help needed

    sharingdiscount
    Participant

    Hi there,
    I’m getting the same issue with this for my website Sharing Discout & Popular Codes
    Looking for the solutions

    Best,

    #174750

    In reply to: bbPress 2.5.9

    rf0854
    Participant

    Just an FYI to anyone who was following this thread… This was fixed by adding the following code to my theme’s footer.php file.

    <?php wp_footer(); ?>

    This was inserted right before the </body> tag. Enjoy!

    #174749

    In reply to: Text Editor Missing

    rf0854
    Participant

    Just an FYI to anyone who was following this thread… This was fixed by adding the following code to my theme’s footer.php file.

    <?php wp_footer(); ?>

    This was inserted right before the </body> tag. Enjoy!

    #174738
    David Richied
    Participant

    Sure. I copied the function bbp_buddypress_add_notification() in bbpress > includes > extend > buddypress > notifications.php, pasted it right below itself, made the modifications, and changed the name of the function to bbp_buddypress_add_notification_for_participants.

    function bbp_buddypress_add_notification_for_participants( $reply_id = 0, $topic_id = 0, $forum_id = 0, $anonymous_data = false, $author_id = 0, $is_edit = false, $reply_to = 0 ) {
    
    	$current_topic_id = bbp_get_topic_id();
    	$ids_of_subs = bbp_get_topic_subscribers($current_topic_id);
    	foreach ($ids_of_subs as $sub_id) {
    		$topic_author_id = $sub_id;
    
    		// Bail if somehow this is hooked to an edit action
    		if ( !empty( $is_edit ) ) {
    			return;
    		}
    
    		// global $bp;
    
    		// Get autohr information
    		// $topic_author_id   = bp_loggedin_user_id();
    		$secondary_item_id = $author_id;
    
    		// Hierarchical replies
    		if ( !empty( $reply_to ) ) {
    			$reply_to_item_id = bbp_get_topic_author_id( $reply_to );
    		}
    
    		// Get some reply information
    		$args = array(
    			'user_id'          => $topic_author_id,
    			'item_id'          => $topic_id,
    			'component_name'   => bbp_get_component_name(),
    			'component_action' => 'bbp_new_reply',
    			'date_notified'    => get_post( $reply_id )->post_date,
    		);
    		bp_notifications_add_notification( $args );
    	 	// Notify the topic author if not the current reply author
    	 	if ( $author_id !== $topic_author_id ) {
    			$args['secondary_item_id'] = $secondary_item_id ;
    
    			bp_notifications_add_notification( $args );
    	 	}
    	 
    	 	// Notify the immediate reply author if not the current reply author
    	 	if ( !empty( $reply_to ) && ( $author_id !== $reply_to_item_id ) ) {
    			$args['secondary_item_id'] = $reply_to_item_id ;
    
    			bp_notifications_add_notification( $args );
    	 	}
    	 }
    }
    add_action( 'bbp_new_reply', 'bbp_buddypress_add_notification_for_participants', 10, 7 );
    
    #174727
    Kineta
    Participant

    sorry, that should be:

    
    ( function($) {	
    $(document).ready(function() {	
    
       // all the javascript goes here...
    
    });
    } )( jQuery );
    #174725
    Kineta
    Participant

    If you look at a javascript debugger are you getting a console error that reads something like “Failed to execute ‘insertBefore’ on ‘Node’” (I can’t remember the exact text)?

    If not then it’s probably a different issue than what I was dealing with.

    If you’re getting that error, it’s because a function in bbPress is trying to move the TinyMCE editor. Since the above code is an overwrite of the addReply.moveForm function, it needs to be loaded after the bbPress script. Because my example is using jquery you might need to make sure it’s in the right place for that. I’m not sure, you might need to change the $ to ‘jQuery’. Or write the code to use vanilla javascript. I have my .js file set up for jquery, following the Twentysixteen theme: everything is between:

    ( function($) {	
    $(document).ready(function() {	
    
       // all the javascript goes here...
    
    })
    })
    #174716
    tikimojo
    Participant

    Hello everyone,

    I’m new to bbPress so it’s all learning curve here.

    I’ve been asked to show a search feature for forum posts, and it seems that bbPress will do this, but I can’t figure out how to turn it on.

    This page here implies that it should be appearing at the top of the page, but that’s not happening on my development site.

    Search

    Is there some way to turn search on? What am I missing?

    #174713
    tmc5005
    Participant

    I installed the unconfirmed plugin. This plugin lists all of my members that have registered and is supposed to allow me to resend or send them the activation code e-mail so they can activate their membership. When I select an e-mail that is registered to send the activation e-mail, I see a message in my backstage view stating that the activation e-mail is sent.
    The problem is that even though I see a message saying the e-mail is sent it never is sent. I have no idea how to fix this?
    Thank you for your help!

    #174710
    Kineta
    Participant

    @maketheest – sounds like the error coming from the bbPress code, which uses “insertBefore”. Make sure the overwrite is being called *after* the bbPress javascript. Or try clearing your browser cache. Also make sure all the divs & textarea is named the same as my js – or change accordingly.

    The heart of it is that the TinyMCE editor doesn’t like being moved around in the DOM, which is what the bbPress function is trying to do. You need to remove it first, then re-initialize it after moving the container. The last piece is to put the parentId, which is passed by the function, into the hidden field (should have the id of bbp_reply_to) that accompanies the editor.

    #174708
    maketheest
    Participant

    @Kineta
    I have added your code on custom.js on my theme but error still appeared : Uncaught TypeError: Failed to execute ‘insertBefore’ on ‘Node’: 2 arguments required, but only 1 present.

    #174702
    dani8519
    Participant

    Hi there

    here an picture i want my forum:

    thats what i want

    how i dit it?

    i get an new site and add shortcodes like [bbp-single-forum id=3234]

    now the breadcrumbs are linking on the “original” root “/forums” link… so i have think, ok, make an site with the perma link on /forums/ and add the shortcodes…

    but when i dit this, my site looks like this:

    site now:

    so, can you please help me change “only” the one breadcrumbs to my custom site, or what can i do the “originally” “/forums/” works correctly with the shortcodes?

    thank you very much

    greetz

    #174697
    Kineta
    Participant

    You can try putting this inside a .js file in your theme. You’ll have to adjust the tinymce editor settings in this code to your liking.

    addReply = {
    		moveForm : function(replyId, parentId, respondId, postId) {
    			
    			// remove the instance of tinymce before moving it's container
    			tinymce.remove('#bbp_reply_content');
    			// it can't possibly be this easy:
    			$('#post-container-'+parentId).after($('#'+respondId)); 
    			
    			tinyMCE.init({   
    				selector: 'textarea', 
    				plugins: 'hr, wplink, textcolor, paste, image, media, wpemoji, emoticons, charmap, fullscreen',
    				forced_root_block : "",
    				menubar: false,
    				toolbar1: 'styleselect,bold,italic,underline,strikethrough,blockquote,bullist,numlist,alignleft,aligncenter,alignright,fullscreen',
    				toolbar2: 'fontsizeselect,forecolor,outdent,indent,hr,charmap,emoticons,image,media,link,unlink,wp_help'
    			  });
    			
    			// write the correct reply-to id to the hidden field that stores it
    			// this prevents the wrong id inserted because we're returing false at the end of the function.
    			$('input#bbp_reply_to').val(parentId)
    			
    			// return false to prevent page reload, losing all the work.
    			return false; 
    		}
    	}
    #174695
    Kineta
    Participant

    Funny, I could have sworn reply notifications worked when we were first testing and trying to find a forum platform that met our needs. Must have hallucinated that!

    Email notifications are fine for some things, but on a very active discussion board they would be overwhelming.

    I’ve been trying to hack the code in the includes/extend/buddypress/notifications.php file. But I’m pretty green with both php and wordpress/bbpress development. It does look like all the parts are there to extend it. But I’m a bit perplexed about some things in the code.

    #174679
    AlexanderCnb
    Participant

    Should this still work? It doesn’t seem to close the topics in my case. Just wondering if it’s me doing something wrong or that this doesn’t apply anymore.
    WordPress version: 4.5.2
    bbPress version: 2.5.9
    Child theme: Canvas WooThemes

    This is the code I’ve got in the plugin now, from all the code @robin-w provided.

    <?php 
    
    /*
    Plugin Name: BBPress Close Old Posts
    Description: Close BBPress 2.0+ posts that haven't been updated in X days. 
    Author: Raygun
    Version: 0.1
    Author URI: http://madebyraygun.com
    
    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
    You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
    */ 
    
    register_activation_hook(__FILE__, 'bbpress_topic_scheduler');
    
    add_action('bbpress_daily_event', 'bbpress_close_old_topics');
    
    function bbpress_topic_scheduler() {
     wp_schedule_event(time(), 'daily', 'bbpress_daily_event');
    }
    
    function bbpress_close_old_topics() {
    	// Auto close old topics
    	$topics_query = array(
    		'author' => 0,
    		'show_stickies' => false,
    		'parent_forum' => 'any',
    		'post_status' => 'publish',
    		'posts_per_page' => -1
    	);
    	if ( bbp_has_topics( $topics_query ) )
    		while( bbp_topics() ) {
    			bbp_the_topic();
    			$topic_id = bbp_get_topic_id();
    			$topic_date = strtotime( get_post( $topic_id, 'post_date', true ) );
                    $forum_id = bbp_get_topic_forum_id($topic_id);
                    if ($topic_date < strtotime( '-1 day') && $forum_id == 1276 )
                        bbp_close_topic( $topic_id );
    		}
    }
    ?>
    #174671
    Kineta
    Participant

    This bug isn’t just in Chrome. It’s actually because TinyMce editor doesn’t like being moved around the DOM, which is what the the function in bbPress is trying to do – tying to move the editor under the post you’re replying to.

    I wish this bug would get fixed, but in the meantime you can overwrite the javascript function in a .js file in your theme. This is what I did – remove the editor before moving the containing element, then reinitialize it. Works well for me.

    FYI: in case you don’t know javascript well – this needs to be inside jquery $(document).ready()

    // overwrite bbPress's broken function that moves the reply form under the replied to post in threaded topics
    	
    	addReply = {
    		moveForm : function(replyId, parentId, respondId, postId) {
    						
    			tinymce.remove('#bbp_reply_content');
    			// it can't possibly be this easy:
    			$('#post-container-'+parentId).after($('#'+respondId)); 
    			
    			tinyMCE.init({   
    				selector: 'textarea', 
    				plugins: 'hr, wplink, textcolor, paste, image, media, wpemoji, emoticons, charmap, fullscreen',
    				forced_root_block : "",
    				menubar: false,
    				toolbar1: 'styleselect,bold,italic,underline,strikethrough,blockquote,bullist,numlist,alignleft,aligncenter,alignright,fullscreen',
    				toolbar2: 'fontsizeselect,forecolor,outdent,indent,hr,charmap,emoticons,image,media,link,unlink,wp_help'
    			  });
    			
    			// write the correct reply-to id to the hidden field that stores it
    			// this prevents the wrong id inserted because we're returing false at the end of the function.
    			$('input#bbp_reply_to').val(parentId)
    			
    			// return false to prevent page reload, losing all the work.
    			return false; 
    		}
    	}
Viewing 25 results - 6,426 through 6,450 (of 32,519 total)
Skip to toolbar