MyBB Community Forums

Full Version: Can't figure out how to customize Quick Edit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm usually pretty good at working around mybb, but I don't really know where to start here!

Running MyBB 1.8.4.

I'm trying to customize the Quick Edit feature on posts. Ideally, I would like for it to display the textarea, where the member can edit their post, and then the post returns to the exact same HTML layout but with the text changes in place. The *only* thing I want to update in the database is $message. But here's my issue:

[Image: Bgqb3nu.png]

This is the postbit before anything has been changed. You'll notice I have some additional variables that are sent to the database from the full post screen (time, date, location, footnotes, etc). These shouldn't change from the Quick Edit. These need to stay the same. The intention is for the Quick Edit to *only* change the post message.

Now, you click on Quick Edit...

[Image: fKz3MBZ.png]

The textarea appears - I know it's hard to see, I haven't gotten around to altering the CSS for it yet. My main issue is the javascript I guess, because I don't know how to fix what happens next:

[Image: pNuhNiS.png]

The post is sent, except the HTML for the postbit vanishes, and it also resubmits the information for time, date, location, etc from the database!

Interestingly, when you refresh the page, the postbit HTML is back. It also doesn't wipe ALL the HTML in the postbit, just everything inside the "posttext" div, it seems.

[Image: wSKFmdo.png]


My issue is this:

I don't know how or where to edit the Quick Edit template to preserve the original HTML inside the posttext div, or to prevent it from resubmitting/wiping the pre-existing additional variables in the postbit. I'm a little less fluent with javascript/jquery than I am PHP, so this one really has me stumped. I've found bits of the Quick Edit template in jscripts/thread.js and possibly jscripts/post.js ? Those files remain untouched since I've installed the software. But I have no idea how to do this.

If somebody with a little more expertise in the language or experience with the files could point me in the right direction, that would be great! Thank you. Smile
(2018-12-23, 04:38 AM)MadisonTrupp Wrote: [ -> ]I'm usually pretty good at working around mybb, but I don't really know where to start here!

Running MyBB 1.8.4.


First and foremost...

You should upgrade your MyBB 1.8.4 to MyBB 1.8.19. There have been many security and code updates since that version you are running now.

Download the FULL MyBB 1.8.19 package HERE.

This is the best and safest way to upgrade your website.