News:

Join the Facebook Fan Page.

Main Menu

Swipe LR

Started by shawnb61, September 05, 2024, 10:51:10 AM

Previous topic - Next topic

shawnb61

Link to the mod

Description:
The Swipe LR mod allows users to swipe left & right on an SMF forum when using a touchscreen enabled device.

Swiping navigates to the next or previous topic in the board.  It behaves as if you had clicked on the "Previous Topic" or "Next Topic" links at the top of the page.  These links are not available on a smartphone in responsive mode, so this mod enables that navigation via swiping.

Limitations:
 - Javascript must be enabled.
 - Left & right navigates among topics only, it does not navigate among admin menu tabs, etc.
 - This mod may not work if a custom theme has redefined, reused, or restructured the "nextlinks" class.

Releases:
 - v1.0 Initial Commit
 - v1.0.1 Naming consistency
 - v1.0.2 Only one call needed
 - v1.0.3 Tweak sensitivity
 - v1.0.4 Fix pinch zoom issues on iPhone
A question worth asking is born in experience & driven by necessity. - Fripp

shawnb61

If I had $1 for every time I swiped left on this forum and it just didn't work...
A question worth asking is born in experience & driven by necessity. - Fripp

Arantor

I have often wondered if there is a better model for the previous/next topic because I've never been convinced that "next topic chronologically" is a useful thing.

I'm all for making things easier to get at but the mystery tour of what you get is... Hrm. I've never liked it, even in phases of "read every post everywhere". We did try on Wedge to make this more evident to the point that we didn't just state "previous/next" but actually fetched the titles. I'm not sure it really helped, but it always nagged at me that there should be a more logical thing to do with this.

I also have a memory of the data being pushed into the meta tags as rel links in 2.0 and later removed in 2.1 because they weren't the "meaningful" ones for SEO purposes, but if you're looking for a way to concretely avoid reliance on theme markup, you could push the prev/next URLs into that (or even somewhere equally controllable as data attributes) and not need to rely on the theme markup.
Holder of controversial views, all of which my own.


shawnb61

v1.0.4 is out - addressed an issue with pinch & zoom on iPhone Safari.
A question worth asking is born in experience & driven by necessity. - Fripp

Advertisement: