Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'test'

Viewing 25 results - 4,926 through 4,950 (of 11,580 total)
  • Author
    Search Results
  • #143366
    jyd44
    Participant

    My proposal is based on the hook mechanism proposed by WP and that bbPress use intensely, giving a lot of possibilities for (business) logic customisation. This is not related to the templates files in the theme, which are more related to the presentation (how the informations are displayed). Restricting the possibility to make a reply to the member of a group is a pure “business logic” requirement. You may find few explanations on how it works in the part 5 of the step by step documentation on this site.

    You add the two functions in the functions.php file of your theme.
    In the same file, add the following line, for instance after the two functions or at the end of the file:
    add_filter (‘bbp_current_user_can_publish_replies’, my_bbp_current_user_can_publish_replies, 10);

    This is the way you install filter under WP.

    PS: you can replace the test: 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]) )

    by this one, which is sufficient for your purpose:
    if ( groups_is_user_member ($user_id, $groups_id[0]) ) return true;

    #143354
    Robin W
    Moderator

    “I needed to add the form, topic and forum manually [bbp-topic-index] [bbp-topic-form][bbp-forum-index] and have not found a manual solution for the login ([bbp-topic-login] didn’t work..))”

    See the documentation for set up details including login in sidebar

    Step by step guide to setting up a bbPress forum – Part 1


    and

    Layout and functionality – Examples you can use


    for setting up menu and modal logins

    As for your 404 error, I presume that the urls are correct, for instance

    http://www.hightearecepten.nl/recipe/vijgencompote/

    works with bbpress deactivated, but not when it is activated?

    I’d check first whether there is a plugin conflict, and then a theme conflict viz ;

    Check other plugins

    Check that no other plugins are affecting this.

    Turn off all other plugins, and see if that fixes the problem. If the problem is resolved, add back one at a time to see which is causing the conflict.

    Check themes

    If plugins are not the cause, then it may be a theme issue. Switch to a default theme, such as twentytwelve, and test.

    If it is Themeforest, I’d raise it with them, as it is a paid theme, and with over 1 million bbpress downloads they should have seen it, or know what to do. I have seen some comments that some themeforest themes do not support bbPress, but don’t know about this one.

    #143316
    Robin W
    Moderator

    suggest you start with the usual…

    Check other plugins

    Check that no other plugins are affecting this.

    Turn off all other plugins, and see if that fixes the problem. If the problem is resolved, add back one at a time to see which is causing the conflict.

    Check themes

    If plugins are not the cause, then it may be a theme issue. Switch to a default theme, such as twentytwelve, and test.

    #143313
    Kris35
    Participant

    THey are coming through fine on my test user accounts. Could this be a firewall problem or something else their end?

    Thanks,

    Kris

    UPDATE: sorry, its the notify me tab underneath the text editor that isnt working.

    #143303

    In reply to: Forum Question

    Robin W
    Moderator

    You could do this.

    Presuming you only want tutors to see the forum (not the general public), basically you would set the forum as private, this restricts visibility to logged on users with higher than spectator privaledge to see them.

    You would then create a new bbpress role, which has visibility but no access. I think that would be fairly easy – I know how to go about it but have never tested

    If you want to go down this route and test, come back and I’ll make a quick function to set this up for you.

    You would have full rights – keymaster
    Then your clients would have keymaster or moderator role – lets them create forums and new topics (and indeed replies for supplementaries to topics)
    You clients’ tutors would have say “tutor” role, which is the spectator role with visibility to private forums added in.
    Public would see no forums, topics or replies

    #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

    #143290

    In reply to: Creating a new forum

    tonyhir
    Participant

    1. Turning of all plugins would disable those which support custom post types, such as books and films, which are currently used on the site.

    2. It would also endanger the site’s security and expose it to hackers.

    3. This is all for the benefit of a plugin which I have not been able to test.

    4. All would be well if the site could be put into maintenance mode while plugins are disabled, or if I could work on a local copy. But I know nothing about these things. I see a number of maintenance mode plugins: can you recommend one?

    #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 !

    #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. 🙂

    #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 !

    #143241
    surangaudimedia
    Participant

    @robin-w
    the latest topic and content. I dont need toshow replies. Just the last thread’s title and content. Thanks

    #143236
    Robin W
    Moderator

    Do you want :

    just the latest reply (or topic is no replies)
    The title or all the content?

    #143232

    In reply to: Creating a new forum

    Robin W
    Moderator

    then check for a plugin or theme conflict

    Check other plugins

    Check that no other plugins are affecting this.

    Turn off all other plugins, and see if that fixes the problem. If the problem is resolved, add back one at a time to see which is causing the conflict.

    Check themes

    If plugins are not the cause, the it may be a theme issue. Switch to a default theme, such as twentytwelve, and test.

    #143196

    In reply to: Titles – Roles

    Robin W
    Moderator

    ok, just tested and this code seems to work

    function add_custom_role( $bbp_roles ) {
     $bbp_roles['my_custom_role1'] = array(
    'name' => 'name 1',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    
    );
     $bbp_roles['my_custom_role2'] = array(
    'name' => 'name 2',
    'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) // the same capabilities as participants
    
    );
    
     $bbp_roles['my_custom_role3'] = array(
    'name' => 'name 3',
    'capabilities' => bbp_get_caps_for_role( bbp_get_keymaster_role() ) // the same capabilities as keymaster
    
    );
    
    return $bbp_roles;
     }
     add_filter( 'bbp_get_dynamic_roles', 'add_custom_role', 1 );

    So this adds 3 roles, you/your experts can duplicate the code and add more or remove unnecessary.

    Basically you’ll just need to

    1. tell the what to put as the names – currently the new roles are name 1, Name2 and name 3 (where it says ‘name’ => ‘name 1’ , so they’ll just overwrite that with what you want.

    2. for each what capability. You’ll see the first two have the code bbp_get_participant_role() so that sets them to participant and the last sets to keymaster using bbp_get_keymaster_role() . You can guess that you just change the words for other roles such as spectator, or moderator.

    They need to add this to your theme’s functions file.

    please come back if any of this is not clear

    #143192

    In reply to: Titles – Roles

    Robin W
    Moderator

    I don’t like giving no answers so in between I have a little look, and found an answer from someone else on your second question ie adding roles with existing capabilities.

    I just need to test it, and I’ll be back.

    in the meantime if I said “add this code to your functions file” would you know what I mean?

    #143174
    Robin W
    Moderator

    I think you have got some display issues

    under IE, Firefox and Chrome (haven’t tested others) at 100% the submit buttons disappears. At 75% you see it. Do a zoom in and out to see the effect.

    Fix that and the checkbox will probably appear !

    #143173
    Robin W
    Moderator

    Do you want :

    just the latest reply (or topic is no replies)
    The title or all the body?
    Do you want it in the body or in a sidebar?

    #143171
    surangaudimedia
    Participant

    how can i show letest thred (only last one) on my home page template. http://codex.bbpress.org/shortcodes/ i tried all this short cods in this page but nothing worked.

    #143170

    In reply to: bbPress 2.5.3

    Robin W
    Moderator

    @surangaudimedia

    have you :

    Check other plugins

    Check that no other plugins are affecting this.

    Turn off all other plugins, and see if that fixes the problem. If the problem is resolved, add back one at a time to see which is causing the conflict.

    Check themes

    If plugins are not the cause, the it may be a theme issue. Switch to a default theme, such as twentytwelve, and test.

    come back once you done those of you still have a problem

    #143168

    In reply to: bbPress 2.5.3

    surangaudimedia
    Participant

    Hi..
    please help me to get bbpress latest post.’[bbp-single-view]‘ this shortcode are not working. how I get bbpress latest post to my home page.

    #143164
    Ricardo Bueno
    Participant

    The submit button is on the lower right. I need to change the color so that it stands out more. But yep, I’m able to fill out a new topic with content and hit submit.

    Example:
    http://www.contentsmartslab.com/membersite/forums/topic/testing/

    I just can’t subscribe to the thread. The checkbox still isn’t working.

    Robin W
    Moderator

    the url reads

    http://domain.com/whatever-your-shortcode-page-is-called/page/2/

    So presume your page is called “topics”

    The code works – I’ve just retested it on twentyten site and pagination and subsequent pages were fine, so suggest you try

    Check other plugins

    Check that no other plugins are affecting this.

    Turn off all other plugins, and see if that fixes the problem. If the problem is resolved, add back one at a time to see which is causing the conflict.

    Check themes

    If plugins are not the cause, the it may be a theme issue. Switch to a default theme, such as twentytwelve, and test.

    and then come back if you need further help.

    #143158
    Robin W
    Moderator

    Just check that it is not plugin related first

    Check other plugins

    Check that no other plugins are affecting this.

    Turn off all other plugins, and see if that fixes the problem. If the problem is resolved, add back one at a time to see which is causing the conflict.

    Then to confirm it is a theme problem..

    Check themes

    If plugins are not the cause, the it may be a theme issue. Switch to a default theme, such as twentytwelve, and test.

    Come back and let us know if you fixed, or for more help

Viewing 25 results - 4,926 through 4,950 (of 11,580 total)
Skip to toolbar