Jump to content

AJAX fast reply


Guest Logan

Recommended Posts

Posted

I think it'd be a good idea to add AJAX to the fast reply, when using it, without a page refresh it would be posted. Of course have the "Loading..." box pop up too while it's doing it's thing :P

Posted

Whereas this was possible with quick reply, Im not sure if that's possible because you arnt changing existing html, you're adding to it and there are cases when someone posts before you or if your post is supposed to be on the next page.

Posted

Theoretically you could put in a hidden div with no content that appears once the post is submitted with the row.

It is crude, but it works. You may want something that checks if any new replies have been made ... if there have been, then reload the page, else put the post in the div.

Keith

Posted

IPB would use DOM (Document Object Management) to modify the HTML of the current page. This is advanced Javascript that most programmers don't know.

You can treat table elements, and all other HTML tags extremely object-oriented allowing you to do whatever you want with them.

I could write a script that would strip all of the second column rows found in the HTML source for a given script.

Posted

ugh please NO to going ott with javascript/AJAX etc.

that was one of the reasons i liked ipb over vb in the earler days vb was full of js bloat, whereas ipb only used it when it really helped things.

using this sourt of system may SLIGHTLY lighten server load but at the expense of drmatacally increasing rendering time and general cup usage for the members (espacally those using older machines that like using multiple tabs)

Posted

it wouldn't really be that hard to accomplish an ajax fast reply.

The post isn't going straight from the textarea into the table anyway, it has to run through the IPB process to be cleaned up and all that first, so instead of just returning the HTML for the one reply, it could easily get any new posts since you opened the thread and return it all at once and insert it to the end of the posts table, not that big of a deal really.

Posted

An AJAX-fastreply using IPB's core code would be quite tough, because replying a topic will get the full topic thrown back at you. So it'd mean pumping the whole page core html into the body-tag. (guess who made a system on his IPB2.1.3 testboard that is even more convenient than an AJAX-fastreply :whistle: )

hmm.. edit: now that I've read my post myself, there is a way to do this... going to write it now)

ugh please NO to going ott with javascript/AJAX etc.



that was one of the reasons i liked ipb over vb in the earler days vb was full of js bloat, whereas ipb only used it when it really helped things.



using this sourt of system [i]may[/i] SLIGHTLY lighten server load but at the expense of drmatacally increasing rendering time and general cup usage for the members (espacally those using older machines that like using multiple tabs)

AJAX and any javascript for that matter won't affect rendering time as long as it's function aren't called upon.
Posted

Just made a quickie test. I managed to use ajax-fastreply now.


Now I have 3 choices. Either I throw the response in a div underneath the fast reply saying
('You have replied this: blablablabl'). Makes it clear that you've already posted, but it's not layed out neatly yet.

Or, I try to parse the last post (check on the last_postid) and throw it in a div underneath. But if someone posted before you, there's a problem.

Or I throw the whole thread back as a response and fill the body with it.


EDIT:
or... I check if the last post of the thread still is the last_postid I made with my last post. If yes, then just throw that last_post back, if not, throw the whole page back.

Ah it's too late to program.. I'll think about it tomorrow morning in the rush hour.


(PS. whatever option I chose, even throing the whole page back as a response, it'd be easier for the server to handle.

Posted
ajax_fast_reply.rtf Ah well, here's the code. Don't know if the howto is good enough (it works on my testboard), I'll support it later when I'm back from work tomorrow. Test it out, but remember to use backups.

Ehm... save it as rtf and open it in wordpad...
Posted

Personally, I don't have an issue with the refresh - its fast enough for me.

What if someone else posts before you? How should it handle that?



It could check for new posts and show those also.


vB does this already. Shocked that IPB doesn't...



Just becuase vB does it, it doesn't mean IPB should.


Yes, this mod is good for IPB, but there are some error inside.


Matt, can you make this in 2.1.4?



You'd be lucky to see somthing like this in a point release. Perhaps in 2.2 or 3.0, even then, don't hold your breath.
Posted

As Matt knows when he looks at this idea... and most of you need to know... you can do whatever you want to a page using DOM (Document Object Management), you add html tags, and add them to the page wherever you want. It's extremely simple.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...