Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply to posts

  • @ehasimon

    Participant

    Hi. When a user replies/comments on a certain post, the new post appears at the end of the chain of posts rather than underneath the post they are wanting to comment on. They, therefore, cannot easily view the other persons’ comment. How can this be fixed?

Viewing 5 replies - 1 through 5 (of 5 total)
  • @robin-w

    Moderator

    dashboard>settings>forums and allow threaded replies

    @ehasimon

    Participant

    I already have that clicked with the “4 levels deep”. Anything else that I should consider?

    @robin-w

    Moderator

    ok, so

    1. Save the attached code to your pc, as a new file called reply.js
    2. Create a directory on your theme called ‘js’, and copy the renamed file reply.js to it, so that you end up with wp-content/themes/%my-theme%/js/reply.js

    where %my-theme% is the name of your theme

    Let me know if this works

    addReply = {
    	moveForm : function(replyId, parentId, respondId, postId) {
    		var t = this, div, reply = t.I(replyId), respond = t.I(respondId), cancel = t.I('bbp-cancel-reply-to-link'), parent = t.I('bbp_reply_to'), post = t.I('bbp_topic_id');
    
    		if ( ! reply || ! respond || ! cancel || ! parent )
    			return;
    
    		t.respondId = respondId;
    		postId = postId || false;
    
    		if ( ! t.I('bbp-temp-form-div') ) {
    			div = document.createElement('div');
    			div.id = 'bbp-temp-form-div';
    			div.style.display = 'none';
    			respond.parentNode.insertBefore(div, respond);
    		}
    
    		reply.parentNode.insertBefore(respond, reply);
    		if ( post && postId )
    			post.value = postId;
    		parent.value = parentId;
    		cancel.style.display = '';
    
    		cancel.onclick = function() {
    			var t = addReply, temp = t.I('bbp-temp-form-div'), respond = t.I(t.respondId);
    
    			if ( ! temp || ! respond )
    				return;
    
    			t.I('bbp_reply_to').value = '0';
    			temp.parentNode.insertBefore(respond, temp);
    			temp.parentNode.removeChild(temp);
    			this.style.display = 'none';
    			this.onclick = null;
    			return false;
    		}
    				
    		try { t.I('bbp_reply_content').focus(); }
    		catch(e) {
    			
    
    			
    			
    		}
    		
    		
    
    		return false;
    	},
    
    	I : function(e) {
    		tinymce.execCommand('mceFocus',false,'bbp_reply_content');
    	}
    	
    	
    	
    }

    @ehasimon

    Participant

    Thanks for the code. I did as you said.
    I opened the incognito browser and a forum.
    When wanting to comment on a reply it still opened the reply box at the bottom of the list rather than immediately under the post I wished to reply to.
    Thanks for the help. Next step??
    Regards
    Simon Pollit

    @apandwin

    Participant

    this is my question too!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar