Reply to posts
-
dashboard>settings>forums and allow threaded replies
I already have that clicked with the “4 levels deep”. Anything else that I should consider?
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.jswhere %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'); } }
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 Pollitthis is my question too!
- You must be logged in to reply to this topic.
ehasimon
@ehasimon
5 years, 8 months ago
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?