MyBB Community Forums

Full Version: Ajax Preview Post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I suppose MyBB 2.0 will include ajax, so it will be nice if we could have a "Preview Post" using ajax.

Something like the Quick Reply thing we already have Smile
Where would it appear on the post page?
(2011-10-10, 03:39 PM)Nitrus Wrote: [ -> ]Where would it appear on the post page?

If you have used SMF you will know, the preview will appear in newthread.php/editpost.php/newreply.php just like now, but using ajax to update the content.
AJAX transitions would be cool on quick reply too.
It would be a nice feature to have, but definitely unnecessary. Assuming MyBB 2.0 decides to go with the far superior Markdown instead of BBCode, open-source libraries like PageDown (used on StackOverflow and similar) would allow for quick client-side previewing.
IIRC, this was supposed to be part of 1.6, but they thought it would mess with another feature. I believe it was the click and hold to rename a thread thingy.


I swear to God I can type well whilst intoxicated.
Ajax things are heavyweight to server if wrong planned... I've tried several mybb Ajax plugins and they always killed my server-response time.

Please make it optional if there are plans to implement it

And PLEASE keep mybb accessible to Shared hosting plans. Mybb 1.6x it's lightweight than 1.4x and I hope even more improvements on that side Big Grin
In the case where a WYSIWYG editor (which 2.0 will have iirc) is used, you already have this feature. I understand the convenience of AJAX, but if you turn the entire forum into a giant javascript mess, it defeats the purpose. There's nothing wrong with a page reload to see what your post will look like.
(2011-10-09, 04:17 AM)Sama34 Wrote: [ -> ]I suppose MyBB 2.0 will include ajax

1.6 already "includes ajax". All AJAX is, is using Javascript on the client and PHP on the server to establish two-way communications. It's a programming technique, not some specific code or language.

It's also pretty light on the server if done properly (I have a whole site that lets the users access a huge database using AJAX - on an old 600 MHz Windows 2k server - and unless you have a really slow connection to the server, it runs about as fast as a desktop app. (A few of the apps on the web server were desktop apps, so I can compare the speed directly - and the desktop apps are running on my much faster desktop, but they're not running much slower on the web server.)

As far as a "mess" of Javascript, I don't know about the native library in 1.6 (I use jQuery for my sites), but an AJAX call using a decent library is only a few lines of code. (I mean a few - one program I wrote today, for instance, uses just 3 lines [plus what I want to do with the data that comes back from the server] for the AJAX call.)
My point is that using AJAX for everything defeats the purpose of using it in the first place. Once the entire forum has been converted to AJAX it's no faster or better than a standard HTTP request. The other problem is that most JS isn't optimized properly (I personally don't know JS, and hate it with a burning passion) and not every browser supports the same features so you end up with an inconsistent UI, and that's not even considering the people who browse without JavaScript entirely.

I don't think JS is evil or anything, but I think it should be used in moderation. Not everything needs to be super duper flashy.
Pages: 1 2 3