Hello,
I have a issue, I want to have a code who works like this:
If user registered on English version – redirect to custom English registered successfully page
If user registered on French version – redirect to custom French registered successfully page
So far I have made this below:
function bp_redirect($user)
$redirect_url = “”;
if (defined(‘ICL_LANGUAGE_CODE’)) {
switch (ICL_LANGUAGE_CODE) {
case ‘fr’:
$redirect_url = “https://mysite.com/fr/enregistrement-avec-succes/”;
break;
default:
$redirect_url = ‘https://mysite.com/registration-successful/”‘;
break;
}
bp_core_redirect($redirect_url);
}
return $redirect_url;
}
add_action(‘bp_core_signup_user’, ‘bp_redirect’, 100, 1);
Unfortunately it is not working and I do not know what do do more to make it work.
Language plugin is WPML the language pages are http://www.mysite.com/fr , http://www.mysite.com/es etc,
Please help me, I really need this script to be working.
Thank you so much
The use of actual [code][/code] tags that everyone is familiar with. Smaller font or font size option for the code tags. Word wrap for the code tags.
Thanks!
I finally figured it out. No need to use the “Full Page Width” option or any other techniques found about the web. If you installed a bbPress forum and everything is set to its defaults. Just use the following…
Select “Customize”
Select “Additional CSS”
Add/Paste the following…
.bbpress #content-sidebar {
display: none;
}
#bbpress-forums {
margin-left: auto !important;
margin-right: auto !important;
width: 170% !important;
}
Forum link in first post is incorrect now. A redirect is being setup though as that is my old link to another forum I use to use. New forum link is, http://www.posemotion.com/forums
@aksteve – I had the same frustration. Try this simple plugin I just created. It’ll print the profile url via a shortcode so you can insert it anywhere you like.
@sarwarc – I just created this very simple plugin to give you access to the user profile link via a shortcode. You can use it in conjunction with the Shortcodes in Menus plugin to add a link to the user’s profile page in your menu.
Glad you got it figured out. I just created this very simple plugin to print the profile url via shortcode in case you find it useful
I have also created a very simple plugin to give you access to the user profile url.
I just created this plugin. I think it will do exactly what you’re trying to achieve.
I’ll start by saying I have no idea what I’m doing and I can barely write php better than a toddler.
I noticed that people have been asking for this (or something very similar to this) for years and it still isn’t part of core and no one’s written a plugin for it. I needed to figure it out on my own, so thought I’d finally make an attempt to contribute back to a platform that has given me so much.
bbPress Profile Link Shortcode
It doesn’t do anything fancy, but it does what it says. Hope you find it helpful!
A charm! Thank you very much, very glad the code is safe now 🙂
Again: merry Xmas and thanks a lot!
thanks, that was exactly the help I needed to get to the right code 🙂
I’ve just released version 3.7.0 which has a filter you can use to change that link.
If you update and then you add this code to your child theme‘s functions file
add_filter ('bsp_new_topic_button', 'rew_change_button' ) ;
add_filter ('bsp_create_new_topica', 'rew_change_button' ) ;
function rew_change_button () {
$href = 'https://mysite/leden/forum/ledenforum/#bsptopic' ;
return $href ;
}
then it won’t be affected.
Please come back and confirm that it works for you.
Hi All,
I want to list all the most popular topics on the top. I am using the below shoetcode in my wp-admin page:
[bbp-topic-index]
It’s showing all the posts by ID descending order.
Also, how I can add the symbol or icon for top five topics?
Please help me guys.
Thanks in advance!!!
The code tag doesn’t seem to work for me. I use MML data in code tags and it has been fine on other forums but seems to mess it up in bbPress. Would be nice for copy and paste options to for code tags. Here’s an example…
;[ Demo 3 | Copyright © 2015 | J. Baker ];
CH1Verse_1.s = "t12 w4 o3 \2 v40 l8 <dced> dcge4 l4 \1 <d1> r8 l8 \2 dg l4 \1 <d1> l8 \2 dge \1 <d1> \2 dcdrr v+ <<dd>> v- r"
CH2Verse_1.s = "t12 w4 o4 \1 v42 l8 >dcde< dcde#4 l4 >d1< l8 de l4 >f1 l8 ddfe1< dedfe dd r4"
sorry, I can see no easy way to do this.
In essence the code above just calls some standard bbpress functions, and these won’t recognise that they have been called by the code, so adding content to then is not possible as far as I can see.
To do this would need some bespoke code
Hi All,
I want to add Pin icon for top or popular five topics? Could anyone can help me out this issue?
I have found the solution top five forum below is code:
function rk_top_five_view() {
bbp_register_view( 'top-five', __( '5 Most Popular Topics' ), array(
'meta_key' => '_bbp_reply_count',
'posts_per_page' => '5' ,
' max_num_pages' => '1',
'orderby' => 'meta_value_num' ),
false );
}
add_action( 'bbp_register_views', 'rk_top_five_view' );
But how I can apply for add pin icon?
Please help me
Hi all,
I am building a WP website in Italian and I have installed bbPress…
Now, I can change in WP setting the language to Italian (Settings->General->Site Language), but when I use bbPress short code they are still in English…
Sorry if it is a silly question, but I dont know hwo to fix it…
For example, the short code [bbp-register] it gives me “register” instead of “registrati”…
any suggestion?
Many thanks
Regards
bbpress only displays 2 levels, so when you click the 2nd level, you will get to see the lower down forums.
It is possible to code for lower levels, if you are happy with coding you’d be looking at
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php
and some coding around bbp_list_forums()
to get a further loop
As for breadcrumb – yes by default you should have one , but themes can turn these off
I’ve a few users who, for some reason, can not see the text mode buttons when I enable tinymce. I followed instructions in these forums to get it to work (add entry to functions.php) and it works for most people. The people it doesn’t work for, can still see the visual mode buttons, but get nothing when they switch to text. Then if they click visual, the visual mode buttons appear again.
Short of a major debug with plugins and the like, I was wondering has anyone any theories as to anything obvious I could check first?
Best wishes
Just had a quick look in between other tasks, and totally untested, but this should work if it has no bugs
function dsk_remove_all_subscriptions ($user_id) {
global $wpdb;
//first remove forum subscriptions
$forum=bbp_get_forum_post_type() ;
$forum_ids=$wpdb->get_col("select ID from $wpdb->posts where post_type = '$forum'") ;
foreach ($forum_ids as $forum_id) {
bbp_remove_user_forum_subscription( $user_id, $forum_id ) ;
}
//then remove topic subscriptions
$topic=bbp_get_topic_post_type() ;
$topic_ids=$wpdb->get_col("select ID from $wpdb->posts where post_type = '$topic'") ;
foreach ($topic_ids as $topic_id) {
bbp_remove_user_topic_subscription( $user_id, $topic_id );
}
}
If you get it working, then please confirm or post back the final code.
If you need further help do come back and I’ll see if I can help further
the forums link seems to be
/forums/forum/forum which is a bit weird.
so can you confirm that you have a page called ‘forums’ with a permalink of ‘forums’ and the shortcode
[bbp-forum-index] in it?
from a read through all looks ok except
add_filter( 'bbp_get_teeny_mce_buttons', 'rew_remove_image_button_in_bbpress' );
should read
add_filter( 'bbp_get_teeny_mce_buttons', 'wppa_remove_image_button_in_bbpress' );
Hi all,
Any help would be appreciated, as I’m a serious beginner. I’m creating my own theme and adding bbPress compatability (as per instructions from bbPress here).
I’ve created a bbpress.php file and bbPress is using this template for individual forum pages, but for the forum ‘home page’ bbPress is seemingly pulling a random file titled blog.php – which isn’t an option in their template hierarchy.
Why is bbPress using this php file? I’m sure it’s something I just don’t know yet. I’m using bbPress Version 2.5.14 and the newest WP as well. Any help would be greatly appreciated! Thank you!
I think i ggot it:
Filters ‘bbp_get_topic_content’ and ‘bbp_get_reply_content’. They MUST run after wpautop, so i gave them priority 1000.
All of my code to get my plugin compatible with bbpress looks now:
/* We use bbPress */
// editor bbpress in tinymce mode
function wppa_enable_visual_editor_in_bbpress( $args = array() ) {
if ( wppa_switch( 'photo_on_bbpress' ) ) {
$args['tinymce'] = true;
$args['teeny'] = false;
}
return $args;
}
add_filter( 'bbp_after_get_the_content_parse_args', 'wppa_enable_visual_editor_in_bbpress' );
// remove insert wp image button
function wppa_remove_image_button_in_bbpress( $buttons ) {
if ( wppa_switch( 'photo_on_bbpress' ) ) {
if ( ( $key = array_search( 'image', $buttons ) ) !== false ) {
unset( $buttons[$key] );
}
}
return $buttons ;
}
add_filter( 'bbp_get_teeny_mce_buttons', 'rew_remove_image_button_in_bbpress' );
// enable processing shortcodes
function wppa_enable_shortcodes_in_bbpress( $content ) {
if ( wppa_switch( 'photo_on_bbpress' ) ) {
$content = do_shortcode( $content );
}
return $content;
}
add_filter( 'bbp_get_topic_content', 'wppa_enable_shortcodes_in_bbpress', 1000 );
add_filter( 'bbp_get_reply_content', 'wppa_enable_shortcodes_in_bbpress', 1000 );
Pleas be so kind to review this to see if i did it right or did oversee something.
Yes, in the content of the topic/reply. It makes from [photo 123] the html to display photo with id=123 from plugin wp-photo-album-plus – instead of a photo from the wp media library – according to the settings in the settings page of that plugin; e.g link to lightbox, subtitle and possible social media buttons to share the image.
The button that opens the dialog to select the photo, and optionally upload a new one, is now working without mods to bbpress, but it shows ‘[photo 123]’ instead of the picture. If the content would be filtered by the standard wp content filters, it would display the image, like it does in a wp native page or post.