Hi,
with just this small portion of the code, it’s difficult to see the whole loop/picture of course. I’m not sure of what you try to obtain, but just one thing to start from your first one (custom_bbp_reorder_replies), to inverse the order I used:
if ( bbp_is_single_topic() && !bbp_is_single_user() ) {
$args['orderby'] .= 'post_modified';
$args['order'] .= 'DESC';
}
Pascal.
Hello,
Is there a way to specify the date format use in bbPress? In various places of bbPress, the date format do complies to IOS 8601 standard and prints the ‘T’ element to specify the beginning of ‘time’ element like: 1994-11-05T08:15:30-05:00
Conversely, if I print bbp_get_reply($id) the format DOESN’T conform to ISO 8601 and prints the following: 1994-11-05 08:15:30-05:00. Notice that ‘T’ is missing. Its inconsistencies breaks my code in various places and wonder if there’s a way to specify the output?
Thanks
Loc
I think this works:
add_filter('bbp_get_reply_position', 'lugpa_get_reply_position', 10, 3);
function lugpa_get_reply_position($reply_position, $reply_id, $topic_id){
if(empty($topic_id))
$topic_id = bbp_get_reply_topic_id ($reply_id);
$numReplies = bbp_get_topic_reply_count($topic_id);
return ($numReplies+1) - $reply_position; // plus one because of thread description
}
I’m not sure about the +1 but it works. I tested this with first and last comment of a given page.
Hi.
I’m showing my replies as a timestream, meaning I display the newest replies above the oldest one. Like this:
function custom_bbp_reorder_replies($args) {
$args['order'] = 'DESC'; // 'ASC' (Ascending, Default), 'DESC' (Descending)
return $args;
}
add_filter('bbp_before_has_replies_parse_args', 'custom_bbp_reorder_replies' );
Well, in My Replies Created I’m showing a list of replies with a link to corresponding thread like this:
<a href=" <?php echo bbp_get_reply_url() ?>" class="bbp-topic-edit-link">...</a>
But that is not working because bbp_get_reply_url() is considering default order instead of reverse. So, when doing this it returns the wrong page:
$reply_page = ceil( (int) bbp_get_reply_position( $reply_id, $topic_id ) / (int) bbp_get_replies_per_page() );
(that code is in includes/replies/template.php, line 487)
Maybe a hook around there would help.
By now I’m not sure how to solve it for myself.
thanks
gd bbpress tools is not very interesting (no tool bar, no CODE bbcode). Your js will be great !
For writing option a tried with other theme…it’s the same 🙁
Hi!
In my topics the bbp-reply-permalink (that with the number like #1010) does not jump to the specific reply as soon as there are more pages.
Once a new page started, the url of all new replies permalinks on page 1 try to direct to a non-existing url on page 2, eg: /forums/topic/topicname/page/2/#post-1010. Every reply’s permalink on page 2 then tries a redirect to a non-existing url on page 1, eg /forums/topic/topicname/#post-1050.
Suspected changes in the reply order to be the fault, but deactivating the custom code to get edited replies to the top as well as setting default order of replies did not have any effect.
Would be very thankful for any help!
@denaize
for bbcode use gd bbpress tools. It does not modify the quicktags toolbar automatically but you can change the output of the buttons though.
I have to find my custom editor.js file so give me a minute to help you on that.
I’m looking to limit the “Edited by xxxx” to the last edit at the end of every post. I remember looking through the forum on the topic, and I found it suggested to another user to use WordPress’ own the_author and the_modified_time. This should work great, however, how do I include the revision notes from the last edit? In other words the reason a user adds for editing their post.
Yeah: Convert emoticons like :-) and :-P to graphics on display
Maybe your Theme has it somewhere else. But if you don’t find it, contact the support of that plugin to get more detailed answers.
Pascal.
this works:
$topic_id = bbp_get_topic_id();
$forum_id = bbp_get_topic_forum_id( $topic_id );
$forum_name = bbp_get_forum_title($forum_id);
if(stripos($forum_name,'baufinanzierungsberater')!==false){
… now there is still the problem with the different title
Hi
I tried Wp-Monalisa but in admin i can see :
Please turn off Settings -> Writing -> ‘Convert emoticons like…’ to use wp-Monalisa smilies).
but I dont have this setting in worpress 4.3.1…
gd-bbpress-attachments is OK, thank you. Unfortunately that the pro version is too too overpriced…
If Wp-Monalisa has no worries, just BBcode are missing !
thanks
Hi Chrissilisa,
Do you want to define your own functions ? Or just do something before every topic is displayed ? Maybe the last paragraphs of https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum-part-5/ about the ‘bbp_before_X’ could help you out here.
Pascal.
I guess you could use a hook if you want to add the styles in the head.
How much, and what are you trying to style specifically?
Every forum and the topics under that forum should have a class that says bbp-parent-forum-ID and the normal post-ID class, with the ID being the post ID.
Glad you got yourself sorted out in your issue.
I also see that there is a huge avatar issue on your site so inserting this CSS into your child themes style css file or in a custom css plugin will fix that.
#bbpress-forums p.bbp-topic-meta img.avatar,
#bbpress-forums ul.bbp-reply-revision-log img.avatar,
#bbpress-forums ul.bbp-topic-revision-log img.avatar,
#bbpress-forums div.bbp-template-notice img.avatar,
#bbpress-forums .widget_display_topics img.avatar,
#bbpress-forums .widget_display_replies img.avatar {
margin-bottom: 0;
vertical-align: middle;
border: 1px solid #ddd;
width: 14px !important;
height: 14px !Important;
}
Hello,
how can I give different childforums there own style ?
Is there a hook like “before show topics” where I can place my own css style ?
I counldnt find anything in the codex.
Thanks,
bye
ChrissiLisa
I found now a solution with bbp Stylepack and the provided shrotcodes:
[bsp-display-topic-index show=’5′ forum =’10’ show_stickies=’true’ template = ‘short’]
now only the topics from one forum are displayed
thx for help !
Marcin
Yeah, this seems to remove it. Place it somewhere where you can add CSS:
.bbp-topic-form .bbp-form legend {
display: none;
}
Pascal.
Hello,
I use this function (in functions.php) to show extra fields over a topic form:
add_action ( 'bbp_theme_before_topic_form_content', 'bbp_extra_fields');
function bbp_extra_fields() {
/*Extra-Felder Baufinanzierungsberater*/
if($GLOBALS['forum']=='baufinanzierungsberater'){
echo '<div id="baufinanzierungsberater_edit_box"><div style="width:50%;float:left;">';
$value1 = get_post_meta( bbp_get_topic_id(), 'nachname', true);
echo '<label for="nachname">Nachname</label>';
echo "<input type='text' name='nachname' value='".$value1."'><br />";
$value2 = get_post_meta( bbp_get_topic_id(), 'vorname', true);
echo '<label for="vorname">Vorname</label>';
echo "<input type='text' name='vorname' value='".$value2."'><br />";
}}
This works. But when I want to edit the fields after saving the topic, the fields are gone. Which action do I have to use to show the fields?
Thanks,
best regards
ChrissiLisa
hi Pascal,
Thanks – I was hoping that I do not have to “code” anything 🙂 and can use something already prebuild and only exchange the forum Id.
THX
Marcin
Hi,
That shortcode calls the content-single-forum.php template file. So you’re options are to copy that file to your theme and edit it (but this will be reflected globally, not just in the shortcode).
Or create your own shortcode based off the bbPress one and have it use a custom template file.
Pascal.
Hi,
Is there a way I can show a topic list from just one forum on a page ?
I already tried the standard widgets – e.g. recent topics – but this one shows topics from all forums. Additionally I used the shortcode [bbp-single-forum id=00] but this shows beside the list also the creation of a new topic – I only would like to have the list.
Thanks
Marcin
P.S. Working local; WP 4.3.1; bbPress 2.5.8; Theme GeneratePress
Ok, I figured it out.
Just wrote a small plugin adding the “newzik” protocol :
<?php
/**
* Plugin Name: NZK links support
* Plugin URI: http://newzik.com/
* Description: Adds support to newzik:// links
* Version: 1.0
* Author: Pierre Mardon
* Author URI: http://newzik.com/
* License: None
*/
/**
* Extend list of allowed protocols.
*
* @param array $protocols List of default protocols allowed by WordPress.
*
* @return array $protocols Updated list including new protocols.
*/
function wporg_extend_allowed_protocols( $protocols ){
$protocols[] = 'newzik';
return $protocols;
}
add_filter( 'kses_allowed_protocols' , 'wporg_extend_allowed_protocols' );
?>
Hi
I’m looking for bbpress, it works well but toolbar lacks a bit of ergonomics.
My members needs smiley, classical [quote] a quote[/quote] or [code]C code[/code] and picture/files attachement.
how do I get it ?
Thank you in advance
WP 4.3.1 and last bbpress
Hi,
I am aware I can use the shortcode [bbp-single-tag id=181] to display forum posts associated with the tag 181. However, I’d like to pull content assoociated with more than one tag.
Could someone please help me?
Thank you