I agree, although I have found it fine to use pastebin for code.
Anonymous UserInactive
Using bbPress 2.1.2
Happy to see that a toolbar has been added in, however it doesn’t currently work very well for code. It’s allowing basic HTML like strong even though wrapped with code tags to execute.
I miss the old backtick option that forced ANY and ALL code to display as plain text like a champ.
Thanks, Bryan
Hello,
I run a custom loop for some replies at a specific part in my template. I would like anyone that has the rights to edit these replies. I use bbp_reply_admin_links for that, but this function gives me NULL. When digging futher in to the code I see that bbp_is_reply equals NULL in bbp_reply_admin_links. Probably because im not in a “official” bbpress loop. Anyone has a solution? Manually calling bbp_get_admin_links($post->ID) does not do the trick. bbp_is_reply still gives false on that, because bbp_get_admin_links does not give the ID trough to bbp_is_reply.
"reply",
"post_parent" => get_the_ID(),
"order" => "ASC", // First comments first
"paged" => get_query_var("paged")
)
);
$i = 1;
if($replies->have_posts()) :
while($replies->have_posts()) :
$replies->the_post();
$class = ($i % 2) ? "" : "mark";
?>
<!-- reply -->
<li class="">
<!-- author -->
<a href='post_author ); ?>'>post_author); ?>
Administrator
<img class="image" src="/images/ico-27.gif" width="49" height="49" alt="image description" />
Niels van Renselaar
Media-Enzo
Posts:
<!-- reply -->
You’re welcome. Look forward to seeing your codex page. 🙂
There is documentation, at codex.bbpress.org. It’s a wiki, so you’re free to teach yourself how bbPress works, and contribute your knowledge upstream so others can learn from you.
That said, what you want to do is as easy as making a bbpress.php template in the root of your theme. It will act as the wrapper for all bbPress content.
Do you still see the same theme behavior if you switch ‘theme packages’
https://codex.bbpress.org/forums-settings/#theme-packages
I started to write some doc’s but like you got confused pretty quickly with all the different info available. Did you see the 2.1 install info here?
I’ll do some testing and and fix up the docs, once completed it should be available here:
https://codex.bbpress.org/bbpress-in-your-language/ ‎
I have a website at http://rockwareit.net. I am using CheerApp, which was built to utilize the bbpress forum structure. Everything was fine, until I updated to bbpress, v 2.0, I think – not exactly sure, but it was the update before this last one. Now, with the new version activated, I get a fatal error:
Fatal error: Call to undefined function royal_login() in /home/content/31/8787131/html/wp-content/themes/cheerapp/header.php on line 69
I have attempted to remove/edit problematic code on line 69, to no avail.
I also can not seem to find a proper older version of bbpress, all the links to older versions are broken….can someone please help either with a fix to the issue, or an older version of bbpress?
Thanks!
Nicole
This page describing the bbPress core implies that there are notes on how to import from vBulletin, stating:
> Import Forums
>
> Published on July 3rd, 2012 by netweb Supported Platforms bbPress v1.x
> phpBB v.3.x (For Invision or vBulletin see notes below.)
But there are no “notes below” that reference vBulletin. Does bbPress support vBulletin import?
Wow. Thanks for responding so FAST. I guess I worded my question badly. I knew to place it in that file, I’ve already done so, what I mean is that I’ve tried several variations of calling the function and it returns nothing so I’m evidently not calling it correctly. For instance, my last effort was…
$reply_id = bbp_get_reply_id(); bbp_get_reply_last_active_time( $reply_id );
… and I’ve also tried to call it with just…
bbp_get_reply_last_active_time( $reply_id );
… which also returned nothing at all.
Most likely directly in a custom theme’s template file, where ever it’s appropriate.
/bbpress/loop-single-reply.php
maybe?
A few things. First, this won’t work in bbPress 2. It’s already done for you, and the function names are different. Also, it’s a bad idea to trust any global value to be output directly to the screen, as any plugin can manipulate them directly. You’ll want to wrap that output in an esc_url() call. Lastly, this post is almost 4 years old; bumping it with a simple ‘thanks’ type reeks of being spam.
Closing this so it doesn’t get bumped again, and anyone that finds this should take heed using that code in bbPress or WordPress going forward, as there are more elegant solutions.
Geesh, sorry for all the edits but I guess I don’t get your insert code thing. Anyway I used bbp reply author id to pull the id but this all together returns just that, the author id number. Any further ideas?
First of all, thank you for your help.
Now, I came up with…
$user = get_userdata( bbp_reply_author_id() );
if ( !empty( $user->user_nicename ) ) {
$user_nicename = $user->user_nicename;
}
… but it returns the user ID number, not the nicename. Any further thoughts?
Thanks netweb for creating the ticket.
Lynq – thanks for the code for the latest posts. Did you create a new php file with this code or put it in an existing file?
Sorry, but all three of your the links you referenced are referring to the old stand alone version of bbPress, we are trying to get all the docs updated but as some still use the 1.x versions we still need them though I know it becomes rather confusing if you hit a link relating to that old version.
bbPress 2.1 has built-in theme support, if you want customize bbPress to closer look like your WordPress theme please see https://codex.bbpress.org/theme-compatibility/ to get started.
OMG! :-(( You still can not see the right code.:-( This bbpress is filtering some strings… I will spell the strings in “”, you should write the code without spaces.
$content = str_replace(“& l t ;”,”<“,$content);
$content = str_replace(“& g t ;”,”>”,$content);
Hopefully I will succeed this (and last) time.:-)
This is a known issue for phpBB & Invision forums and the way it looks at the BBCode as its being imported, we are hoping to get this fixed for bbPress 2.2.
You can see more details on the problems here https://bbpress.trac.wordpress.org/ticket/1884
I do not know whar is happening… the right code again, trying it without “code” formatting…
add_filter(“bbp_get_reply_content”, “ps_bbp_get_reply_content”);
function ps_bbp_get_reply_content ($content) {
$content = str_replace(“<“,””,$content);
return $content;
}
Sorry, for some reason, one row was removed from the code. Here is the complete code. Additionally, the characters which were replaced by bbconvertor were replaced by the bbpress.org/forums reply content as well…:-) But you can see from the code what was replaced with what.:-)
add_filter("bbp_get_reply_content", "ps_bbp_get_reply_content");
function ps_bbp_get_reply_content ($content) {
$content = str_replace("<","",$content);
return $content;
}
Another observation + summary to the topic “bbpress is ignoring my customized index page file page-front-forums.php in my template directory”…
Default setup for forum base slug is “forums”. With this setup page-front-forums.php is being ignored. After change to “discussions”, the /discussion/ URL still ignores the template file BUT /forums/ URL is still working and it is working fine! (no shortcode usage).
BUT only for logged in users.:-)) Other users are redirected to web index page.
Anyway, I am happy to have at least some progress here.:-))
I have found the problem. bbConverter has imported all the first topic posts from my old forum to bbpress 2 with small modification: all “” characters were replaced with “<” and “>” (probably to remove HTML tags). I have resolved the issue by following code in my bbpress-functions.php file:
add_filter("bbp_get_reply_content", "ps_bbp_get_reply_content");
function ps_bbp_get_reply_content ($content) {
$content = str_replace("<","",$content);
return $content;
}
Hi everybody,
After a long “war” with spams in lost in end. I cant prevent them with plugins or even ban IP on .htaccess.
Now, I’m planing to close new registration, and to leave forum like it is, no new posts.
I have deleted code from register.php but again bot get registered on forum, I dont really know how they do it, since humans sent me emails why cant register on forum.
Anyway, I need help to stop them!!!!
if is needed here is forum im talking about
http://www.deluxetemplates.net/forums/
The codex is currently setup with a ‘context’ category that lets us split the docs between developer and user.
https://codex.bbpress.org/context/developer/ & https://codex.bbpress.org/context/user/
Building on that already existing theory as we reply to questions in the forum we should start tagging them appropriately ‘user’ or ‘developer’ and thus being able to follow each tag.
https://bbpress.org/forums/topic-tag/user/ & https://bbpress.org/forums/topic-tag/developer/
Should we also add other tags like ‘faq’ or ‘addtofaq’ or something along those lines so we can add tags to be able to follow topics we think need docs/updated docs/better docs and priority of that need etc etc… Suggestions?
Is ‘User” to dis-ambiguous in the ‘docs’ vs ‘end user username’ context for bbPress though?
(If we were able to edit the current topic tags we could quickly tag the past couple of weeks topics, als that will have to wait a little while longer)
Hi All,
The strategy that’s outlined here seems at odds with the method of integrating bbP into an existing WP theme described here: https://codex.bbpress.org/theme-compatibility/. In that recent post, it describes how I’m to copy files from the bbp-theme-compat folder into a subdirectory in my theme. That includes content-archive-forum.php but not archive-forum.php. I can also achieve customization by, as mentioned above, copying archive-forum.php directly into my theme.
Which is better and why?
Also, I’d like to add a list of the ten most viewed topics above the forum list on the main forums page. I can’t figure out how to limit the output of the topics list or sort by most views (don’t even know if that information is stored). Any help there would be appreciated.
Thanks!