Danbooru

Suggestion: Preview (forum) posts

Posted under General

Hello everybody,

first of all: Sorry for my recent suggestion requests/topics. I hope it doesn't strike you as unneccesary.

This time I want to request a "preview" button/feature for forum posts.
I tend to post longer replies if they are neccesary (like some of you also do). While I wrote my reply Firefox suddenly wanted to refresh the page (I can't remember pressing F5). And guess what: I raged and cursed. My whole post was gone.
Normally I would copy/paste my longer texts into notepad, but this time I forgot this "safety measure".
This is one of the reason I started this tread. The other one is also quite simple:
The longer the text, the more complicated to check the posts for mistakes. It's really a pain in the ass to check one's post in such a tiny window.

My solution: A preview mode.
The whole Setup would be quite easy: Modify the index and show files in the app/view/forum line 25/71 and add another button "Preview". The preview page should just display the message formatted (eg. forumlinks as well as other postlinks already converted), as well as your message in a (editable) box below the preview. Buttons would be the same as before: "Post" and "Preview" (Preview in this case means refresh with edited content).
The transferring of text between the index and preview pages can be done with sessions or hidden fields, aka (session variant in PHP):

session_start();

//assign
$_SESSION['title'] = $_POST['title'];
$_SESSION['body'] = $_POST['body']

In preview page(s):

session_start();

echo $_SESSION['title'];
echo $_SESSION['body'];

The merit:
You can push "Preview" to actually "save" your current state. You can continue work on the preview page(s) easily.
Furthermore you can directly check formatting/spelling/errors more easily. Very useful especially for long posts.

This feature can be used for comments as well (but less needed, since image comments are commonly short).

Please tell me your thoughts about this, since this really catched my attention.

P.S.: Funnily the preview function would have saved me from editing this post now (after rereading it), since the PHP code wasn't showing at all.

Updated

I'd rather it be an optional feature. I think posting and then editing is a better interface than previewing and then posting; however, there's no reason we can't have two buttons. While we're on the subject, editing is currently slightly broken in that, once done, it redirects you to the first page in the thread rather than to the post you just edited.

First of all, thanks albert for considering my idea. Very much appreciated.

LaC said:
I'd rather it be an optional feature. I think posting and then editing is a better interface than previewing and then posting; however, there's no reason we can't have two buttons.

One of my problems (mentioned above) is the incredible system "unfriendlyness" towards longer posts. The input window I'm just typing this message is tiny in width and height. To review longer post you either:
a) have to manually copy/paste it into notepad and review it
b) get a headache reviewing the post in this tiny window
or, like you suggested c) post a reply (which may be totally useless without correction), then review it afterwards (while others at the same moment might try to make some sense of it) and then edit this post again in this small edit-box.
Ok, I overexaggerated a little bit on the c) part :) , but it really shouldn't be too hard to implement such feature and the "coding to benefit" ratio would be enormous ;) .

Frevel said:
One of my problems (mentioned above) is the incredible system "unfriendlyness" towards longer posts.

That's a feature. Many of your posts are simply too long.
However, some browsers, such as Safari, let you resize the textarea at will.

Thank you Albert (or another dev) for considering and realizing my idea. I really hope this solves some issues I had and provide a better interface for everyone. On a side note: the Preview on the same page via Ajax/JS is really clever. Now I can finally sleep well :)

1