Back to Front (@traverser11)

Forum Replies Created

Viewing 18 replies - 1 through 18 (of 18 total)

  • Back to Front
    Participant

    @traverser11

    No sorry I never did work it out.

    In reply to: Updatable Post Date

    Back to Front
    Participant

    @traverser11

    Yes you could use

    .bbp-reply-post-date {
        display: none;
    }

    to hide you bbpress reply post date.

    But to display the post modified date you would need to add this function in you child theme templates whereever you want to display, eg replace
    bbp_topic_post_date();
    with
    the_modified_date();
    in templates/content-single-topic-lead.php

    In reply to: Add emoticons

    Back to Front
    Participant

    @traverser11

    I spent a bunch of time configuring out emojis on my site, so interested in this question.
    But ’emojis’ are different than ‘smileys’.
    Wordpress supports ‘smileys’ aka ’emoticons’

    Could you search and replace in the database to change the old smilleys to these

    Using Smilies

    And then if you want to use custom images, try this?

    How to Customize the WordPress Emoticons


    Back to Front
    Participant

    @traverser11

    Akismet is the biggest help with this. And yeah I think Wordfence helps too. I’m getting hundreds of spam registrations a day. There are a few registrations getting through the spam filter that are suspicious, but not definitively robots. Hard to tell…

    I wish for a spam solution that has more configurable settings than Akismet though. Some genuine topic replies getting marked as spam.

    Some kind of captcha on the registration page? As for my site, I’m avoiding doing that because the non-tech literate users, but there must be some kind of plugin out there that adds that?

    In reply to: Updatable Post Date

    Back to Front
    Participant

    @traverser11

    I haven’t used this together with bbpress topics… but does get_the_modified_time() work? https://developer.wordpress.org/reference/functions/get_the_modified_time/


    Back to Front
    Participant

    @traverser11

    Oh sorry I’m wrong. Quite confused!

    The pagination issue is not resolved, i just didn’t remember the issue, duh.

    So reminding myself, the issue is, with the reply order set to descending, upon posting a new reply, it tries to redirect to the anchor of the that reply, but it goes to first reply on the last page of the pagination. Has me stumped!


    Back to Front
    Participant

    @traverser11

    Hi sorry its been a while! Been busy with other projects.


    @robin-w
    @webmasterfreya this is what I’ve done to reverse the reply order on certain topics. And now I’ve come back to it after a month, I can’t reproduce the issue of it breaking the pagination. It seems to work as expected, without adding another function to mess with the pagination.

    Install

    bbPress – Sort topic replies

    Remove the parts that sort the forum’s topic order, as they are causing errors, and they aren’t desired for this purpose (sorting the reply order)

    // Adds meta box to the side bar of the Forums edit pages
    add_action( 'add_meta_boxes', 'bbPress_meta_box_add' );
    function bbPress_meta_box_add(){
    	add_meta_box( 'bbPress_meta_box_sort_desc', 'Sort Replies', 'bbPress_forum_meta_box', 'forum', 'side', 'high' );
    }
    

    and

    	// Save sort settings for forum
    		if( $_POST['str-bbpress-sort-replies'] == "desc" ){
    			update_post_meta($post_id, '_bbp_sort_desc', 'desc');
    		}elseif( $_POST['str-bbpress-sort-replies'] == "asc" ){
    			update_post_meta($post_id, '_bbp_sort_desc', 'asc');
    		}else{
    			update_post_meta($post_id, '_bbp_sort_desc', 'dft');
    		}
    

    and

    	// Save show lead settings for the forum
    		if( $_POST['str-bbpress-sort-replies-show-lead-topic-forum'] == "yes" ){
    			update_post_meta($post_id, '_bbp_topic_sort_show_lead_topic_forum', 'yes');
    		}elseif( $_POST['str-bbpress-sort-replies-show-lead-topic-forum'] == "no" ){
    			update_post_meta($post_id, '_bbp_topic_sort_show_lead_topic_forum', 'no');
    		}else{
    			update_post_meta($post_id, '_bbp_topic_sort_show_lead_topic_forum', 'dft');
    		}
    

    I can send the whole file if thats more useful.

    Sorry I hope i’m not missing something that we noticed before? Actually my site is using threaded replies. So unfortunately it’s not using pagination, its unfortunate it can’t have both. But I turned it off to test this and it it worked.

    Regarding the buddypress activity stream…
    Here is an example of a member page with buddypress activity stream.
    https://houseonfire.backtofrontdesign.co/members/forum_2tbmmm/
    I think it also works as expected showing forum replies in the reverse chronological order.

    In reply to: Bbpress theme

    Back to Front
    Participant

    @traverser11

    Good question. it would be nice to know if any themes – especially core themes, would be well updated to look good and be responsive with all aspects of bbpress and buddypress?

    I’m using twenty twenty and there is a lot of work to make bbpress presentable to be honest.


    Back to Front
    Participant

    @traverser11

    Heres a get started guide!

    Customizing

    or tldr; copy the files from
    plugins/bbpress
    to
    your-child-theme/bbpress
    and edit them there!


    Back to Front
    Participant

    @traverser11

    I’m confused about which archive you are looking at that causes this problem?
    Sorry I got busy with my other jobs but I’ll come back to this, lets get it sorted!


    Back to Front
    Participant

    @traverser11

    Oh here is an answer!

    Wrong bbp_get_reply_url() when paging with reverse order

    This snippet works – i’m just a bit confused how to turn it on when replies are descending and off when they are ascending…

    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
    }

    Back to Front
    Participant

    @traverser11

    Thanks again @robin-w and @webmasterfreya

    I ended up deleting the part causing errors from ‘bbpress sort topic replies’ plugin, and that works – (for topics not for forums though)… Its nice because it gives the ‘show lead topic’ and reply sort order in the admin meta box. Can share somewhere if its useful.

    But yes now I see what you mean! that upon posting the newest reply, it redirects to the last page of the pagination, which in the case of replies descending by date, makes no sense. Sorry for hijacking your topic!

    Hmmm any ideas where to start on this?


    Back to Front
    Participant

    @traverser11

    I gave it a go, and it kinda worked, lol…
    But this reverses all the replies INCLUDING the original topic.
    So the original topic goes to the bottom…
    What I would ideally want is the Topic, THEN the replies in reverse order…

    // Reverse reply order on News topic
    
    add_filter('bbp_has_replies_query','bbp_reverse_reply_order');
    function bbp_reverse_reply_order( $query = array() ) {
    	// Identify post type
    	$bbPress_post_id = get_the_ID();
    	$bbPress_post_type = get_post_type($bbPress_post_id);
    
    	if( $bbPress_post_type =='topic' ){
    
    		/** TOPIC **/
    			$query['order']='DESC';
    			return $query;
    
      }
    };

    Back to Front
    Participant

    @traverser11

    Checking in because I want this too… there was a plugin called ‘bbpress sort topic replies’, that no longer works, but I’m going to try to grab the code from that


    Back to Front
    Participant

    @traverser11

    Thanks again for taking a look is the code that appends the checkboxes to the bbpress topic forms… I guess $_POST is a global variable that bbpress topic form is also using?

    Sorry this is obviously a bit beyond me. And obviously beyond a free solution! But yes if you or others in bbpress do paid work like thiset me know and I’ll be in touch!

    // Add custom taxonomies to topic form
    
    add_action ( 'bbp_theme_after_topic_form_content', 'bbp_extra_fields');
    
    function bbp_extra_fields() {
    
    $value = get_post_meta( bbp_get_topic_id(), 'issue', true);
    	echo '<div id="custom-meta">';
    	echo'<fieldset>
            <legend>Issues</legend>';
    	$issues = get_terms('issue', array('hide_empty' => 0));
    	foreach ($issues as $issue) {
    	echo '<span><input type="checkbox" class="issue" for="issue" value="'.$issue->slug.'"></input><label>'.$issue->name.'</label></span>';
    	};
    	echo '</fieldset>';
    
    $value = get_post_meta( bbp_get_topic_id(), 'region', true);
    global $region;
    $region = get_terms('region', array('hide_empty' => 0));
    echo'<fieldset>
            <legend>Region</legend>';
    $regions = get_terms('region', array('hide_empty' => 0));
    foreach ($regions as $region) {
    echo '<span><input type="checkbox" class="issue" for="issue"value="'.$region->slug.'"><label>'.$region->name.'</label></span>';
    };
    echo '</fieldset></div>';
    };

    Back to Front
    Participant

    @traverser11

    Thanks @robin-w! I’m still very lost, but I’ll try and pick up the clues from this as best I can:
    using bbp_new_topic_post_extras() in place of bbp_new_topic() ?
    using wp_update_post() instead of wp_set_object_terms() ?

    And I guess these two functions define $terms and all the variables seperately within each… I think that’s the bit I”m most confused how to achieve…

    Hmm I’ll keep trying, but launch the site first and leave this feature for down the track.
    but if anyone knows how to work this out, and wants some work to do it, let me know 🙂


    Back to Front
    Participant

    @traverser11

    I was having a bunch of trouble with this too, 8 years later!

    I tried
    bbp_topic_excerpt('200')
    and
    wp_trim_words( bbp_topic_excerpt(), 200, '...' );
    But they wouldn’t actually change the excerpt length.

    Anyway I found this other function in bbpress files, that does the job.
    bbp_get_topic_excerpt($topic_id = 0, $length=200)


    Back to Front
    Participant

    @traverser11

    Oh I found the error in my code above
    Just replacing
    is_category()
    with
    is_archive()

    Still, not sure I’m taking the best approach here,
    maybe I’m missing a simpler way to categorise topics?

Viewing 18 replies - 1 through 18 (of 18 total)