Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 12,476 through 12,500 (of 32,504 total)
  • Author
    Search Results
  • #143336
    Stephen Edgar
    Keymaster

    To achieve this you would just make an alternate CSS stylesheet based of the main bbPress stylesheet and enqueue it as part of your theme.

    You’d simply use display: none for the bits you don’t need.

    <link rel="stylesheet" id="bbpress-print-css" href="http://example.com/bbpress-print-css.css" type="text/css" media="print">

    #143334
    Stephen Edgar
    Keymaster

    See this thread on how one user did it for SimplePress:

    bbPress SimplePress 5 Importer

    Also a search with a few of these keyowrds: mod_rewrite, phpbb or vbulletin at Stack Overflow will give you some good examples to go by: http://stackoverflow.com/

    mshane8
    Participant

    I have imported through WP Dashboard Import – Forums, Topics and Replies but they are not displaying properly. It shows Forums and then a # of Topics but on the far right it shows 0 topics in a forum and when I click on the specific forum it says “there are 0 topics” even though the topics and replies have all been imported and show in the WP Dashboard.

    I have a static page with shortcode: [bbp-forum-index] used to call the forum index. Maybe it is a permalink problem.

    #143321
    mshane8
    Participant

    Hi Robin –

    I am too far along. That is not an option.

    Do you know where bbPress places the database tables. What is the default table prefix?

    I am not sure why this is so complex. I have imported through WP/Dashboard/Tools/Import – Forums, Topics and Replies individually through xml files.

    I have a static page that calls the forum index using the shortcode : [bbp-forum-index]

    This page displays OK. It will show the # of topics but when I click on the forum itself it opens up the forum but shows 0 topics. All the topics, forums and replies are in the WP Dashboard assigned to the proper author.

    #143314

    In reply to: Forum Question

    Robin W
    Moderator

    ok, I’ll do some code tomorrow and come back !

    #143294
    Robin W
    Moderator

    Sort of think that’s how it is designed to work, the idea being that you eye is drawn to the latest unstuck post, and then immediately above it is the latest stuck post, so it works
    sticky – early to late.
    unsticky – late to early.

    Suspect there’s a bit of code you can do to change the order.
    The function bbp_get_stickies

    sits in

    \bbpress\includes\topics\functions.php

    #143292

    In reply to: Creating a new forum

    Robin W
    Moderator

    I don’t directly have any experience of maintenance plugins.

    However creating a test/backup site, whilst requiring some further learning, is of great benefit, and discussed in the documentation here

    https://codex.bbpress.org/creating-a-test-site/

    #143291
    Robin W
    Moderator

    Sorry, I failed to add the other bit of code you need !!

    The last paragraph should have read :

    …and then on your page template add this function where you want it.

    <?php if(is_front_page() ) { display_latest_topic () ; } ?>
    

    I’ve wrapped it in an if is_front_page statement so it only shows on the frontpage. You night need to use is_home instead depending on how your blog is set up.

    If you want it in the body, you should put it within the content div, either before or after the loop depending if you want it at the of or bottom of the page. You may need to play a bit !

    If any of that isn’t clear, do come back, but let me know what theme you’re using as well

    #143288

    In reply to: No toolbar available

    Liberty
    Participant

    Ok, I switched to “Twenty Ten” and the toolbar appears. I don’t saw an mistake in my code. I hope you can see it: http://snippi.com/s/r6mpul7

    #143285

    In reply to: Titles – Roles

    full moon
    Participant

    Hello,

    I have been searching for something very similar. The “plugin author” label on all the plugin pages on wordpress.org is what I am after. The “plugin contributor” option too would be useful. Although I don’t want the text as it is, but this ability to label to indicate the users importance within a forum is essential to my project. My issue is that they Keymaster, participant, ect ect labels are useless as the forum master wont have any moderation/admin capabilities. So i need to be able to select a user to have a custom label like “offical representative”. I was looking at the code above, but I’m not sure if it would work as I need, and across a multisite install.

    I guess I am asking the same question, but is there a plugin that can allow a user to be given a unique label in the forum per site?

    Thanks in advance for any responce

    Leigh

    #143281
    Robin W
    Moderator

    ok, so drop the following into your functions file

    //  Display just latest topic
    function display_latest_topic() {  
    
    	$topics_query = array(
    					'post_type'           => bbp_get_topic_post_type(),
    					'post_parent'         => $settings['parent_forum'],
    					'posts_per_page'      => '1',
    					'post_status'         => array( bbp_get_public_status_id(), bbp_get_closed_status_id() ),
    					'ignore_sticky_posts' => true,
    					'no_found_rows'       => true,
    					'order'               => 'DESC'
    				);
    				
    	$lt_query = new WP_Query( $topics_query );
    		
    	while ( $lt_query->have_posts() ) {
    			
    		$lt_query->the_post();
    			$topic_id    = bbp_get_topic_id( $lt_query->post->ID );
    ?>
    <h2> Latest topic </h2>
    <h3> <a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink"><?php bbp_topic_title($topic_id); ?></a></h3>
    		
    <div id="bbpress-forums">
    		
    		<div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header">
    
    	<div class="bbp-meta">
    
    		<span class="bbp-reply-post-date"><?php bbp_reply_post_date(); ?></span>
    
    		<a href="<?php bbp_reply_url(); ?>" class="bbp-reply-permalink">#<?php bbp_reply_id($topic_id); ?></a>
    		
    	</div><!-- .bbp-meta -->
    
    </div><!-- #post-<?php bbp_reply_id(); ?> -->
    
    <div <?php bbp_reply_class(); ?>>
    
    	<div class="bbp-reply-author">
    
    		<?php bbp_reply_author_link( array( 'post_id' => $topic_id, 'sep' => '<br />', 'show_role' => true ) ); ?>
    
    		</div><!-- .bbp-reply-author -->
    
    	<div class="bbp-reply-content">
    
    		<?php bbp_reply_content(); ?>
    
    	</div><!-- .bbp-reply-content -->
    
    </div><!-- .reply -->
    </div><!--div bbpress-forums--->
    
    	<?php
    		
    	} }

    and then on your page template add this function where you want it. I’ve wrapped it in an if is_front_page statement so it only shows on the frontpage. You night need to use is_home instead depending on how your blog is set up.

    If you want it in the body, you should put it within the content div, either before or after the loop depending if you want it at the of or bottom of the page. You may need to play a bit !

    eternal noob
    Participant

    Hi all.

    What can be done to get bbpress page load faster ? What are best practices ? Is there a tutorial I have missed ?

    It appears as if I have a redirection-problem, where my browser is stalling ?
    Is there still a gravatar-issue where I have to remove some code for speed optimization ?
    What ressources can be cached with htaccess or otherwise ?
    And so on …. ?

    BBpress is really looking better and better and the bbpress-for-wordpress-comments in 2.6 feature would be quite a fix for wordpress which doesnt even have an edit feature for commenteers. I like how things have gone so far. But seriously – SPEED, SPEED, SPEED.

    I am definately no coder just an annoying end-user. But it is simply not decent for such a relatively simple set of functionalities to be so slow as it appears to me. I simply cannot annoy forum members with such page loads and also making wordpress load slower with bbpress installed.

    What is a boy to do if he really would like to use bbpress ?

    Thanks for anything.

    #143271
    surangaudimedia
    Participant

    Yeah I can do it.. Could you please post the code for me? Thanks

    #143265
    Robin W
    Moderator

    quickest way would be for you to check out the code in the plugin bbp-user-information on my website.

    bbp Profile Information plugin

    This adds 4 fields to the display under the forum role in topics/replies and in the profile (and make those field editable for later on), and you can see how these are set up and used.

    In particular under the /includes folder you’ll find the display.php shows how to create function to add this to the correct area via a filter.

    add_action ('bbp_theme_after_reply_author_details', 'bbp_user_information') ;
    

    and

    add_action ('bbp_template_after_user_profile', 'user_profile_bbp_user_information') ;
    

    and within this you’ll see the code

    $usermeta = get_userdata( $user_id, 'ui_label1' );
    			echo $usermeta->ui_label1;
    

    where ‘ui_label1’ is the metadata field and takes the data from the usermeta table and displays it.

    #143261

    In reply to: Forum Issue

    rumbu
    Participant

    How you solve ? the problem becouse me I have the same problem…..
    Everybody can see my forum but when a users log in all forum dissapear.
    If i Log in with Admin don’t disappear.

    http://www.pescuit-sportiv.ro/wordpress/forum

    Not Found
    Apologies, but the page you requested could not be found. Perhaps searching will help.

    Thanks

    #143256

    In reply to: No toolbar available

    Liberty
    Participant

    Hello Robin,

    I’m missing this toolbar:
    dsrgdrg

    it’s not available on my site:
    dgdfrgdr

    I have the newest versions of WordPress and bbPress and have done this steps to fix this problem but nothing happened:

    I have deleted every JavaScript and tested it. Nothing!
    I deleted the code of the function.php. Nothing!
    I deactivated every plug-in. Nothing!
    …and the CSS can’t be the fault because the toolbar is not disabled. It’s not there.

    I opened my forum for guests and created a test forum. Now you can take a look on it: http://plusthemes.de/forum/test

    Thank you so much for your answer. I try to give as much information as possible. 🙂

    #143254
    Robin W
    Moderator

    Ok I have worked a way to do it.

    But you will need to

    a) add some code to your child theme’s function file and
    b) add a line of code into the page template your home page is using

    How much capability do you have to do that?

    #143251

    In reply to: Fatal error

    That function calls wp_get_current_user() so it might be related to the $current_user global. WordPress’s get_currentuserinfo() function calls wp_set_current_user() which overrides the global with fresh data.

    It’s plausible some other plugin is loading the current user too early, or that it’s trying to initialize WordPress more than once via a subsequent call to $wp->init().

    It’s unlikely that bbPress is directly causing this, as bbPress doesn’t do any of the above things on its own. It does however reference currently logged in user data quite liberally using WordPress’s built in API functions, so it’s not entirely impossible.

    Keep us posted, and we’ll try to help out where we can.

    #143247
    jyd44
    Participant

    You are right. Having the same requirement, I was facing the same issue (and you will discover very soon that it is not the only one !).
    As far as I understand, the integration between bbPress and BuddyPress is not fully completed. In bbPress, the user capabilities based on their role in the forums are only mapped to WP capabilities. (see for example the function bbp_current_user_can_publish_replies() or bbp_current_user_can_access_create_reply_form() (invoqued in the form-reply.php part of the bbPress theme) in bbpress/includes/users/template.php .
    My way to overcome this issue is to add my own filter on the ‘bbp_current_user_can_publish_replies’ filter and to check in this function if the current_user is a member of the group associated with the root_forum (the one associated with the group) of the topic currently displayed.

    below my function:

    function my_bbp_current_user_can_publish_replies($input)
    	{
    		$topic_id = bbp_topic_id();
    		$root_forum = alsb_get_post_root_forum($topic_id);
    		$groups_id = bbp_get_forum_group_ids($root_forum);
    		$user_id = get_current_user_id();
    		if (groups_is_user_admin( $user_id, $groups_id[0])
    			|| groups_is_user_mod ($user_id, $groups_id[0]) 
    				|| groups_is_user_member ($user_id, $groups_id[0]) )
    			return true;
    		else return false;
    	}
    
    whith the help function
     	function alsb_get_post_root_forum($post_id)
    	{
    		$post = get_post($post_id);
    		do
    		{
    			$post = get_post($post->post_parent);
    		}while ($post->post_parent != 0);
    		return $post->ID;
    	}
    

    another way is perhaps to setup a filter on the ‘user_has_cap’ WP filter, but I did not test it.
    good luck for your integration !

    #143244
    kokocipher
    Participant

    I want to place it on the homepage.

    I’m using Sahifa, in its homepage builder, you can have custom contents of html, scripts, and shortcodes.

    #143234
    Stephen Edgar
    Keymaster

    Keep the forum root and forum slugs different.

    i.e. Name your page forums, use forums as your forum slug and your single forum slug forum

    royliew
    Participant

    Hi guys,
    I’ve added a page ‘/forum’ with the bbpress shortcode. When i visit this page with ‘Forum’, I get this:

    This is what i’ve created (with the login widget)

    However, when I visit the page by clicking the ‘forum’ text in the breadcrumb, shit I got this page without the login widget:

    This is my forum setup:

    How do I make sure that the breadcrumb ‘forum’ goes to the page with the login widget?

    Thank you!
    Jason

    #143225

    The bbp_kses_allowed_tags() function ensures that cite attribute of the blockquote tag is allowed, but not the actual cite tag itself.

    Users with the Keymaster role are allowed to bypass these rules, and can post literally anything they want, completely unrestricted.

    Two solutions:

    • The “quote” plugin you’re using needs an update to not use cite tags
    • bbPress needs to allow cite tags
    #143222
    Doremdou
    Participant

    Yes I understand, I would prefer to use threaded replies with pagination too but just now we can’t… 500 replies on a single page is not possible…

    but I continue to think it was done in purpose looking at the bbpress codex:
    https://codex.bbpress.org/forum-settings/

    Reply Threading
    This will allow your users to reply to specific replies, providing context to the discussion in a ‘threaded’ view. This will also remove topic pagination so the topic and all replies will only be a single page.

    Let’s just hope someone will see our post and help us… :/

    #143210
    Robin W
    Moderator

    do you have an actual forum page

    viz

    https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/ section 3, and which way is I set up?

Viewing 25 results - 12,476 through 12,500 (of 32,504 total)
Skip to toolbar