Skip to main content
Ajax toys Started by badmonkey · · Read 4561 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Ajax toys

@ahrasis

Didn't you write a couple of SMF add ons based on ajax?  Specifically continuous post scrolling and instant reply? 

How hard would it be to port those to Elk?  I'd be willing to try to help, though my coding knowledge is about enough to be dangerous.  Please don't go to much trouble over it though.  In all truth I would like to test mods like these and keep them if they don't cause excess server load or other issues.  What are your thoughts?

Re: Ajax toys

Reply #1

Infinite scrolling should be easier than SMF's one (there is no need to bother about alternating classes and markup is more structured and easier to deal with). IIRC the most painful thing to "port" to the infinite scrolling was the quick-edit because it's a js attached to "certain" posts and that was a bit tricky. I don't remember how it was fixed at the end (if it was fixed at all lol).
As for SMF, there is the problem of the quick reply and the footer, but some kind of fixed container should do the trick.
Bugs creator.
Features destroyer.
Template killer.

Re: Ajax toys

Reply #2

If I remember correctly, the one in SMF is a pack of @emanuele tips and tricks and was not really mine. I think I did mention that in the mod.

There is one similar addon here which emanule help in rewriting that mod the Elk's way, if I am not mistaken, Endless. I lost the working copy of it but I think it is still here in the forum. I'll search for it then.

As for ajax, in FlarumStyle addon, there is a similiar function demonstrated by @inter where it can show / list more posts upon a click, almost similar to Endless. This is also good stuff.

Re: Ajax toys

Reply #3

I will look for Endless when I get home.  That's cool!  Thanks guys!


Re: Ajax toys

Reply #5

Sweet!  I'll try it out.  Thank you!  I'll also report back in case it helps someone else. 

Re: Ajax toys

Reply #6

That is awesome!!  The only thing I can see it needs is to hide the "load moar" link when the last page is reached.  There may be a bug there - it will display the last page twice if you click it again.  Do you have any suggestions on a fix?

Re: Ajax toys

Reply #7

I already noted that and I think it is fixable. @emanuele also noted something more of which you can read in that topic.

Re: Ajax toys

Reply #8

Quote from: ahrasis – I already noted that and I think it is fixable. @emanuele also noted something more of which you can read in that topic.

Indeed you did.  Somehow I didn't grasp that first read.  Perhaps excitement got the better of me.  lol


Re: Ajax toys

Reply #9

It was a while ago, but I may have left that on purpose: if you reach the end it may or may not be the end depending if someone posts new messages while you are reading, so if you leave the page open and.... in an hour wants to see new messages, you can just click on "load more", but if you hide the load more you are done, the only solution is to refresh the entire page to see if there is any new message.
Bugs creator.
Features destroyer.
Template killer.

Re: Ajax toys

Reply #10

Could the page ajax back periodically to check for new posts, and if there are, automatically add them with a highlighted background so the user knows they're new?  Not that I'd have any clue how to begin to do that....lol.