Rad Geek People's Daily

official state media for a secessionist republic of one

Posts filed under JavaScript

Friday Lazy Linking

Humanized History WordPress plugin: magic endless scrolling for your WordPress blog

Earlier this year I showed off a new geegaw for my websites, first at Rad Geek People’s Daily, and then at Feminist Blogs. That’s the Humanized History feature that provides the magic endless scrollbars for Geekery Today and Feminist blogs. I used some WordPress template kludges and a bit of unobtrusive JavaScript to magically fetch older posts for you as you get close to the end of the current page, thus allowing you to keep on scrolling as far back as you want to scroll, without having to stop and click through on older posts / newer posts page links.

The way I implemented the feature, at first, was through some ugly spit-and-bailing wire kludges in the WordPress templates, which would be messy and complicated to replicate elsewhere, and which would fall apart if one ever switched to a different theme from the one they were currently using.

But I’m happy to announce that if you have a WordPress weblog, you, too, can now add a Humanized History magic scroller, with only minimal spit and bailing wire. I’ve packaged as much of the magic as I can into a new WordPress plugin, which I’ve unimaginatively dubbed Humanized History for WordPress, and which is now available for download through my projects website.

The plugin does still require some minimal template hacking, due to unavoidable limitations in WordPress, but the hacking you’ll have to d is nice and contained, and if you’re unfamiliar with WordPress templates, you just follow the step-by-step copy-and-paste instructions provided in the documentation. You should also feel free to contact me if anything is unclear or not working properly for you.

Enjoy, and scroll on!

Humanitarian Interventions

A few days ago, I mentioned that I was test-driving a new feature for the Rad Geek People’s Daily, which implemented a Humanized History magic scroller for WordPress blogs. Yesterday, I added the same feature to Feminist Blogs, which also runs under WordPress (thanks to the FeedWordPress aggregator), and which happens to have an even more pressing need for a way to let users quickly scan through lots and lots of posts without wasting the user’s time or the web server’s scarce resources. Currently the implementation is based on a bit of ugly hackery involving WordPress’s templates and my own site-specific JavaScript, but I am thinking that if I have a bit of free nerdery time later in this week I am going to put together a WordPress plugin that will package up the features for you (yes, you!) to install on your own WordPress blog or FeedWordPress-based aggregator.

Again, let me know what you think, and give me a heads-up if you notice anything that seems weird, broken, or wrong.

Fiddling while Rome burns

I’ve been fiddling with a new bit of geekery for the Rad Geek People’s Daily for a couple of days; you may have noticed an early version of it if you’ve been poking around the edges of this site earlier today. If you haven’t, here’s the easiest way to see what I’ve added: go to http://radgeek.com/ and scroll down. Then, keep scrolling. As long as you like.

In most web browsers, you should be able to keep scrolling without ever reaching a set of those next page / previous page pairs of links. In theory you could keep scrolling through the complete archive of Geekery Today. The same feature works in category archives, monthly archives, and searches; meaning, basically, that whenever you are scanning through a list of posts on Geekery Today, you can now run through the whole list without having to click through to a new page. The change was inspired by the points made at Humanized 2006-04-25: No More Pages?

Of course, this page-chunking phenomenon isn’t limited to search sites. It’s used everywhere from blogs to forums, from e-commerce sites to e-mail programs. And it’s surprising how often one finds oneself just giving up and going somewhere else when one has reached the end of a page.

The problem is that every time a user is required to click to the next page, they are pulled from the world of content to the world of navigation: they are no longer thinking about what they are reading, but about about how to get more to read. Because it breaks their train of thought and forces them to stop reading, it gives them the opportunity to leave the site. And a lot of the time, they do.

The take away? Don’t force the user to ask for more content: just give it to them.

And so I will just give the other posts to you. But the trick here was to develop a way to make those posts — sometimes hundreds of them stretching over several years — all available to you without making you wait for everything to download. (Not only would that make everyone wait for those posts to download; it would also make the website completely inaccessible for mobile devices and other alternative web platforms.) The solution to the problem was for me to write a little bit of unobtrusive JavaScript, inspired by Humanized’s implementation, and to tinker a little with the WordPress templates on the back end, so as to automatically grab the older posts as you scroll down towards the bottom. That way, for users with conventional web browsers there’s always more waiting for you to read as you scroll down (at least, until you reach the earliest post). But mobile users and other people who have JavaScript turned off can still access the website the same way they already were, with no substantial change.

This is still a work in progress; let me know what you think — and whether you notice anything weird or broken — in comments. If you’re interested in knowing more about how I implemented it, you can drop me a line.

In the meantime, scroll on!

Anticopyright. All pages written 1996–2024 by Rad Geek. Feel free to reprint if you like it. This machine kills intellectual monopolists.