ACPS - Ajax Continuous Post Scrolling (Facebook Styles) (Partially Hook!)

Started by Hj Ahmad Rasyid Hj Ismail, July 26, 2014, 09:12:32 PM

Previous topic - Next topic

Hj Ahmad Rasyid Hj Ismail

Link to Mod

ACPS - Ajax Continuous Post Scrolling

- For SMF 2.0.x
- Partially hook with only display template file modification.
- Based on Emanuale Tips

1. Please do your own backup though every installation is backed up automatically.
2. This mod will try to used ajax to display your post with continous scrolling like in FB / Facebook Styles.
3. Instead of using pagination i.e. by clicking the page number, you can simply scroll down until the end of the posts.
4. However, this mod has it caveat i.e. depending on your forum server, it may break if the posts are more than 500 or so.
5. For that you have to find and install Emanuales limit topic length mod.
6. Once installed, refresh your post display page and it should work immediately.
7. You can test it in lower SMF 2.0.x version too as it should work just fine. ;)


Thank you for using/testing it.


Yours friendly,
Abu Fahim Ismail.

BSD License. Feel free to modify accordingly but keep Emanuale's name and author's link if it is in here somewhere. ;)

 

#Change Logs

@Version 1.0.2
- Converted to partialy using hook for SMF 2.0.x.

@Version 1.0.1
- Disable ajax inline / quick modify for scrolling posts added by ajax. It does not work anyway.
- Give user option to disable default ajax inline / quick modify so that it will look cleaner.

@Version 1.0.0
- Only Admins See Load Time Initial Release.

Biology Forums

Quote from: ahrasis on July 26, 2014, 09:12:32 PM
Link to Mod

ACPS: Ajax Continuous Post Scrolling (Facebook Styles)
Based on Emanuale's Tips

1. Please do your own backup though every installation is backed up automatically.
2. This mod will try to used ajax to display your post with continous scrolling like in FB / Facebook Styles.
3. Instead of using pagination i.e. by clicking the page number, you can simply scroll down until the end of the posts.
4. However, this mod has it caveat i.e. depending on your forum server, it may break if the posts are more than 500 or so.
5. For that you have to find and install Emanuale's Limit Topic Length mod.
6. Once installed, refresh your post display page and it should work immediately.
7. You can test it in lower SMF 2.0.x version too as it should work just fine. ;)
8. Will try to port this to SMF 1.1.x as well, later.


Thank you for using it.


Yours friendly,
Abu Fahim Ismail.

BSD License. Feel free to modify accordingly but keep Emanuale's name and author's link if it is in here somewhere. ;)

 

Thank you for #8, the porting to 1.x. Quick question though, does this totally eliminate pagination in thread view? Like, could I click page 3, for example, and then the auto-scrolling starts from page 3?

Douglas

Has this been tested on large forums (let's call this 2 million posts or more, I'm eying a 7.5 million post forum for this Mod right now) to see what kind of a performance hit it does?

How does it handle new replies since last visit to that thread (either via the link at the top to "Show all new replies since your last visit" or the "New" icon next to the subject on the topics listing page).
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Hj Ahmad Rasyid Hj Ismail

Shuban, it should work even if you are not in the first page.

Douglas, it has never been tested on big forums. What I did was merely packaging this mod. The caveat is in #4 and its solution (temporary i guess) is in #5. The original post of this tips is also linked in the OP.

Douglas

Before I can even consider implementing this on Hogville (7.5+ million posts), someone would need to do some performance testing to see how much of a resource hit it would be on servers. I am *very* interested in this Mod, but cannot risk testing it on Hogville (we don't have a test environment that can simulate day to day activities).
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Arantor

There's almost no-one qualified to do such performance testing.

Honestly though, at a glance, I would suggest that performance is not significantly more arduous than normal paging through topics since it appears to simply mirror grabbing the next page and only grabbing the content it wants. The only real difference is that you'll have the requests very slightly closer together than you might otherwise.

But that's an opinion without actually even testing it, just skim-reading the code and based on what I remember of the original thread.

Just be glad you're not field testing Discourse, that will nail your server to the wall on performance. Even a modest site requires a VPS, minimum 1GB RAM.

Douglas

Quote from: ‽ on July 30, 2014, 12:35:58 PMJust be glad you're not field testing Discourse, that will nail your server to the wall on performance. Even a modest site requires a VPS, minimum 1GB RAM.
I need to update the Big Boards stuff for Hogville's configuration, but at last count, we were up to 12 boxes (six of them are web servers). ;)
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie / Guru / Maven / whatever)

Arantor

Yeah but a forum of 50-60k posts should not require a VPS, right? A forum just starting out should not automatically require a VPS, right? ;)

I would wonder if there aren't ways to improve performance; I know I found at least one bug in 2.0 that meant a query could be saved on the vast majority of topic views, fo example. (Fixed in 2.1, not included in a mainline patch because it's pretty fragile to fix as a patch as it requires a lot of moving around)

David111567

Will this work in PM and all other areas of the website as well?  Example... sayyyy...SMF Articles?

Hj Ahmad Rasyid Hj Ismail

No. It is meant for display (post) page only. May be I'll try to port it to other page like pm, message index, etc... Later, that is. For the time being, let's see whether there is any problem while running this mod that is known or unknown to us. ;)

David111567

Quote from: ahrasis on July 31, 2014, 04:35:06 AM
No. It is meant for display (post) page only. May be I'll try to port it to other page like pm, message index, etc... Later, that is. For the time being, let's see whether there is any problem while running this mod that is known or unknown to us. ;)

Sounds good. Thanks.

It's a very cool concept.... I'll try the mod on my website.

Kimmie

I like this mod. Found an issue that may need addressing though.

Example: Thread has 3 pages. When scrolling down, it will populate all posts in the entire thread (that part works great).

When someone makes a reply, lets say they want to go back through and read previous posts - you have to go back and click on page 1 or page 2 to get to those posts. Scrolling up only takes you to the top of page 3 and none of the posts before that repopulate  (they go away once you submit a post).

Is there any way to fix this?  Such as having it work both up and down?



Hj Ahmad Rasyid Hj Ismail

Yes. For the time being it will not scroll up to the first post and will just scroll down to the end of the post.

It do not need a fix, since it is not reported as broken, but it features may be added as per your suggestion.

Kimmie

Quote from: ahrasis on August 15, 2014, 12:55:35 AM
Yes. For the time being it will not scroll up to the first post and will just scroll down to the end of the post.

It do not need a fix, since it is not reported as broken, but it features may be added as per your suggestion.


Ok I just assumed that it would work both ways. I didn't really consider that a feature, but more so a  common sense thing that folks would want it. Just let me know when you update it with this, and I will reinstall the mod. Being able to scroll both ways is why I was going to use it. I want to do away with "pages" period.

Arantor

Doing away with pages has so many side issues it really isn't funny, unless your threads are all really short (like no more than 3 pages)

Biology Forums

Quote from: ‽ on August 15, 2014, 01:11:33 PM
Doing away with pages has so many side issues it really isn't funny, unless your threads are all really short (like no more than 3 pages)

You never know, some people might have a mod installed that restricts the number of replies that can be made for a thread. This mod could come in handy, and can be further developed to fix all the small issues. I see potential here, good work, ahrasis.

Arantor

Trust me, I've tried infinite scrolling on threads from 1 post to 13000 posts in a single thread... it is terrible in usability terms, the longer the thread, the worse it gets.

Biology Forums

Quote from: ‽ on August 15, 2014, 04:42:49 PM
Trust me, I've tried infinite scrolling on threads from 1 post to 13000 posts in a single thread... it is terrible in usability terms, the longer the thread, the worse it gets.

I can picture that, it would be a disaster, but that's something the mod author or others can find a fix for, or a trick. I think pagination should be incorporated along side this mod, so that if someone wants to start reading on page 8, they can click page 8 and the infinite scroll begins from there.

The disqus script seen on many blogs nowadays does a good job in letting the reader know that new comments have been made in real time. Not sure if this mod models that, but it would be cool if it did.

Arantor

The thing is, Disqus runs on a much heavier stack than most hosts, because the heavy load of trying to do that...

Let's just put it this way: I know a forum that does infinite scrolling and the live updating you're talking about. A 50,000 post forum that requires an expensive VPS just for a smallish number of users.

Biology Forums

I hear yeah, not worth it.

Is it an SMF forum? If so, I would like to see it...

Advertisement: