ok after some poking and prodding and trying with filter, still no joy, but did find more information.
When I am not logged in and the role/link works, the class used is bbp-topic-author
When I am logged in and the link/role does not work the class is bbp-reply-author
I tried
function ShowRoles($args =array()){
$args['show_role'] = true;
return $args;
}
add_filter('bbp_before_get_reply_author_link_parse_args','ShowRoles');
but there is no change. It is almost like the css section is being suppressed all together.
Any insight?
2 tips:
– Install my bbP Toolkit
– Use the code below:
// Change freshness time by removing the last part, so '1 month, 3 days ago' becomes '1 month ago'
function casiepa_shorten_freshness_time($return) {
$return = preg_replace( '/, .*[^ago]/', ' ', $return );
return $return;
}
add_filter( 'bbp_get_time_since', 'casiepa_shorten_freshness_time' );
add_filter( 'bp_core_time_since', 'casiepa_shorten_freshness_time');
PS. Ben je niet op https://wpnl.slack.com ?
In loop-single-topic.php the following function is requested <?php bbp_topic_last_active_time();?> and this will display 2 weeks, 1 day ago I would like to only state the first part so 2 weeks ago and lose the specificity of it being a 1 day
There are different kinds of specificity depending on when the topics was last active like:
1 day, 23 hours ago
2 weeks, 1 day ago
1 month, 2 weeks ago
and I would like to convert them all to
1 day ago
2 weeks ago
1 month ago
Any tips on this would be highly appreciated.
Hello,
OK, was not all the way fixed, but I was able to get it there.
@media screen and (max-width:480px) {
.bbp-reply-author {
float: none !important;
clear: both;
margin-left: 0px !important;
}
}
Hello,
I guess it was the !important rule tripping me up, I tried restricting it to desktop devices only and that still did not fix it. I worked with WPMU DEV a little more to come up with this which has seemed to fix it. Why I do not know, all I know is that it is fixed now.
@media screen and (max-width:480px) {
.bbp-reply-author {
float: none;
clear: both;
}
}
Thanks.
The issue is on line 307 of sccss which says
.bbp-reply-content > p {
font-size: 14px;
margin-left: -37px !important;
}
The margin left is causing it to display incorrectly
Solved by replacing the bit I though wasn’t working with:
li.bbp-topic-title { width:50%; }
li.bbp-topic-voice-count, li.bbp-topic-voice-count {
text-align: center;
width: 30%;
}
li.bbp-topic-reply-count, li.bbp-topic-reply-count {
text-align: center;
width: 20%;
}
@casiepa, just wondering if you had a chance to look at my code.
Thanks
When I use bbpress I notice that on the mobile it is all squished up. To solve this I have removed the freshness column and adjusted the spacing of the info, topic and posts columns. This works on the forums page but when I click on one of the forums the freshness column is removed but the spacing seems to be the same. Can you see what I have done wrong with my css?
li.bbp-forum-freshness, li.bbp-forum-freshness {
display: none;
}
li.bbp-forum-freshness, li.bbp-topic-freshness {
display: none;
}
li.bbp-forum-info, li.bbp-topic-title { width:50%; }
li.bbp-forum-topic-count, li.bbp-forum-topic-count {
text-align: center;
width: 30%;
}
li.bbp-forum-reply-count, li.bbp-forum-reply-count {
text-align: center;
width: 20%;
}
////// This is the bit that isn't playing nice
li.bbp-forum-info, li.bbp-topic-title { width:50%; }
li.bbp-forum-topic-count, li.bbp-topic-topic-count {
text-align: center;
width: 30%;
}
li.bbp-forum-reply-count, li.bbp-topic-reply-count {
text-align: center;
width: 20%;
}
Many thanks 🙂
Hi,
bbPress translation files comes automatically and the ‘search’ button is in the translated list:
value="<?php esc_attr_e( 'Search', 'bbpress' ); ?>"
But I see you also have ‘topics’, ‘posts’ and ‘freshness’, so nothing is translated.
Can you please tell me:
1) in what language locale your WordPress is running in ?
Dashboard > Settings > General Settings > Site Language
2) What version of WordPress and bbPress you are using ?
Pascal.
I had the same error i did this piece of code and the status code will be force to be 200 in my case was when i was showing the user public profile.
function bbp_fix_users_404_headers() {
if (bp_displayed_user_id() != 0 && is_404() ) {
global $wp_query;
$wp_query->is_404 = false;
status_header( 200 );
}
}
add_action( 'wp', 'bbp_fix_users_404_headers',0 );
Ok thanks for the explanation. I guess it was too long so it was not going through.
Here is my looptopics.php code. I got the filtering to work correctly, except a big problem is that it ignores sticky posts. It does not even grab the sticky css class so I definitely did something wrong.
http://pastebin.com/u4Ci0kYK
Thanks for the help
If not too long, you can put it between backquotes.
So click the ‘code’ button (one but last button in the box where you type your reply), paste your code, then click that same button that will now be called ‘/code’
If it too long, paste it somewhere else like pastebin or github and just put a link.
Ok, this is a dumb question but how do I paste source code here?…
Hi,
Interesting topic, I would be interested in your queries and how you show it 🙂
For the dropdown, how about something like this:
function casiepa_template_before_topics_loop() {
?>
<select name="menu1" id="menu1">
<option value="">Order by...</option>
<option value="http://www.example.com/?order=date">By date</option>
<option value="http://www.example.com/?order=pop">Nbr of Replies</option>
</select>
<script type="text/javascript">
var urlmenu = document.getElementById( 'menu1' );
urlmenu.onchange = function() {
window.open( this.options[ this.selectedIndex ].value );
};
</script>
<?php
};
add_action( 'bbp_template_before_topics_loop', 'casiepa_template_before_topics_loop', 10, 0 );
I finally found what was causing the problem after going through my functions.php.
Apparantly it was this function that was causing my bbp_topic functions to not function:
function SearchFilter($query) {
if ($query->is_search) {
$query->set('post_type', 'post');
}
return $query;
}
add_filter('pre_get_posts','SearchFilter');
After commenting this out everything seems to work perfectly fine now with all topic functions working and displaying correctly now.
I still don’t know exactly what it is but I probably am not using the $query stuff properly in here. Anyway the problem got much more clear now at least and can be dealt with much better now.
If you could confirm the above ?
And then, if you put the below in your functions.php, what do you get ?
function casiepa_custom_pagination( $args ) {
$args['type'] = 'list'; // try also 'plain'
$args['after_page_number'] = ' ';
return $args;
}
add_filter( 'bbp_topic_pagination', 'casiepa_custom_pagination' );
I’m not able to link to the site directly right now, unfortunately, but this is what the source looks like for the pagination area:
<div class="bbp-pagination-links">
<p> <span class="page-numbers current">1</span><br>
<a class="page-numbers" href="https://www.com/topic/test-1/page/2/">2</a><br>
<a class="next page-numbers" href="https://www.com/topic/test-1/page/2/">→</a>
</p></div>
@abiliocaetano, thanks for this, I added it to our codex article here.
Thank you. I’m having a little bit of trouble.
I found the original function I need to edit in bbpress/includes/topics/template.php:
function bbp_get_topic_reply_link( $args = array() ) {
// Parse arguments against default values
$r = bbp_parse_args( $args, array(
'id' => 0,
'link_before' => '',
'link_after' => '',
'reply_text' => esc_html__( 'Reply', 'bbpress' ),
), 'get_topic_reply_link' );
// Get the reply to use it's ID and post_parent
$topic = bbp_get_topic( bbp_get_topic_id( (int) $r['id'] ) );
// Bail if no reply or user cannot reply
if ( empty( $topic ) || ! bbp_current_user_can_access_create_reply_form() )
return;
$uri = '#new-post';
// Add $uri to the array, to be passed through the filter
$r['uri'] = $uri;
$retval = $r['link_before'] . '<a href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link">' . $r['reply_text'] . '</a>' . $r['link_after'];
return apply_filters( 'bbp_get_topic_reply_link', $retval, $r, $args );
}
The only line I need to modify is:
$retval = $r['link_before'] . '<a href="' . esc_url( $r['uri'] ) . '" class="bbp-topic-reply-link">' . $r['reply_text'] . '</a>' . $r['link_after'];
Is there an easier way to phrase my new function to modify just this variable?
Hello,
URL: http://yourtechadvisors.com/forums/topic/testing-safe-to-ignore/
I am using this plugin to add signatures: https://wordpress.org/plugins/gd-bbpress-tools/
I would like the Revision information to align under the Signiture. I am currently using this CSS.
.topic.type-topic.status-publish > .bbp-reply-content,
.reply.type-reply.status-publish > .bbp-reply-content{
display: -webkit-box;
display: -moz-box;
display: box;
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
box-orient: vertical;
}
.topic.type-topic.status-publish > .bbp-reply-content > .bbp-topic-revision-log,
.reply.type-reply.status-publish > .bbp-reply-content > .bbp-reply-revision-log{
-webkit-box-ordinal-group: 2;
-moz-box-ordinal-group: 2;
box-ordinal-group: 2;
}
.topic.type-topic.status-publish > .bbp-reply-content > .bbp-signature,
.reply.type-reply.status-publish > .bbp-reply-content > .bbp-signature{
-webkit-box-ordinal-group: 1;
-moz-box-ordinal-group: 1;
box-ordinal-group: 1;
}
It is working fine in Firefox, but not in Internet Explorer and Safari on apple devices such as IPhones. Can you please take a look for me?
Thanks.
Admin Custom Login
AdRotate Pro
amr shortcode any widget
bbpress
Duplicate Post (already tried disabling)
Easy WP SMTP (already tried disabling)
Envato WordPress toolkit
EventON
Fast Secure Contact Form
Foo Gallery
FooBox Free Image lightbox
Meta Box
Multi Feed Reader
Page Links To (tried disabling)
Revolution Slider
Rotating Tweets – Twitter widget & shortcode
Shortcoder
Sidebar Login
Widget Logic
WP All Import Pro
WP User Avatar
WPBakery Visual Composer
Afternoon,
I am looking to create a new template with an entirely new look and feel from what the basic / generic bbpress forums look like. Templates are not my issue but more along the lines of displaying the right content via 3 block rows.
I am looking for a starting point (at least) to achieve the following index layout – 3 block rows (using bootstrap):
FORUM NAME
Topics | Posts | Freshness
List of Sub Forums
FORUM NAME
Topics | Posts | Freshness
List of Sub Forums
FORUM NAME
Topics | Posts | Freshness
List of Sub Forums
Note: These will be in a 3-col format, not full width. Any help would be helpful! You can see a visual here: http://postimg.org/image/894k4fp47/
Yup I have literally copied all the code from ‘loop-topics.php’ in custom theme to the wordpress theme twenty fifteen, where it correctly does return true and topics are shown correctly.
I must have done something wrong in my custom theme, I just have no idea what the possible causes could be tho.
It just came to my mind that it might be template php file that bbpress uses, I’ll go check that now.
I use bbpress in combination with buddypress maybe it can be something with that also.
Hi,
You will have to check the bbp_topic_admin_links, something like:
add_filter ('bbp_topic_admin_links', 'change_topic_admin_links' );
function change_topic_admin_links ($r) {
// whatever is needed here
return $r;
}
Pascal.