MyBB Community Forums

Full Version: Quote posts from other threads not working?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

  1. Select at least one post to quote by just hit Quote button in thread #A.
  2. Hit Reply button in another thread such as thread #B
  3. Under the text box, it should be displaying You have selected X posts outside of this thread., and two clickable links Quote these posts too and deselect these posts (or their single forms) .
  4. deselect these posts works, but Quote these posts too doesn't, click it and get no response.

Quote posts from other threads works in Quick rely. MyBB also has this problem. Is it an abandoned feature, or a bug, or just something I've missed?

I'm using Firefox on Windows.

I didn't look into theme/template and script code, since I think it should also be relating to JavaScript and Ajax that I'm not familiar with. So I'm just asking Toungue

PS, why the list mycode has to be changed from [ol] to [list].. Sad

I suspect this problem relates to SCEditor: TypeError: $(...).sceditor(...).insert is not a function in posts.js. I see that quote from other threads works in Quick reply because it use CSS ID selector to get the text box.
		var id = 'message';
		if(typeof $('textarea').sceditor != 'undefined')
		{
			/* This line causes error, from SCEditor. */
			$('textarea').sceditor('instance').insert(json.message);
		}
		else
		{
			/* Quick reply use this code. */
			if($('#' + id).value)
			{
				$('#' + id).value += "\n";
			}
			$('#' + id).val($('#' + id).val() + json.message);
		}
		
		$('#multiquote_unloaded').hide();
		document.input.quoted_ids.value = 'all';

Best I can do, JSis a trouble to me. There seems to be so many bugs with SCEditor in MyBB. Looking forward to its replacement or upgrade Rolleyes .
GitHub issue goes here: https://github.com/mybb/mybb/issues/3773

More note on the two thread.js & post.js:
showthread template includes thread.js only.
newthread & newreply templates include post.js only.

In a default MyBB installation, the built-in SCEditor can only be enabled on full posting pages, i.e., newthread & newreply pages. Quick reply and vanilla text input box in newthread & newreply use #message as the input box's id. But it should be possible to enable quick reply to also use a WYSIWYG editor, and therefore thread.js & post.js should be able to both support where the WYSIWYG editor is not configured.

Besides, looks like the cookies clearing is performed differently in quick reply and newreply/newthread page after a user clicked Quote these posts now link.
Please open a PR with a fix
(2019-12-04, 06:15 PM)Eldenroot Wrote: [ -> ]Please open a PR with a fix
Already, and has been merged.
Great! Thx!