Comments Since Last Visit, Reloaded, Augmented, Installed, In Two Steps

Last week at the Developing Ordinary Times (sub-)blog, I introduced a set of more advanced “new since last visit” functions that I’m in the process of turning into a WordPress “plugin.” Some feedback from a handful of interested users and some further testing led me to add a few more features, and eventually to re-work and rationalize the code and underlying approach, whose initial outlines I had borrowed from developer John Parris. With discussion there having run its course, and with some substantial additional work having been finished, this slow Sunday with football on seems as good a time as any to try it out. To make the transition easier, I’m installing it in two steps, leaving the old new new comments since last visit formatting and headings in place while the new new comments since last visit gathers the info it needs to work.

Using Comments Since Last Visit Reloaded (CSLVR)

For those of you not engaging with the site during the transition, the first thing you may notice may be what’s not there: Leftover new comment formatting from the prior regime. You’ll be starting with a clean slate, and won’t see anything at all until you’ve visited a thread at least once, and there’s at least one new comment to highlight. At that point, I think most of you will be able just to dive in, but, if you’re not so sure about it, here’s a quick video demonstration of what CSLVR does – or of what you can do with it:

Using WP Comments Since Last Visit, Reloaded

In words:

1. CSLVR highlights comments new since your last visit on a per-thread basis, and preserves highlighting for the duration of a session, currently set at 15 minutes. In other words, after you have visited a post for the first time, comments made after that point will show up as “new” on your next return visit. They will remain highlighted for 15 minutes whether or not you add a comment of your own or browse to another post.1 2. You get a button for skipping directly to new comments and, through use of a “Go to Next Clicker” that appears next to each new comment, scrolling quickly through new comments separately. When you reach the end of a long comment list, the GTN Clicker will take you back to the top of the comments section (in most cases: the functions can be sensitive to environment). The GTN Clicker will be available immediately, the GTN button will appear in phase 2 of the transition. 3. Another button will give you the option to Show New Comments Only (again, for the particular thread only): 4. A third button, which will appear on the Show New Only display, will let you Sort the list of new comments either Newest to Oldest or Oldest to Newest. 5. If you click on any link within the Show New Only display, it will open a new browser tab or window, leaving the new comments list intact in the prior tab or window. (There’s a bit of a mysterious transition in the demo video where I click offscreen from the new window back to the old one.) 6. CSLVR also includes a bit of responsive formatting for small screens. For example, the GTN Clicker shifts to the left, while its container quadruples in size and goes dark without hover, to make it easier to find and click: cslvr_new_comment_mobileNOTE: Not all mobile browsers will be optimized for all CSLVR features: You may get confusing execution lags and other unexpected behaviors – please let me know if you encounter any, and please provide device/browser info along with precise descriptions if you want me to see about improving your results! 7. You will be able to re-start the thread-session at any time by clicking a Mark All Read button that appears at the far right and bottom of the regular and show-only threads.

About The Cookies

The application relies on setting three cookies in your browser, so, in addition to being thread-specific, it will also be browser-specific. That means that, if you like to switch between browsers and devices, then what’s new or old for you on Firefox/Windows may not be on Chrome/Android and so on. As for the cookies themselves, they shouldn’t add any appreciable burden to your browser. In addition to being quite compact, the CSLVR cookies all have relatively near-term expiration dates. The session cookies are set to expire after 15 minutes (the session length), and the two cookies that define last visits are currently set to expire after 30 days. Though all of the cookies will be frequently updated, each new cookie of the same type replaces an old one. So, if you visit the thread once, you get 3 small cookies, of which 2 persist, but, no matter how many times you visit again, you still will have only 3 cookies at most per visited thread. If you visit 30 different threads once each over the course of 30 days, you’ll have the same amount of cookie in your browser as if you visit 30 different threads 30 times each over the same period.2 If you’re like many internet users, your Google and Amazon cookies alone may take up more total space – among likely hundreds of other cookies collected within your favorite browser. I’ll leave the cookie discussion here, as I’m not sure how well-understood cookies are to the average internet user or how much even the typical above average user wants to know about them. It may be enough for you to know that many websites depend on them in different ways, as do users for many conveniences – like being “remembered” by a site. On the other hand, though your cookie assortment may not say as much about your virtual travels as your “history,” it will still reveal a lot about where you’ve been. If where you go – yes, that certain Tumblr site you clicked to that day… – is not something you’re comfortable with anyone who’s interested finding out, you might want to consider looking into the matter further.

Implementation

Big thanks, again, to all who helped, and especially to OGs nevermoor and Vikram Bath, who provided invaluable suggestions all along. Any defects in what I’ve done with some of their suggestions, however, or any problems that may arise with the proto-plugin in this first broad implementation, will be entirely my fault. In the last connection I hope you all like Comments Since Last Visit Reloaded, or that the general liking of it clearly outweighs whatever hating of it, but I will be surprised if there aren’t still some hinks to work out and improvements to be made. For my own part, I’m still curious about how well it will handle very long and complex threads, since making them easier to keep up with is a main reason for creating the plugin in the first place. It may be that a bit of real in-the-field testing will reveal severe problems and require de-activation: I’ve tried to simulate “real blogging life” both off-line and at Developing…, but at some point with these things you just have to see how your logic handles the slings and arrows of outrageous browsing.

Notes:

  1. The previous version defined “visit” somewhat more vaguely and for some users confusingly, combining both site-wide and per-thread information. []
  2. If you use Chrome, or Firefox with the Firebug add-on, you can right-click and choose Inspect Element anywhere in the page, then check Resources/Cookies or the Cookies tab, respectively, to see the timestamp magic happen. While you’re there, feel free to delete any old stale cookies you see, though, if you don’t, they’ll expire on their own in due time. []

WordPresser
Home Page  Public Email  Twitter  Facebook  YouTube  Github   

Writing since ancient times, blogging, e-commercing, and site installing-designing-maintaining since 2001; WordPress theme and plugin configuring and developing since 2004 or so; a lifelong freelancer, not associated nor to be associated with any company, publication, party, university, church, or other institution.

Posts in this series

Commenter Ignore Button by CK's Plug-Ins

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Related

Noted & Quoted

TV pundits and op-ed writers of every major newspaper epitomize how the Democratic establishment has already reached a consensus: the 2020 nominee must be a centrist, a Joe Biden, Cory Booker or Kamala Harris–type, preferably. They say that Joe Biden should "run because [his] populist image fits the Democrats’ most successful political strategy of the past generation" (David Leonhardt, New York Times), and though Biden "would be far from an ideal president," he "looks most like the person who could beat Trump" (David Ignatius, Washington Post). Likewise, the same elite pundit class is working overtime to torpedo left-Democratic candidates like Sanders.

For someone who was not acquainted with Piketty's paper, the argument for a centrist Democrat might sound compelling. If the country has tilted to the right, should we elect a candidate closer to the middle than the fringe? If the electorate resembles a left-to-right line, and each voter has a bracketed range of acceptability in which they vote, this would make perfect sense. The only problem is that it doesn't work like that, as Piketty shows.

The reason is that nominating centrist Democrats who don't speak to class issues will result in a great swathe of voters simply not voting. Conversely, right-wing candidates who speak to class issues, but who do so by harnessing a false consciousness — i.e. blaming immigrants and minorities for capitalism's ills, rather than capitalists — will win those same voters who would have voted for a more class-conscious left candidate. Piketty calls this a "bifurcated" voting situation, meaning many voters will connect either with far-right xenophobic nationalists or left-egalitarian internationalists, but perhaps nothing in-between.

Comment →

Understanding Trump’s charisma offers important clues to understanding the problems that the Democrats need to address. Most important, the Democratic candidate must convey a sense that he or she will fulfil the promise of 2008: not piecemeal reform but a genuine, full-scale change in America’s way of thinking. It’s also crucial to recognise that, like Britain, America is at a turning point and must go in one direction or another. Finally, the candidate must speak to Americans’ sense of self-respect linked to social justice and inclusion. While Weber’s analysis of charisma arose from the German situation, it has special relevance to the United States of America, the first mass democracy, whose Constitution invented the institution of the presidency as a recognition of the indispensable role that unique individuals play in history.

Comment →

[E]ven Fox didn’t tout Bartiromo’s big scoops on Trump’s legislative agenda, because 10 months into the Trump presidency, nobody is so foolish as to believe that him saying, “We’re doing a big infrastructure bill,” means that the Trump administration is, in fact, doing a big infrastructure bill. The president just mouths off at turns ignorantly and dishonestly, and nobody pays much attention to it unless he says something unusually inflammatory.On some level, it’s a little bit funny. On another level, Puerto Rico is still languishing in the dark without power (and in many cases without safe drinking water) with no end in sight. Trump is less popular at this point in his administration than any previous president despite a generally benign economic climate, and shows no sign of changing course. Perhaps it will all work out for the best, and someday we’ll look back and chuckle about the time when we had a president who didn’t know anything about anything that was happening and could never be counted on to make coherent, factual statements on any subject. But traditionally, we haven’t elected presidents like that — for what have always seemed like pretty good reasons — and the risks of compounding disaster are still very much out there.

Comment →
CK's WP Plugins

Categories

Extraordinary Comments

CK's WP Plugins