Forum Replies Created
-
In reply to: Line spacing in bbpress forums
Glad you resolved your own issue! 🙂
In reply to: Add/Remove from TinyMCEIn the guide it does say this.
—-
Use this function below instead with new argument added to be able to add new media like the emoticon button.
function bbp_enable_visual_editor( $args = array() ) { $args['tinymce'] = true; $args['teeny'] = false; return $args; } add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );
Please note that if you disable the teeny mode in the visual editor and allow other media buttons through the TinyMCE Advanced plugin, you will probably need to add on to this function and put it into your child theme functions.php file to allow your users to use some of the buttons like the table button.
When I was talking about User ID, I was talking about a number not the name.
Here is an example on the other site I mentioned. The users username is 谢益辉 but the user profile shows the users ID in their profile url.
cos.name/cn/profile/1/
The plugin I mentioned will just help if you do not want the chinese characters in the urls of your forum posts it will just show the ID instead of the name. It is just a helpful plugin that might be useful, it won’t really help you with the profile issue though.
I do see that the profile page url is filterable and I could possibly make it the users ID instead, so I might try to fool with this. I post a snippet later If I can get it to work, and if it does work might suggest the plugin author of the plugin I listed earlier to add it to their plugin as it might be helpful.
You can also try switching to the default permalinks to see if that would help, because bbPress by default displays the profile links to be
?bbp_user=1
, with the number being the ID which bypasses using the chinese characters completely. See if that works.In reply to: Login, Register, Lost Password linksThis should show the items in the specific menu.
add_filter( 'wp_nav_menu_items', 'rkk_add_auth_links', 10 , 2 ); function rkk_add_auth_links( $items, $args ) { if (is_user_logged_in() && $args->theme_location == 'sub-header-menu') { $items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>'; } elseif (!is_user_logged_in() && $args->theme_location == 'sub-header-menu') { $items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>'; $items .= '<li><a href="'. site_url('wp-login.php?action=register') .'">Register</a></li>'; $items .= '<li><a href="'. site_url('wp-login.php?action=lostpassword') .'">Lost Password</a></li>'; } return $items; }
By default it leads to the regular wordpress login form. if you want to change that to a frontend page, you can change this
site_url('wp-login.php')
to something like thissite_url('/login/')
.login redirect you would need to use something like this.
function rkk_login_redirect($redirect_to, $request, $user) { return (is_array($user->roles) && in_array('administrator', $user->roles)) ? admin_url() : site_url('/forums/'); } add_filter('login_redirect', 'rkk_login_redirect', 10, 3);
This login redirect code redirect admins to the WordPress backend, but anything else to the forums.
In reply to: How do I remove the (0,0)@sumanthbhe
Try this to remove the comma.
add_filter('bbp_after_list_forums_parse_args', 'rkk_bbpress_list_forums' ); function rkk_bbpress_list_forums() { $args['separator'] = ''; return $args; }
In reply to: Dead LInks in Forum ListGlad you resolved your own issue! 🙂
What was the issue that caused it??
In reply to: Problem with forum reply notificationsOkay sorry for the late reply.
This is how I tested it.
Without reply threading
Topic author gets notified like normal no problem. It shows the repliers name and everything fine.
With Reply threading
Topic author gets notified of a unthreaded reply like normal no problem. It shows the repliers name and everything fine.
If the topic author threads under a reply. The reply author who commented that is being threaded does not get a notification, neither does the topic author.
If a user replies to their own reply the topic author gets notified.
if the topic author replies to an already threaded reply by another user, the topic author gets notified of the other user replying although it was the topic author. So although the user being replied to should get the notification, the user replying is.
iF a user replies to an already threaded reply created by the topic author, the topic author gets notified that they have replied although it was the other user.
If a user replies to an already threaded reply, sometimes the topic author may receive two notifications one with the user who replied and also one that says the topic author just replied also.
All i can really say that these notifications are a mess…
I am creating replies as a test user but for some reason the topic author is getting all of the notifications, even for threaded replies being posted under my test user’s reply even though in the code for the notifications it states that the test user should receive a notification.
I created a ticket for this bug in the trac though.
In reply to: remove sub forums from forum listYou can use this CSS.
#bbpress-forums .bbp-forums-list { display: none; }
see if what is poated here may help.
You can also try this plugin, it has code that might be in bbPress core in the future.
https://wordpress.org/plugins/asyncronous-bbpress-subscriptions/
In reply to: Customizing response field (change the position)bbPress should do this but there is a bug currently for this.
I guess you can also use this.
function change_translate_text( $translated_text ) { if ( $translated_text == ‘Oh bother! No topics were found here!’) { $translated_text = ‘No topics were found here!’; } return $translated_text; } add_filter( 'gettext', 'change_translate_text', 20 );
It is possible to add custom statuses with this plugin.
https://wordpress.org/plugins/buddy-bbpress-support-topic/
Here is an example gist file.
https://gist.github.com/imath/9e69b8139ff6f7a4120a
Here is example for Urgent.
function your_custom_status( $allstatus = array() ) { $allstatus['topic-working-on-it'] = array( 'sb-caption' => __( 'Urgent', 'buddy-bbpress-support-topic' ), 'value' => 3, 'prefix-title' => __( '[Urgent] ', 'buddy-bbpress-support-topic' ), 'admin_class' => 'urgent', 'dashicon' => array( 'class' => 'bpbbpst-dashicons-warning', 'content' => '"\f534"' ), ); return $allstatus; } add_filter( 'bpbbpst_get_support_status', 'your_custom_status', 10, 1 );
In what scenarios would this be useful??
Are you talking about a support status??
If it is not for a topic supports status, this could be custom development.
I am not going to lie but this chinese username thing is tough to find a fix for since I think most of the work does need to be done for WordPress itself.
You can try going here and posting a topic aobut this issue to see if anyone has a good suggestion/workaround.
https://zh-cn.forums.wordpress.org/
Other than that I guess you might want to look in users keeping english characters in their usernames. I even found a bbPress chinese forum in the wild and they all seem to just be using english characters for their usernames some even numbers which is interesting, because using the users id instead of their username will definitely help you.
cos.name/cn
The forums topics using the id looks like they might be using this.
https://wordpress.org/plugins/bbpress-permalinks-with-id/
But since you seem to be getting the users to at least register with the characters now. Do you know what each user profile url is in the topic/reply post. Can you check it out in your browsers dev tools so I can see what the url is. I am expecting a url with some chinese characters and maybe some of these %%% in the url which would be leading to a 404.
In reply to: Login, Register, Lost Password linksYou did try it like this right??
if(is_bbpress() && $args->menu->slug == 'sub_header_menu')
If it still doesn’t work you can try finding the menu location in your theme, which might most likely be in the functions.php file, but it could be different depending on the theme. You would spot by the register nav menu function like what is listed in this page.
https://codex.wordpress.org/Function_Reference/register_nav_menus
If you have a free theme I could check it out and get the arguments you need.
In reply to: Css image error in BBpressThis is the CSS causing the issue. You are stretching a 14px image to 40px, that is why it is so blurry.
#bbpress-forums p.bbp-topic-meta img.avatar, #bbpress-forums ul.bbp-reply-revision-log img.avatar, #bbpress-forums ul.bbp-topic-revision-log img.avatar, #bbpress-forums div.bbp-template-notice img.avatar, #bbpress-forums .widget_display_topics img.avatar, #bbpress-forums .widget_display_replies img.avatar { border: none; width: 40px; }
See if the PHP code snippet in this topic can help you resize the 14px avatars better.
In reply to: Divi theme and reply threading issueI guess you can try this code instead to see if it works any. I guess I can can also just check out to see if the custom script file name changed. I am using an older version of Divi 2.4 for testing so it could be a possibility.
You can contact me here if you want me to check it out on your site later.
Contactadd_action( 'wp_print_scripts', 'rkk_reply_threading_divi' ); function rkk_reply_threading_divi() { if( is_bbpress() && bbp_is_single_topic() ) { wp_dequeue_script( 'divi-custom-script' ); } }
In reply to: Subscribe url / buttonI am sorry, but this may not even be possible to do, especially in a newsletter or ad.
In reply to: Login, Register, Lost Password linksYou could post the code you are using so I can double check to see how it is if you still want to do this manually without a plugin.
In reply to: Admins and Users cannot edit their PostsbbPress probably doesn’t support many permalink structures other than default and post name. There are a plan to support more in the future though.
If it works on post name permalink structure it is fine.
In some cases it could be a theme issue, and that is if it still does not work with the post name permalink structure, and you would need to just copy the bbPress templates into your theme to fix it. An example of this is the default theme Twenty Fifteen. It could also be an issue related to some theme compatibility in bbPress too.
In reply to: Designing ForumThere should be forum for each company name.
Just create a new forum for each company.
All threads specific to that company needs to be created there.
You can create group forums with the help of buddyPress or bbPress private groups to enforce this. Other than that just tell users to post there.
Now on searching city, state, region or holding company related forums/threads should come in results. I want to create menu where in he can click on city and find related company names available in that city.
Not sure where the city, state, region, holding company data is kept. I am guessing since each company has a forum, that each company’s data could be the city, state, region. I guess create a forum taxonomy for each?
Then make the bbPress forum search or whatever search you are using for the site to be able to search forum taxonomies?
I want to create menu where in he can click on city and find related company names available in that city.
I guess create a custom query?? bbPress has
if_has_forums()
to be able to do this I guess.https://codex.wordpress.org/Class_Reference/WP_Query
I can’t really help any more since this is custom development.
In reply to: Designing ForumThis really sounds like some custom functionality and you may need to hire a developer for this.
In reply to: Simple adding a Login/Logout to the menuClosing this in favor of your other topic.
In reply to: Change admin’s forum role to keymasterGlad you solved your own issue! 🙂
In reply to: Pages navigation numbersI knew it was just reply threading…