Add ReplyNew TopicNew Poll

 Post drafting plugin, sO oFfIcIaL (but like really not)
#


Post Drafting:




user posted image

user posted image


This script appends post drafting options to the posting form for new topics and new posts (no polls yet, because I forgot they exit until literally just now), and can save, load, and organize drafts from the UCP notepad - topic drafts will show up when you're creating a new topic, and post drafts will show up when you're creating a new post. It does not yet feature auto-saving, so it's probably more a novelty than not, buuuut that can come in the future if it's needed.

The only usage concern is that, in order to have full topic draft functionality (inserting title/description as well as the body), you'll need to disable the file attachment system.

As for the notepad itself, it should preserve any non-draft content, so you needn't worry about purging member notepads. Lemme know if you have any trouble!

JQuery drafting (GitHub)

This post has been edited by Dusty: Jun 12 2017, 10:21 AM
PM
#
Cool stuff. Nice work. http://files.b1.jcink.com/html/emoticons/smile.gif

signature
email: admin@jcink.com :: blog: John C.
#
Thanks! I've already squashed a number of bugs I didn't notice before, funny how that works. Hopefully it's a decent stand in for the time being!

This post has been edited by Dusty: May 15 2017, 05:58 PM
PM
#
Shoot me a PM. (: Are you also okay with a peer review of the code itself?
PM
#
I'd absolutely welcome it! I am a far cry away from an experienced programmer, and most of what I write is followed by "I have no idea why that works, but it does?" and that's only a slight exaggeration.

I'll send them off in a bit!
PM
#
QUOTE (Dusty @ May 16 2017, 12:33 PM)
I'd absolutely welcome it! I am a far cry away from an experienced programmer, and most of what I write is followed by "I have no idea why that works, but it does?" and that's only a slight exaggeration.

I'll send them off in a bit!


LOL welcome to programming! That feeling never goes away.
PM
#
OP updated, figured it should be stable enough c:
PM
#
Will be trying this out and using it, Dusty! It's an awesome bit of code. http://files.b1.jcink.com/html/emoticons/biggrin.gif

One suggestion I have, on the draft preview could it be possible to put a :before of "Topic Title:" and "Topic Description:" in front of those respective items?

EDIT: How do you disable file attachment settings so that this will load up the saved Title/Description too? >>

This post has been edited by Ekko: Jun 13 2017, 03:55 PM
PM
#
You can just disable the 'Upload' category in the per-forum's permissions mask! Aaand you can, actually. The divs are .prevtitle and .prevdesc
PM
#
Awesome, and beautifully customizeable. Thanks, Dusty! Further question on customizing to fit a skin - how would you go about changing the font color and background of the draft name input box and the draft dropdown? It doesn't seem that Jcink's .textinput and other such CSS is affecting it?
PM
#
Aw shucks Ekko, not a problem!

user posted image

If any of these selectors are wrong, I'm going to look like a huge(r) dweeb.

EDIT:

Aaaaaaahaaha shucks, I spotted a bug already that had an extra GET request going for every page load regardless of location. Script is updated, should be all dandy now.

This post has been edited by Dusty: Jun 13 2017, 11:59 PM
PM
#
The selectors worked for me! I'll continue to mess around (and see how much I can break this thing.. >> ) with it for feedback!

One more thing, I noticed that the area where the .load-preview toggles... Changes from initial load - how it looks when I first open New Topic - and how it looks after I've toggled between a draft and closed it.

user posted image

Aaand after toggling the drop-down from a saved draft back to the ----

user posted image


What would need changing to fix it so that it looks like the second image from the start?
PM
#
Ha, I love it when I review my own stylesheets and go "what in the why did I do that?" Add a 10px height to .load-preview and it should work. That entire preview box is a little hacky and poorly coded, but riiiight this moment I'm not feeling redoing it :X
PM
#
This is so extremely handy!! I think auto-saving would make this even more helpful, but the post drafting as is is already really amazing. Thank you for this!
PM
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 »

Options Add ReplyNew TopicNew Poll