Hey Jason! You could try resetting the user roles, in: Tools > Forums
You can also try this neat little tool I wrote, to check out what capabilities specific users have in your forums: https://github.com/johnjamesjacoby/bbp-capabilities/
What you’re experiencing sounds like bbPress isn’t sure what to do with the role those users have, or doesn’t like the capabilities those users have saved in the DB. Other users have had similar issues, and have fixed them by remapping the roles with the above tool(s).
@thesnowjunkies @johnjamesjacoby @undyingearth @olivier-lettinga So here’s what I did, it looks to work but I haven’t fully put it through its paces. I’m also kind of a n00b with this PHP WordPress thing so hopefully this isn’t a terrible idea. I basically used an add filter on bbp_get_time_since and did a regex string replacement on the output removing anything from the first comma up to ‘ago’.
function short_freshness_time( $output, $older_date, $newer_date ) {
$output = preg_replace( '/, .*[^ago]/', ' ', $output );
return $output;
}
add_filter( 'bbp_get_time_since', 'short_freshness_time' );
Hi
I have just set up BBpress on one of our websites (not live yet) and everything seems to be working ok except for one little problem:
I have marked the forum private as I would prefer people to register first rather than bombard the forum with spam etc. But this generates a new problem as the private forum is automatically given a prefix of “Private:”
Please advise how I can removed the said prefix? I saw a thread for a bit of code to change this but it doesn;’t say which page it needs to be added to:
Please any help is gratefully received.
Thanks
thanks, but meta description not working since it will insert embed code and image code to header if the first brand of the post have markup code. thats an unsatisfactory thing ryt?
my blog
I want to increase the size of an avatar on a forums landing page. I could just go into loop-single-topic.php and change this line:
<?php printf( __( 'Started by: %1$s', 'bbpress' ), bbp_get_topic_author_link( array( 'size' => '14' ) ) ); ?>
But I’d rather not edit core files. I’m having troubles making this change in my functions.php with apply_filter. Wondering if anyone can help me out here.
In form-reply.php after the line:
<div class="bbp-template-notice"><p><?php _e( 'Your account has the ability to post unrestricted HTML content.', 'bbpress' ); ?></p></div>
I inserted <?php else : ?><div class="bbp-template-notice"><p><?php _e( 'PLEASE NOTE: Your post will be sent to AWAITING MODERATION folder, will be posted if approved!', 'bbpress' ); ?></p></div>
Which is not so good because I am changing the core file. Is there a better way to do this?
Ah no links allowed probably.
site to see my code working is www cultivators-forum com/cultivators-forum
sorry for the cheeky link, dont care about visitors nrs, is a work in progress.
P.H.
ps. see if this gets posted here.
wow just wrote long reply press post and all is gone??
came down to that you can mail me at seedism@gmail.com and i will send code to thank you for your reply.
I am not yet posting it here cause I want to use it for a theme i am trying to create.
preview here:
P.H.
The two examples you gave are close, but do not actually show what I need, this link is more like what I mean.
But, they did make me realize that the desired hierarchy can be achieved with a combination of css and selecting the right category/forum/topic order, and that the existing three levels (categories/forums/topics) is one too little.
This is what I think is a solution.
1.Create/give parent Categories a name to display as title in a new category header, remove all other data through css from the header, like the “topics” and “freshness” text since this needs to be echoed only in the next level of categories.
2.Create categories in parent category and change functions and css so they show as a list under each other and include topics and hierarchy text.
3.create another level of categories to act as main forums, here we include the freshness-links and topic count.
4.Topics/threads are created inside the fourth level.
5.remove the original bb-header to allow the first level categories to take over this function.
I think this makes sense to me, will have to try tomorrow if this works.
I can not yet make my solution of the freshness-topic-title public since I am working on a theme with this function included, I can not send private messages on the bbpress forum else I would have pm’ed you it as appreciation for your reply.
You can send me a mail and I will send you the code but please keep it to yourself.
seedism@gmail.com
Here is a link to a live demo, this is a work in progress and site is not close to finished but you can get an idea of what I did.
http://cultivators-forum.com/cultivation-forum/
Peter Hamilton
Not sure as I’ve never used s2member like that.
Maybe post the whole code & someone may know?
Post & page ID are the same I think. Hover over the page/post and you’ll see the ID number shown in the url right at the bottom of the browser window.
I know this is an old topic, but here is my recent solution to this problem. You can see it live here.
First install Collapse-O-Matic plugin.
Then create a new page/post. And add the code below & save. I hope this helps.
[expand title=”Add New Topic”][bbp-topic-form][/expand]
[bbp-topic-index]
Trying to add
&& !current_user_can("access_s2member_level4") ;
to what you have… but gave error saying that the array was not longer an array. Do you know how to do this?
also is page = post id? if not, how did you find the page id?
thank you
Or maybe it’s down here
/**
* Output the view url
*
* @since bbPress (r2789)
*
* @param string $view Optional. View id
* @uses bbp_get_view_url() To get the view url
*/
function bbp_view_url( $view = false ) {
echo bbp_get_view_url( $view );
}
/**
* Return the view url
*
* @since bbPress (r2789)
*
* @param string $view Optional. View id
* @uses sanitize_title() To sanitize the view id
* @uses home_url() To get blog home url
* @uses add_query_arg() To add custom args to the url
* @uses apply_filters() Calls 'bbp_get_view_url' with the view url,
* used view id
* @return string View url (or home url if the view was not found)
*/
function bbp_get_view_url( $view = false ) {
global $wp_rewrite;
$view = bbp_get_view_id( $view );
if ( empty( $view ) )
return home_url();
// Pretty permalinks
if ( $wp_rewrite->using_permalinks() ) {
$url = $wp_rewrite->root . bbp_get_view_slug() . '/' . $view;
$url = home_url( user_trailingslashit( $url ) );
// Unpretty permalinks
} else {
$url = add_query_arg( array( 'bbp_view' => $view ), home_url( '/' ) );
}
return apply_filters( 'bbp_get_view_link', $url, $view );
}
Please someone help – I am a designer not a programer – honestly I hadn’t realized that bbpress WOULDN”T have the forum name associated with the topic…
Samul thanks for the info. Can you please advice which code i should replace? Im not good at all with php
Many thanks!
Or maybe it’s down here
/**
* Output the view url
*
* @since bbPress (r2789)
*
* @param string $view Optional. View id
* @uses bbp_get_view_url() To get the view url
*/
function bbp_view_url( $view = false ) {
echo bbp_get_view_url( $view );
}
/**
* Return the view url
*
* @since bbPress (r2789)
*
* @param string $view Optional. View id
* @uses sanitize_title() To sanitize the view id
* @uses home_url() To get blog home url
* @uses add_query_arg() To add custom args to the url
* @uses apply_filters() Calls 'bbp_get_view_url' with the view url,
* used view id
* @return string View url (or home url if the view was not found)
*/
function bbp_get_view_url( $view = false ) {
global $wp_rewrite;
$view = bbp_get_view_id( $view );
if ( empty( $view ) )
return home_url();
// Pretty permalinks
if ( $wp_rewrite->using_permalinks() ) {
$url = $wp_rewrite->root . bbp_get_view_slug() . '/' . $view;
$url = home_url( user_trailingslashit( $url ) );
// Unpretty permalinks
} else {
$url = add_query_arg( array( 'bbp_view' => $view ), home_url( '/' ) );
}
return apply_filters( 'bbp_get_view_link', $url, $view );
}
Please someone help – I am a designer not a programer – honestly I hadn’t realized that bbpress WOULDN”T have the forum name associated with the topic…
You can change this through your bbpress.css file fairly easily. The IDs/classes you’re looking for will be similar to this:
#favorite-toggle, #subscription-toggle {
text-decoration: none;
padding: 0 6px;
font-weight: bold;
}
#favorite-toggle a {
color: #d7be4c;
}
#favorite-toggle a:hover {
color: #dfca66;
}
#favorite-toggle span.is-favorite a, #subscription-toggle span.is-subscribed a {
color: #888888;
}
#favorite-toggle span.is-favorite a:hover, #subscription-toggle span.is-subscribed a:hover {
color: #555555;
}
#subscription-toggle a {
color: #39c696;
}
#subscription-toggle a:hover {
color: #4cd4a5;
}
That’s an older version of what I was using — in there you can see that these elements will change the color based on whatever you set them to:
#favorite-toggle span.is-favorite a, #subscription-toggle span.is-subscribed a
Take note of “span.is-favorite a” and “span.is-subscribed a”. Those are the important ones that will allow you to change the color and style.
If you’d like to add a check mark, you can do something like:
#favorite-toggle span.is-favorite a:before, #subscription-toggle span.is-subscribed a:before {
content: "ā";
}
In the above, I added the “:before” pseudo elements to indicate that “before the word, add this content.” The content is the checkmark. Alternatively, you can also use the “:after” pseudo element and add things that way. Both work.
@allenpayne It seems i’ve even more a beginner with this. I added your code above to my functions php and just got errors. What am I missing?
Hi all,
So I’m now just trying to remove the ‘topic contains’ elements in bbpress, and I’ve used @jshultz ‘s code above in my themes function.php file, but it no longer seems to work.
Would there be an update for this?
I have exactly the same problem. Can someone please help?
Thank you.
Solved it with the following code in my theme’s function.php:
add_filter(‘bbp_current_author_ip’, ‘my_anonymize_ip’);
function my_anonymize_ip($retval) {
$retval = ‘0.0.0.0’;
return $retval;
}
I found out that the filter “bbp_current_author_ip” is called by bbp when creating a new topic/reply.
I am extremely frustrated with a recent install of bbPress and BuddyPress.
My understanding is that, when you create a forums page with the same name as the bbPress forum slug, this page will show the list of forums.
Mine did not. I finally used a short code on a new page and it gave me a list of forums – though the formatting leaves a lot to be desired.
Unfortunately, every time you click a forum link on the page, it takes you to the listing of forums. You can never access the individual forums to post questions or comments.
Thoughts on how to fix this?
bbPress 2.3.2
BuddyPress 1.8
WordPress 3.5.2
Responsive theme
http://dev.brownfieldagnews.com/
There must be a way to do this. I am in includes/common/template-tags.php
I see:
/** URLs **********************************************************************/
/**
* Ouput the forum URL
*
* @since bbPress (r3979)
*
* @uses bbp_get_forums_url() To get the forums URL
* @param string $path Additional path with leading slash
*/
function bbp_forums_url( $path = '/' ) {
echo bbp_get_forums_url( $path );
}
/**
* Return the forum URL
*
* @since bbPress (r3979)
*
* @uses home_url() To get the home URL
* @uses bbp_get_root_slug() To get the forum root location
* @param string $path Additional path with leading slash
*/
function bbp_get_forums_url( $path = '/' ) {
return home_url( bbp_get_root_slug() . $path );
}
/**
* Ouput the forum URL
*
* @since bbPress (r3979)
*
* @uses bbp_get_topics_url() To get the topics URL
* @param string $path Additional path with leading slash
*/
function bbp_topics_url( $path = '/' ) {
echo bbp_get_topics_url( $path );
}
/**
* Return the forum URL
*
* @since bbPress (r3979)
*
* @uses home_url() To get the home URL
* @uses bbp_get_topic_archive_slug() To get the topics archive location
* @param string $path Additional path with leading slash
* @return The URL to the topics archive
*/
function bbp_get_topics_url( $path = '/' ) {
return home_url( bbp_get_topic_archive_slug() . $path );
}
I figure there MUST be a way to add the forum to the topics URL. Iām doing this because I have a action based upon the URL string and need to have all things on that forum associated with that at a URL level. I’m more of the design end than the development end of things and though I see it there I cannot seem to bridge the gap.
I was also reading: https://bbpress.trac.wordpress.org/ticket/2258 – has there been any progress here?
Customizing this has taken much longer than expected & I’d like to resolve this. Any thoughts would be appreciated.
TY
I am in includes/common/template-tags.php
I see
/** URLs **********************************************************************/
/**
* Ouput the forum URL
*
* @since bbPress (r3979)
*
* @uses bbp_get_forums_url() To get the forums URL
* @param string $path Additional path with leading slash
*/
function bbp_forums_url( $path = '/' ) {
echo bbp_get_forums_url( $path );
}
/**
* Return the forum URL
*
* @since bbPress (r3979)
*
* @uses home_url() To get the home URL
* @uses bbp_get_root_slug() To get the forum root location
* @param string $path Additional path with leading slash
*/
function bbp_get_forums_url( $path = '/' ) {
return home_url( bbp_get_root_slug() . $path );
}
/**
* Ouput the forum URL
*
* @since bbPress (r3979)
*
* @uses bbp_get_topics_url() To get the topics URL
* @param string $path Additional path with leading slash
*/
function bbp_topics_url( $path = '/' ) {
echo bbp_get_topics_url( $path );
}
/**
* Return the forum URL
*
* @since bbPress (r3979)
*
* @uses home_url() To get the home URL
* @uses bbp_get_topic_archive_slug() To get the topics archive location
* @param string $path Additional path with leading slash
* @return The URL to the topics archive
*/
function bbp_get_topics_url( $path = '/' ) {
return home_url( bbp_get_topic_archive_slug() . $path );
}
I figure there MUST be a way to add the forum to the topics URL. I’m doing this because I have a action based upon the URL string and need to have all things on that forum associated with that at a URL level. Any ideas?
Add the following code to your functions.php
function forum_icons() {
if ( 'forum' == get_post_type() ) {
global $post;
if ( has_post_thumbnail($post->ID) )
echo get_the_post_thumbnail($post->ID,'thumbnail',array('class' => 'alignleft'));
}
}
add_action('bbp_theme_before_forum_title','forum_icons');
Hope it helps š