Search Results for 'test'
-
AuthorSearch Results
-
March 6, 2014 at 4:05 pm #143366
In reply to: Misunderstanding: buddypress groupforums usage
jyd44
ParticipantMy 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;March 6, 2014 at 2:36 pm #143354In reply to: By activating plugin, other sites give a 404 page
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
and
for setting up menu and modal loginsAs 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.
March 5, 2014 at 5:16 pm #143316In reply to: Search and users turn blank pages
Robin W
Moderatorsuggest 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.
March 5, 2014 at 4:43 pm #143313Topic: Member not getting email notifications.
in forum TroubleshootingKris35
ParticipantTHey 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.
March 5, 2014 at 2:31 pm #143303In reply to: Forum Question
Robin W
ModeratorYou 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 repliesMarch 5, 2014 at 9:57 am #143294In reply to: Sticky Posts not showing in correct order
Robin W
ModeratorSort 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_stickiessits in
\bbpress\includes\topics\functions.php
March 5, 2014 at 9:41 am #143292In reply to: Creating a new forum
Robin W
ModeratorI 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
March 5, 2014 at 9:27 am #143291In reply to: how can i show latest thred
Robin W
ModeratorSorry, 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
March 5, 2014 at 9:22 am #143290In reply to: Creating a new forum
tonyhir
Participant1. 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?
March 5, 2014 at 4:56 am #143281In reply to: how can i show latest thred
Robin W
Moderatorok, 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 !
March 4, 2014 at 3:57 pm #143256In reply to: No toolbar available
Liberty
ParticipantHello Robin,
I’m missing this toolbar:
it’s not available on my site:
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. 🙂
March 4, 2014 at 11:36 am #143247In reply to: Misunderstanding: buddypress groupforums usage
jyd44
ParticipantYou 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 !March 4, 2014 at 7:22 am #143241In reply to: how can i show latest thred
surangaudimedia
Participant@robin-w
the latest topic and content. I dont need toshow replies. Just the last thread’s title and content. ThanksMarch 4, 2014 at 4:38 am #143236In reply to: how can i show latest thred
Robin W
ModeratorDo you want :
just the latest reply (or topic is no replies)
The title or all the content?March 4, 2014 at 4:06 am #143232In reply to: Creating a new forum
Robin W
Moderatorthen 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.
March 3, 2014 at 2:05 pm #143196In reply to: Titles – Roles
Robin W
Moderatorok, 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
March 3, 2014 at 1:45 pm #143192In reply to: Titles – Roles
Robin W
ModeratorI 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?
March 3, 2014 at 9:40 am #143174In reply to: Subscribe Checkbox isn't working
Robin W
ModeratorI 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 !
March 3, 2014 at 9:05 am #143173In reply to: how can i show latest thred
Robin W
ModeratorDo 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?March 3, 2014 at 9:00 am #143171Topic: how can i show latest thred
in forum Themessurangaudimedia
Participanthow 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.
March 3, 2014 at 8:48 am #143170In reply to: bbPress 2.5.3
Robin W
Moderatorhave 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
March 3, 2014 at 8:35 am #143168In reply to: bbPress 2.5.3
surangaudimedia
ParticipantHi..
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.March 3, 2014 at 4:45 am #143164In reply to: Subscribe Checkbox isn't working
Ricardo Bueno
ParticipantThe 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.
March 3, 2014 at 4:25 am #143161Robin W
Moderatorthe 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.
March 3, 2014 at 4:18 am #143158In reply to: Subscribe Checkbox isn't working
Robin W
ModeratorJust 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
-
AuthorSearch Results