Pages: (3) 1 2 3  ( Go to first unread post ) Add ReplyNew TopicNew Poll

 Post drafting plugin, sO oFfIcIaL (but like really not) - now with aUtOsAvE
#
baby cakes

Should be fixed. You can convert the improperly saved thread to a post if you need.

This post has been edited by Dusty: Oct 29 2017, 11:57 PM
PM
#
Absolutely brilliant. I have the code in a webpage so I can keep it updated on all my skins so please let me know if it gets updated at any time.

signature
user posted image
#
Dusty
now it’s perfect! thank you so much! <3
PM
#
Love this and am using it on my forum, thank you so much!! http://files.b1.jcink.com/html/emoticons/biggrin.gif

signature
user posted imageuser posted imageuser posted image
user posted image
"you do know I have the worst memory in the high desert right"
"that's a lie, you just fill your memory with all things BTACD related"
#
Just pushed an update to GitHub to implement autosaving (default timer is 5 seconds after the last key-press inside the topic title, topic description, or post area, configurable at the bottom of the script). I tested a few scenarios for reliability, but as with anything, bugs may surface. No new CSS or elements have been added, so you can keep whatever CSS you've used til now

GMaster479, as requested

two seconds, I'm a dumbo and messed up

kay, should be all set

This post has been edited by Dusty: Feb 15 2018, 02:41 AM
PM
#
Nice work. Can I please make one request?

In the draftSave() function, please include a GET parameter that indicates these requests are coming from the script. Something like draftautosave=1. Yes, this is for tracking purposes for resource use. Although I think on most boards this won't be an issue I'm just concerned if a high traffic board were to use it.

Using the notepad is a very crafty/clever way of implementing this but as I'm sure you already know, it forces an update query with a significant amount of data to one of the members tables every 5 seconds that someone is typing. The notepad data is in the member_extra which is a better situation than it could be but still not totally ideal. That update means it needs to get a quick lock, write the data, and release the lock on that table.

We want to create a post drafting/autosave functionality and delegate it to its own memory based table so that this kind of thing won't happen.

If you want me to submit this on github I will. It will just let me see what's going on internally, that's all. http://files.b1.jcink.com/html/emoticons/smile.gif

signature
email: admin@jcink.com :: blog: John C.
#
All good and done! I wondered about how it'd look on the server's side, but hopefully it's not terrible. There's an interrupt for keypresses, so if someone's typing at a consistent speed of at least one letter per ten seconds (also just pushed that up), then it'll suspend a save.

I'm curious - is there any significant difference in server response between saving to the notepad versus saving to, say, a custom profile field?
PM
#
Thanks, I appreciate that. http://files.b1.jcink.com/html/emoticons/smile.gif

QUOTE
I'm curious - is there any significant difference in server response between saving to the notepad versus saving to, say, a custom profile field?


Custom profile fields could in theory be worse, actually. They are stored in the *_pfields_content which definitely receives more read traffic and update traffic than the member_extra table. member_extra is a really strange table, actually, because it only has a member id, notes, photo and interests fields. These could have been included in the regular members table, but perhaps the programmer split the members table from this type of data at the time for similar reasons -- not wanting to do a huge block of text update against the primary table.

signature
email: admin@jcink.com :: blog: John C.
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Share this topic:
« Next Oldest | Feedback and Discussion | Next Newest »

OptionsPages: (3) 1 2 3  Add ReplyNew TopicNew Poll