To get register date i’m using:
echo 'Member since: '.date("Y/m/d", strtotime(get_userdata(bbp_get_reply_author_id())->user_registered));
Still working to show post count, soon i’ll get it 😉
In the code Jared so kindly offered, you’ll need to add soemthing like this to the array:
'div' => array(
'class' => array()
),
Hi everyone
Is there a way of disabling bbpress jquery and css files loading when a user visits the blog?
upon installing bbpress the “weight/loading” of a blog page increases a bit, anyway of disabling it? Only loading when someone visits the forum?
The following code disables the bbpress css, is there a way to disable the javascript/jquery?
Thanks
function mp_deregister_bbstyles() {
if ( function_exists( 'is_bbpress' ) ) {
if ( !is_bbpress() ) {
wp_deregister_style( 'bbp-default-bbpress' );
}
}
}
add_action( 'wp_print_styles', 'mp_deregister_bbstyles', 100 );
I have tried to fix this issue by replacing the code but no luck, it switched off whole website))
I think we will have to wait until new version comes out…any updates on this?
This is major issue for many, would be nice to have the whole that group.php fixed file or code, so we can replace it, otherwise just changing the code for the people not familiar with php is difficult(
Same problem here.
#bbpress-forums ul {
list-style: none outside none;
}
#bbpress-forums li {
list-style: none outside none;
}
Has absolutely no effect whatsoever. 🙁
HEEELLLLLP!
I’m wondering if there are any good plugins for member forum statistics out there. I’m imagining an admin page that lists members name, email, number of replies, and number of topics created. It would probably look something like the Users page. Optimally there would be an option to export and the columns could be toggle-able.
Searching hasn’t come up with much BBPress 2.0 Analytics Plugin is the closest but looks older, and there are many mentions of mini-stats but i can’t find it’s actual code anywhere (and it doesn’t sound like what I want).
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?