Replied to A Throwback To the Past: Introducing the Blogroll Block WordPress Plugin by Justin Tadlock (WordPress Tavern)
It was 2003. I was just getting my first taste of blogging and similar experiments on the world wide web. Seemingly every blog I toured showcased a long list of the owner’s friends. These wer…
Michael Beckwith, this is genius. Long live blogrolls!

But let’s be honest, they’re a sort of discovery method that is also built into other social platforms: Twitter lists,Twitter follow lists, Facebook lists, etc. Most now have AI using these lists to suggest who you ought to follow next. When will WordPress get that plugin?

My issue is that in a bigger social space, we need full pages for these sorts of data rather than the small sidebar widgets of yore.

This was the last serious conversation I remember seeing about the old Link Manager:

So who besides Michael has a blogroll now? Mine’s at https://boffosocko.com/about/following/. Where’s yours?!

Automating syndication of reply contexts in Twitter Cards using OGP metacrap and plugins in WordPress

A Metacrap Problem

It’s metacrap–I know, I know–but I’ve been thinking about easy ways to use Open Graph Protocol meta data to add contextual Twitter cards to some of my content when syndicating posts to Twitter. My goal is to leverage the speed and ease-of-use of Micropub clients while doing as little as possible manually, but achieving as much parity between posts on multiple sites. 

I’m particularly keen to do this to syndicate/share more of the articles I read and post about on my site without adding additional manual work on my own part.

Outline of Some Resources

The Post Kinds plugin for WordPress parses URLs for me and pulls in data to create reply contexts for a variety of posts like bookmarks, reads, watches, listens, etc. Since Post Kinds doesn’t display featured images (yet), I’ve also been using the External Featured Image plugin to display the featured images from the original to add to the reply context of my posts as well. 

In addition to all these I’ve been using the All in One SEO plugin to easily add an SEO layer to posts without having to do much thinking about it. AIOSEO recently upgraded their UI and features in the last year, and yesterday I upgraded to the newest v4.0+. One of the new features it’s got is the ability to add default fields or pull in pre-existing custom fields to output OGP meta data. 

Start of a Solution

So I got the idea that since Post Kinds and External Featured Image plugins are pulling in and displaying the sort of data I’d like to show in Twitter cards, I figured why not use them? While metacrap is a DRY violation, the fact that it’s automated for me and is based on data I’m actually showing visually on my website makes it feel much less dirty. It also has the benefit that it helps make some of my syndicated content look and feel on Twitter, more like it does on my website. This is also a problem since Twitter hampers how much data I can syndicate in a single post.

I’ve still got some issues about how to deal with the Post Kinds data, but after a bit of digging around, I discovered the image URL for External Featured Image plugin is hiding in the _dcms_eufi_img field. So I can make the default Twitter settings in AIOSEO pull the external image by setting Default Post Image Source to Image from Custom Field and set the Post Custom Field Name to _dcms_eufi_img

Since a lot of my posts are reads, bookmarks, etc., this works well, but I can easily override the settings for articles or other custom posts which I make less frequently. 

Hopefully I can figure out the settings for Post Kinds to get the rest of the default fields to map across. I’m happy to hear ideas on what field names I’d need to use to get the Post Kinds Name and Summary/Quote fields to map over for the og:title and og:description respectively. Ideally I can manage to get it done without needing to get a subscription to the pro version of AIOSEO which also has support for custom taxonomies which is how Post Kinds works.

Since my theme has relatively solid microformats support, and I have plugin infrastructure to allow easy syndication from my website to Twitter through micropub clients, this last bit for creating Twitter reply contexts helps close some of the loop for me in my syndication workflow while keeping as much context across platforms.

Example

Here’s a visual example of a native post on my site and the corresponding syndicated copy on Twitter. There are some differences, mostly because I don’t have as much control of the appearance on Twitter as I do on my own site, but they’re about as close as I can get them with minimal work.

screen capture of a tweet with my thought at the top and a Twitter card underneath it including the reply context of the article I'm responding to

screencapture of a read post on my website for a Slate article with a reply context at the top and my response to it just below

I wasn’t seeing it before, but after upgrading to All in One SEO to 4.0.9 from 3.7ish, the Twitter plugin was throwing in some Twitter card metacrap that was causing a conflict. I’ve turned off the Twitter plugin which shouldn’t affect much since I wasn’t really using much of it’s additional functionality.

Hooray for one less plugin in the stack!

Crediting your own website when syndicating to Mastodon with WordPress plugins

I’ve been tinkering around with methods to automatically syndicate (POSSE) content from my personal website to Mastodon. I’ve been working at making a custom plugin which is far from finished. But a test post I made the other day, caught a few people’s attention[1][2]

I was trying to syndicate from my website so that the post on Mastodon would credit my website for the post and link back to my homepage as the application that made the post. You’ll notice at the bottom of the post there’s the post date and a globe icon, which indicates the post is public, followed by my website name ‘BoffoSocko.com’ and details about replies, reposts, and favorites.

screen capture of a Mastodon post which gives credit to Boffosocko.com at the bottom of the post.

I assuredly won’t release a public plugin for WordPress that does this. But since some have asked how I did it, I thought I’d share some of the internals of a few WordPress plugins that one can quickly modify to achieve the same thing.

That I can currently see, there are three plugins in the repository that will allow one to syndicate content to a variety of Mastodon instances. They are Mastodon Autopost, Mastodon Auto Share, and Share on Mastodon. The first two are closely related and essentially replicate the same codebase.

Similar to using Twitter’s API to crosspost, Mastodon is looking for two bits of information when an application is registered: a client name and a website URL. 

Mastodon Autopost and Mastodon Auto Share, both have a file called client.php which define these two variables. 

public function register_app($redirect_uri) {
  $response = $this->_post('/api/v1/apps', array(
    'client_name' => 'Mastodon Share for WordPress',
    'redirect_uris' => $redirect_uri,
    'scopes' => 'write:statuses write:media read:accounts',
    'website' => $this->instance_url
  ));

You can edit this file with a text editor to change the 'client_name' from 'Mastodon Share for WordPress' to 'Anything You Want'. If you’re in a joking mood, maybe change it to 'Twitter'?

To change the URL so that the link on the client_name directs to your website, you’ll want to change the line 'website' => $this->instance_url.

In particular change $this->instance_url to 'https://example.com' where example.com would be your website. I’ll note that $this->instance_url on this line in the original plugin is a bug. If left alone, it points the URL to your home Mastodon instance instead of to the more logical https://wordpress.org/plugins/autopost-to-mastodon/ where the plugin lives. 

If you prefer using Jan Boddez‘ excellent plugin, you’ll want to do something similar, except in that case you’ll want to change a file named class-options-handler.php in the includes folder.

Here you’ll want something like:

'client_name'   => __( 'Example.com' ),

But note that Boddez doesn’t have a similar bug, so the website line

'website' => home_url(),

is already correctly defined so that your website will automatically be linked without any changes to it.

If you’re already using one of these plugins and manually modify them, note that you’ll probably need to re-authorize the plugin so that the changes propagate.

David Shanske is such a rascal. Cloudy with a Chance of Meatballs indeed!
screencapture of posting interface for Simple Location plugin with options like Dust, Earthquake, Fire, Flood, and Cloudy with a Chance of Meatballs among other weather options
Look what I found hiding in the weather settings in the Simple Location Plugin for WordPress

Some modification ideas to the Curator’s Code Plugin

I quietly wonder what it would take to modify the zip file for the Curator’s Code Plugin to take advantage of Parse This to input a URL and parse back a small snippet of context for more easily giving credit to posts in the WordPress classic editor?

It looks like it used to be in the repository, but perhaps with the rise of Gutenberg, they opted not to maintain it? 

I follow most of the code there, but I’m thinking too much of the actual output is done via JS with tinyMCE, so maybe I’m missing some of the finer portions. It also needs some tweaks to redirect to maybe the Internet Archive since curatorscode.org no longer exists.

I’m thinking an output closer to the following for each type might still be simple, but provide some additional context, (presuming my microformats aren’t too horrific/mis-nested):

<p><small><cite class="h-cite via"><abbr title="via">ᔥ</abbr> <span class="p-author h-card">AuthorTK</span> <a class="u-url p-name" href="https://example.com/TK" target="_blank" rel="noopener noreferrer">TitleTK</a> (<time class="dt-published">2020-TK-TK</time>)</cite></small></p>

<p><small><cite class="h-cite ht"><abbr title="hat tip">↬</abbr> <span class="p-author h-card">AuthorTK</span> <a class="u-url p-name" href="https://example.com/TK" target="_blank" rel="noopener noreferrer">TitleTK</a> (<time class="dt-published">2020-01-29</time>)</cite></small></p>

Hopefully the via and ht classes also give people enough to latch onto for doing some custom styling of the output if necessary.

With more prevalence of crediting like this, I also wonder how parsers might better display received webmentions for these types of notifications beyond the basic “Sue mentioned this”. Maybe a facepile of avatars under the heading “Inspired by this post”?  Though the way “via” is used in practice, it might also fit under the category of a repost?

Liked Simple Location for WordPress 4.1.12 Released by David ShanskeDavid Shanske (david.shanske.com)
A new version of Simple Location is out. Version 4.1.12 has many under the hood tweaks/fixes, and only one major user facing feature, a redo of the caching system. The caching system is used by the weather system to avoid poling for the weather on every refresh. There is now a setting in each widget...
Liked a post by David ShanskeDavid Shanske (david.shanske.com)
Micropub 2.2.3 for WordPress has been released. It fixes a variety of warning notices.  Published, updated, name, and summary properties are no longer stored in post meta. When queried, they will be pulled from the equivalent WordPress properties. Content should be as well, however as content in th...
Hooray!
Bookmarked WordPress Theme Components (WP Theme Components)
Theme components are bite sized code snippets that can be reused across multiple themes, but are either too small or don’t make sense to be released as a plugin. Stop cluttering up your functions.php file and start using theme components! Who are theme components for? Th...
This looks interesting and useful. Perhaps a potential solution for adding small tidbits of microformats mark up to one’s theme at a more granular level than the mf2 plugin? I can see use cases for other snippets too like accepting Webmentions automatically, etc.
Read WordPress Auto-Updates: What do you have to lose? (Wordfence)
A new feature that will allow automatic updating of plugins and themes will be available in WordPress version 5.5, which is scheduled to be released on August 11, 2020. In this core release of the world’s most popular content management system, site owners will have the option to turn auto-updates on for individual plugins and ...Read More
This should be an interesting update because of this. I’m probably going to generally ignore the functionality since I prefer closer control over my site and spend so much time in it on a daily basis.
Read IndieAuth 3.5.0 for WordPress Released by David ShanskeDavid Shanske (david.shanske.com)
Earlier in the week, I noted the release of IndieAuth 3.5.0, but I didn’t explain the major under the hood changes that occurred here in a post, which I need to do as at least one person is experiencing issues(probably necessitating a 3.5.1 as soon as I figure out why.) I also noted I forgot to de...
Read Micropub 2.2.0 for WordPress Released by David ShanskeDavid Shanske (david.shanske.com)
Micropub 2.2.0 has one major change in it. IndieAuth client code was removed. This code now lives in the IndieAuth plugin. This means that Micropub does not check for scopes. It uses the built-in WordPress capability system to determine if an action should be performed. The IndieAuth plugin limits c...