Alternatively, is there a way to post completely anonymously, but in a way that is available only for logged-in users?
I think you’ve asked this before, but not sure I responded.
It is technically possible, but lots of code and beyond free help. In any case I’d suspect that someone would post thinking it was anonymous, but forget to tick the box that says anonymous, or use the wrong form, and by mistake post something outrageous that then appears in their name, cue them accusing your site of destroying their reputation, you accusing whoever wrote the code of it not being robust, and all hell breaking loose. So not code that I would write.
your other suggestion is also possible, but you’d need to catch everywhere the username is used, and again risk it being exposed in some code that isn’t expected.
I s’pose my gut answer is just enable anonymous posting, and use the ‘hold for moderation’ in the moderation part of my style pack plugin to approve anonymous posts. Then tell your users that they must log out to post anonymously.
Just for information the theme is Divi, using their theme builder allowing me to style and format whole taxonomies a little easier (in theory haha)
For the bits of PHP – This is what I’m using to pull in the information for singular forums:
$page_id = get_queried_object_id();
$dynamic_forum_shortcode = ‘[bbp-single-forum id=' . $page_id . ']‘;
echo do_shortcode($dynamic_forum_shortcode);
And for topics as follows:
$page_id = get_queried_object_id();
$dynamic_topic_shortcode = ‘[bbp-single-topic id=' . $page_id . ']‘;
echo do_shortcode($dynamic_topic_shortcode);
So in theory the idea is:
1. Pull in page id as identifier
2. Form shortcode for forum/topic
3. Add these PHP snippets to the Divi template using the Code Snippets plugin
Then when someone accesses the page it should call in topic/forum based on the ID of the page
I’ll take a look into this tomorrow, changing theme and disabling plugins as thankfully it isn’t live just yet. Thanks for your help so far anyway but if you can spot any flaw in the logic so far please do alert me!
ok, so presuming this is in any topic, then if you fancy sharing the shortcode you are using and the php code, I might take a look at that
Outside of your php code, I’d suggest it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentytwenty, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Health Check & Troubleshooting
Then come back
Hi there,
Just wondering if anyone would be able to assist with an issue I’m experiencing on a site we’re working on. Unfortunately unable to share a link due to the nature of the project.
Summary: When clicking on the edit button on the front end of topics as any role it redirects to a page showing all posts, on all forums in date order.
Setup: The way this information is pulled in to the page is using the shortcodes to pull in the topic information, using PHP to get the id of the page (in turn, the topic), adding it to the shortcode and then executing it.
This seems to be working well to date aside from the editing of the topic; as the reply function is working nicely. Basically as soon as it pops in the /edit at the end of the URL it doesn’t show the right info.
Any advice would be fantastic, again I know it is difficult without a URL however any suggestions would be great.
Kind Regards,
Matt P
thanks for posting. The site needs access to replicate so cannot be reproduced without.
bbpress does not have a WYSIWYG editor by default, so what code/plugin are you using to get this? I’d suspect your theme may be doing this, and therefore may be creating the problem.
You also have an error in your theme (Use of undefined constant bbp_reply_id ), which is either code you have added to what looks like a parent theme, or an error in the theme itself.
I’d suggest that you prove this by
Themes
As a test switch to a default theme such as twentytwenty, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Health Check & Troubleshooting
Then if it is theme contact the theme author as it is a paid theme
Most embeds can be disabled via the “Auto-embed links” setting in:
Admin > Settings > Forums
You can also permanently unhook them:
remove_action( 'bbp_init', 'bbp_reply_content_autoembed', 8 );
remove_action( 'bbp_init', 'bbp_topic_content_autoembed', 8 );
Images are a bit trickier, as you’ll need to remove img
from the allowed-tags array:
add_filter( 'bbp_kses_allowed_tags', function( $tags = array() ) {
unset( $tags['img'] );
return $tags;
} );
bbPress includes a function called bbp_make_clickable
that is used to turn regular URLs in topic and reply contents into anchors.
You would need to unhook it to prevent it from happening.
remove_filter( 'bbp_get_reply_content', 'bbp_make_clickable', 40 );
remove_filter( 'bbp_get_topic_content', 'bbp_make_clickable', 40 );
š not as far as I know – many thousands of plugins use shortcodes, and WP would create massive issues if they stopped them.
So is this one article, or many, is it written by someone with expert knowledge or does it cite some authority?
reddit is just people chatting, so without anything more substantive, I can’t say, I’ve seen nothing.
Shortcodes just execute the same code that a block would, just with a different initiation, so hard to see how anyone can say they are slow.
There’s a flat earth community on reddit as well š
Hi,
Normally bbpress changes any URL to link or gives img tag etc.
Is it possible that we don’t have anything visual and have only plain text based response?
I am asking this because people respond to support forum with all sorts of links which goes to 404 on a later date.
Having it as a code based and not actual link will mean no more 404 in future.
On reddit ))))) Are these rumors?
Okay, what’s the best way integrate bbpress with Guttenberg’ blocks today?
Only shortcodes or some other method…
I’m inserting a tracker shortcode into the main page.
However, I read that shortcodes are already outdated and work quite slowly.
What is the shortcodes alternative ?
Is there a more modern way to paste Guttenberg blocks?
and indeed on my profile on this site as
xvcxvczvzc
Is there any update on this thread, looking to achieve exactly the same by adding a Locked / Closed tag (icon) when a topic is closed ?
I have already used the code to ensure text does not turn Grey, so just looking to add some form of symbol so forum users can see topic thread has been closed
Thanks
BTW – for reference for others, code to stop Closed Topics text changing to Grey is …
#bbpress-forums .status-closed,
#bbpress-forums .status-closed a {
color: #000 !important;
}
Hello everyone! I have a problem with one topic and I don’t know what to do. That specific topic have 3 replies(2 from admin and 1 from the user that post it). If I enter in admin I can see those replies, if I enter in db I also cand see them, but on the frontend is empty. Firstly I thought all the replies are hidden but they are not render on the frontend. I watched on other topics and everything works fine. What can it be? Thank you!
If I put
`
$a = array(
‘post_type’ => ‘reply’,
‘post_parent’ => bbp_get_topic_id()
);
$b = get_posts($a);
var_dump($b);
`
On others topics I can see the replies but on that one is an empty array
2nd issue – put this in your custom css
.archive-description {
display : none ;
}
3rd issue
bbp style pack
Apologies, I’ve been tied up in a paid project, and this had slipped from my memory.
The actual code that does the work is a few lines, but it needs wrapping in lots of checks and stuff that limits, but I’m back looking at it now š
which has a set of templates (or you can easily create your own)
if you create a template and call it ‘bbpress.php’ then this will be used by bbpress.
see
Step by step guide to setting up a bbPress forum – Part 1
section 8
Hi all,
I am using Thrive Theme Builder, which has a set of templates (or you can easily create your own) that you can apply to different pages, etc. One nice feature is that they are “smart” in that you can set your theme colors and then if you change them, they’ll change on all of the pages in your site that use the smart templates.
It’s easy to specify which Thrive Theme Builder template to use for pages that show up in the wp Pages list. However, BBpress forum pages seem to be generated on demand. Right now, if I click on a forum, it us using a random (but probably the first alphabetical) template (the default “Audio post”). Which needless to say, is not what I want and is ugly to boot.
Is there a way to specify which Thrive Theme Builder template to use for these pages? I am not a coder (at all) and I’m highly leery of poking around with php files and so on, especially as they might get overwritten or broken by wp or Thrive or BBpress updates down the line. So what I really want is a setting that says, “choose this Theme Builder template for the forum pages.”
Thanks!
If these are the widget and shortcode warnings, then if you have read these tabs, you will know what to do.
If thus still puts you off, then sorry not much more I can do.
No worries I took 5 years of night classes in Web Development, HTML 5, CSS and PHP. I don’t remember much so that’s why I asked. I’ll have to pull out my books and see if I can remember anything. š I’ll also need to get a code checker plugin as I know how frustrating it can be if the code is not written and or spaced correctly.
Users are asking for total post views. I have no idea why but thought Iād ask if its a setting. If not were do I go to ask for code writing help.
š The problem is that I’d have to work out how to do it first !! so lots of code searching.
So a bit like you wanting some hints on how to solve a crossword clue – until I’ve solved it, I can’t help you and then I might as well give you the answer š
I’d suspect it is to do with resetting globals
best offer I can have is download the bbp_style_pack plugin, and navigate to /includes/shortcodes.php
the bsp-display-topic-index does topics within a page, and line 34 is a link to the query which filters these to the settings.
so if you copied that function and all it’s sub functions, renamed them all to prevent conflict, and then if you used the guts of bbp_get_user_topic_subscriptions to replace the query, that might get you close.
Once done for topics, then you could re-write for forums.
Best I can do
I’m not necessarily looking for someone to write out the code for me. I’m just looking for some general direction on how to get it done. Any links to other resources would be super valuable.