👓 Implementing IndieWeb on your personal Drupal site, part 1 | Roy Scholten

Read Implementing IndieWeb on your personal Drupal site, part 1 by Roy Scholten (yoroy.com)
This is my version of the steps you need to take to make your site part of the indie web community. Swentel helped me getting it all setup on this here Drupal site using his indieweb module. It’s all a bit complicated still, so this is mostly me trying to retroactively understand what’s going on...
It’s great to see people using swentel‘s Drupal plugin to better own, control, and use their presence online to better communicate with others! I may have to spin up an instance and check it out soon myself.
​​​​​​​​​​

Allowing arbitrary HTML in the Summary/Quote field in the Post Kinds Plugin

Reply contexts

One of my favorite parts of the Post Kinds plugin isn’t just that it provides me the flexibility to add a huge variety of post types to my website or the semantic HTML and microformats it provides to help my site dovetail into the IndieWeb. It’s that it allows me to quickly and easily provide very rich reply contexts to my posts so that I more easily know what I’ve bookmarked, liked, favorited, read, or replied to online. In some sense it helps guard against some of the problem of context collapse found in many social media sites on the internet. As my friend and foodie extraordinaire Jeremy Cherfas has said, “a reply without context is like an egg without salt.”

For a long time I had been wanting a bit more control of how the Post Kinds plugin presented some of the data it allows.1,2 After one inputs a URL, the plugin uses several methods to scrape the related web page and returns a lot of metadata about it including the title, a summary, the site name, tags, a featured image, publication date and time, the author and author’s website among others. The data returned depends on how the page is marked up and is generally based on available microformats or open graph protocol data when they’re provided.

The plugin has a setting to “Embed Sites into your Response” on its settings page, and this is generally okay, but it relies on sites to have some sort of oEmbed set up predefined. For bigger sites like YouTube and WordPress, this is generally alright, but it’s not always the case that any data is provided by the external site. Even in YouTube’s case you’ll only display the video with no other meta-data about it. As a result I leave it turned off.

Let’s take a quick look at what some of these default outputs for the reply context with a short comment underneath them look like.

This is the default  Post Kinds output for an automatically parsed YouTube video with the embed function off. While it’s a good start, it’s not necessarily inspiring or a good reminder of the content you watched. One could manually change or add some of the fields for additional data, but we would still be a bit limited.
This is what Post Kinds outputs for an automatically parsed YouTube video with the embed function turned on. It’s nice to have an embedded copy of the video, but where did it come from? What is it about? Why should we care? Is there any other metadata we can display?

With the embed option turned off the plugin will return a “Summary” of the parsed website page. This too is generally well supported in 90% of websites in my experience. But the data it returns is (smartly) filtered using wp_kses for security so that a malicious page couldn’t inject random html or code into your page. This means that useful functionality is often being stripped out of the “Summary/Quote” field in the reply context. I’d prefer to have the ability to have text with links, video, and audio to appear in-line in these contexts so that there’s a better representation of the actual post I’m reacting to.

The question then, is how can I make this happen?

In older versions of the plugin there was a setting for this feature, but it wasn’t well documented and most people didn’t know what the setting was or what it meant. For simpler UI and support it was ultimately stripped out although the raw code for it was left in. In fact, it’s literally the first short block of code within the plugin’s main code! It looks like this:

if ( ! defined( 'POST_KINDS_KSES' ) ) {
	define( 'POST_KINDS_KSES', false );
}

To enable the ability to manually add arbitrary html, links, audio, video, etc. you can go to your main administrative user interface in WordPress and go to Plugins >> Edit and then choose the Post Kinds option in the drop down selector in the top right hand corner and click select. Search for the code listed above (it should be right at the top, underneath the title and details for the plugin) and change the single word false to true. Next scroll down the page and click the Update File button.

Now you should be able to manually change any of the fields within the Response Properties metabox and they’d display in full HTML as you’d expect them to. (Caveat: because you’ve disabled a small layer of security, you should keep a close eye on what data appears in your “Summary/Quote” field and make sure you’re not allowing your site or your readers to be led astray or hacked. In my case, I’m almost always modifying it by hand, so it’s not a big issue. Your mileage may vary depending on what you’re posting.)

This is what Post Kinds outputs for a parsed YouTube video with the embed function off. We’ve gone in and manually tweaked the author name, URL, and photo and added manual HTML to render a sysnopsis with links and an in-line playable  iframed embed of the video. This is a much richer reply context! It doesn’t get much better than this. Thanks Post Kinds!!

Updates

But wait… What happens when I update the plugin? Won’t the update overwrite the change? Yes, you’re absolutely correct. You’ll have to remember to go back and make this change any time the plugin updates. To prevent this, you could instead modify your wp-config.php file in the root folder of your WordPress install. To do this add the following lines of code to the bottom of this file:

/** Sets up initial variable for the Post Kinds plugin to not filter the Summary/Quote field  */
if ( ! defined( 'POST_KINDS_KSES' ) ) 
	define(' POST_KIND_KSES', true );

Next save the file and upload it to your WordPress install. Now you should be all set.

References

1.
Aldrich C. Post Kinds Plugin for WordPress. BoffoSocko. https://boffosocko.com/2017/08/11/post-kinds-plugin-for-wordpress/. Published August 11, 2017. Accessed June 9, 2018.
2.
Aldrich C. Manually adding a new post kind to the Post Kinds Plugin for WordPress. BoffoSocko. https://boffosocko.com/2018/06/06/manually-adding-a-new-post-kind-to-the-post-kinds-plugin-for-wordpress/. Published June 7, 2018. Accessed June 9, 2018.

👓 Possible cultural & technological futures of digital scholarship | W. Ian O’Byrne

Read Possible cultural & technological futures of digital scholarship by W. Ian O'Byrne (wiobyrne.com)
I think there is a need to develop a system to track the draft of a manuscript from the beginning to the end of the process. This will open up new possibilities to scaffold new scholars while we onboard them in the process. This will also provide new opportunities for open scholarship and open science. Finally, this will allow researchers to replicate, remix, or reproduce the (research, reflection, writing, revision, publishing) process. The answer may be in indieweb philosophies, but the main impediment may be in the people and systems that make all of this possible. I think we have an opportunity for new technological opportunities in academic publisher, but I’m not sure if culturally we’re ready. Let me explain.

I think there is a need to develop a system to track the draft of a manuscript from the beginning to the end of the process.

If you’re drafting in WordPress you can set the number of revisions of your posts to infinite so that you can keep (archive) all of your prior drafts. see: https://codex.wordpress.org/Revisions

“pre-print” versions of manuscripts

This is just another, albeit specific, form of academic samizdat.

Reply to Design of My Website by Cathie LeBlanc

Replied to Design of My Website by Cathie LeBlanc (Desert of My Real Life)
I discovered the IndieWeb about six weeks ago and wrote then about why I think it’s an important movement and community. Since that time, I’ve made a concerted effort to update my web site so that it looks like I want it to look. Although I’m not yet done, I’ve made good progress. I recently...
I love how you’re trying to take control of all of the parts of your website. In particular, I think it’s a great idea to improve the usability of particular pages (both for yourself as well as for others) based on how you’re using the pages. I think more people should be considering this as an option.

Certainly having multiple WordPress installs can be a headache, though it will obviously work. I know some IndieWeb tech related to syndicating to various silos and using services like Brid.gy for backfeed will be hard to do when using more than two domains and targeting a single silo presence, so it’s not only a maintenance tax, but you might not have the flexibility you’d like if you syndicate content in multiple locations.

Another option is to use the same WordPress install to run multiple websites, which is also a possibility. Or you could also run a multi-site installation and go that route. This at least would cut down on needing to maintain and update multiple sites one at a time.

Possibly the best option, however, is to know that you can custom theme any and every page generated within your website. This isn’t done quite as often as it may take a bit more upfront development work and knowledge of how WordPress works internally as well as how to tweak your theme. The easiest thing to do is to create custom templates for each of the particular pages you want to change. When WordPress tries to build a page it relies on a nested hierarchy of templates potentially available within your theme. It starts at the top and stops when it finds one available and then uses that template. By targeting the particular page you’re making (by a variety of means) you can have direct control over what your page will look like. The nice part is if you’ve got templates from other themes, you can use those as a guide and include their CSS files to get the exact look and feel you want.

Now that you know it exists as an option, there are a huge variety of resources on the web that you can consult to begin tinkering. Below are a few potentially useful ones:

I suspect even for those without a development background, one could do a bit of reading followed by some judicious cutting and pasting to get some reasonable results. I’m far from an expert in this area myself, but I was recently able to create a sort of landing page template for my podcast recently by creating a custom page that displays when the archive page for my ‘podcast’ category is rendered. Essentially I copied the archive template from my theme, added a bit of detail about the podcast just above the part where it renders the reverse chronological order of the category posts (I did this in simple raw HTML, without any ‘real’ coding), gave the file a new name category-podcast.php so it would trigger when /category/podcast/ is the URL, put it into my child theme (so it wouldn’t be overwritten if I update my theme), and voila–a landing page for the podcast!

If you’re not much of a developer/tinkerer, you could likely ask your departmental, divisional, or institutional web developer, someone at a local WordPress meetup or maybe a Homebrew Website Club to help you out a bit. I think once you’ve done it once with even some simple changes like I did on one page, you’ll have the gist of it and the sky is the limit for every other page on your site.

👓 Yahoo Messenger is shutting down on July 17, redirects users to group messaging app Squirrel | TechCrunch

Read Yahoo Messenger is shutting down on July 17, redirects users to group messaging app Squirrel (TechCrunch)
It’s the end of an era for Yahoo Messenger, one of the first instant messaging apps on the market that introd. Today, Oath (which also owns TechCrunch) announced that it would be winding down the service on July 17 as it continues to experiment and consider how and if it can have a relevant p…
Interesting, a silo death ostensibly used to do PR for a new app on the same broad platform.

👓 Design of my website | Cathie LeBlanc

Read Design of My Website by Cathie LeBlanc (Desert of My Real Life)
I discovered the IndieWeb about six weeks ago and wrote then about why I think it’s an important movement and community. Since that time, I’ve made a concerted effort to update my web site so that it looks like I want it to look. Although I’m not yet done, I’ve made good progress. I recently...

One of the things I do a lot on Twitter, for example, is retweet stories that I find interesting in order to come back to them later.

interesting retweeting as a bookmarking behavior

👓 Turning off Facebook for Bridgy | snarfed.org

Read Turning off Facebook for Bridgy by Ryan BarrettRyan Barrett (snarfed.org)
I announced recently that Bridgy Publish for Facebook would shut down soon. Facebook’s moves to restrict its API to improve privacy and security are laudable, and arguably ...
This is so disappointing. Facebook is literally killing itself for me. So much for their “connecting everyone” philosophy.

Brid.gy was the last thing really keeping me connected to Facebook at all. Now that Facebook is shutting down its most useful functionality from my perspective, perhaps it’s time to deactivate it and move toward shutting it all down?

👓 Brimstone | Blog of Marshall

Read Brimstone by Matt Marshall (mrshll.uk)
Brimstone is the code I use to run this website. You can find the code on Gitlab and, for the time being, on Github. I want to keep this post as a living post, and keep adding to it. That way I hope this post acts like a philosophy.txt. The code isn't anything special. I write it for several reasons...

👓 Notes from Virtual Homebrew Website Club: Blogging 101 edition | INTERTEXTrEVOLUTION

Read Notes from Virtual Homebrew Website Club: Blogging 101 edition by Greg McVerry (jgregorymcverry.com)
Well Cathy and I did not have any students looking for Blogging 101 help so we spent the hour in an #IndieWeb support group.
Wish I could have joined this. Certainly some interesting thoughts for improving the overall pieces for the set.

Reply to Dan Cohen tweet

Replied to a tweet by Dan CohenDan Cohen (Twitter)
Dan, There are a lot of moving pieces in your question and a variety of ways to implement them depending on your needs and particular website set up. Fortunately there are lots of educators playing around in these spaces already who are experimenting with various means and methods as well as some of their short and long term implications.

I suspect some of the most interesting parts may be more closed off to you  (or possibly more difficult) because in your particular case it looks like you’re being hosted on WordPress.com rather than self-hosting your own site directly. For the richest experience you’d ideally like to be able to install some of the IndieWeb for WordPress plugins like Webmentions, Semantic Linkbacks, Post Kinds, and potentially others. This can be done on WordPress.com, but typically involves a higher level of paid account for the most flexibility.

For crossposting your content to micro.blog, that portion is fairly simple as you can decide on any variety of post formats (standard, aside, status, images, etc.), post kinds, categories, or even tags and translate those pieces into RSS feeds your WordPress installation is already creating (most often just by adding /feed/ to the end of common URLs for these items). Then you can plug those particular feeds into your micro.blog account and you’re good to go for feeding content out easily without any additional work. Personally I’m using the Post Kinds plugin to create a finer-grained set of content so that I can better pick and choose what gets syndicated out to other sites.

From within micro.blog, on your accounts tab you can enter any number of incoming feeds to your account. Here’s a list of some of the feeds (from two of my websites one using WordPress and the other using Known) that are going to my account there:

 

 

As a small example, if you were using the status post format on your site, you should be able to add https://dancohen.org/type/status/feed/ to your feed list on micro.blog and then only those status updates would feed across to the micro.blog community.

I also bookmarked a useful meta-post a few weeks back that has a nice section on using micro.blog with WordPress. And there are also many nice resources on the IndieWeb wiki for micro.blog and how people are integrating it into their workflows.

For crossposting to Twitter there are a multitude of options depending on your need as well as your expertise and patience to set things up and the control you’d like to have over how your Tweets display.

Since micro.blog supports the Webmention protocol, if your site also has Webmentions set up, you can get responses to your crossposts to micro.blog to show up back on your site as native (moderate-able) comments. You can do much the same thing with Twitter and use your website as a Twitter “client” to post to Twitter as well as have the replies and responses from Twitter come back to your posts using webmention in conjunction with the brid.gy website.

I’ve been playing around in these areas for quite a while and am happy to help point you to particular resources depending on your level of ability/need. If you (or anyone else in the thread as well) would like, we can also arrange a conference call/Google hangout (I’m based in Los Angeles) and walk through the steps one at a time to get you set up if you like (gratis, naturally). Besides, it’s probably the least I could do to pay you back for a small fraction of your work on things like PressForward, Zotero, and DPLA that I’ve gotten so much value out of.

Because of the power of these methods and their applicability to education, there are an ever-growing number of us working on the issue/question of scaling this up to spread across larger classrooms and even institutions. I’m sure you saw Greg McVerry’s reply about some upcoming potential events (as well as how he’s receiving comments back from Twitter via webmention, if you scroll down that page). I hope you might join us all. The next big event is the IndieWeb Summit in Portland at the end of June. If you’re not able to make it in person, there should be some useful ways to attend big portions remotely via video as well as live chat, which is actually active 24/7/365.

As is sometimes said: I have made this longer than usual because I have not had time to make it shorter. At least I wasn’t hampered by Twitter’s character constraints by posting it on my own site first.

 

 

 

 

 

Manually adding a new post kind to the Post Kinds Plugin for WordPress

The Post Kinds plugin, essentially an extended version of WordPress’s core Post Formats functionality, allows one to make a variety of types of posts on one’s website that mirrors the functionality provided in a huge variety of social media platforms. This is useful if you’re owning all of your own data and syndicating it out to social silos, but it’s also great for providing others better user interface for reading and consuming what you’re posting.

I’ve documented and written about it quite a bit in the past and am obviously a big fan. In addition to most of the default post types (notes, favorites, likes, bookmarks, reads, listens, etc.), my personal site also supports follows, eat, drink, wishes, acquisitions, exercise, and chickens! Wait a second… CHICKENS?!?

Yes, that’s chickens, not checkins, which I also support.

One of the nice benefits of the plugin is that it’s fantastically modular and extensible. As an exercise a few months back I thought I would take a shot at adding chicken post support to my website. Several years ago in the IndieWeb, partly as an educational exercise and partly for fun, several people thought it would be nice to add a post type of “chicken” to their sites. What would it look like? What would it entail? How might it evolve? Since then interest in chicken related posts has naturally waned, but it does bring up some interesting ideas about potential new pieces of functionality that one might want to have on their personal websites.

While I currently support many post types, I’ve discovered recently that I have a variety of notes and checkins that relate to items I’ve purchased or acquired. I thought it might be worthwhile to better keep track on my own website of things I acquired  in a more explicit way to make posting them and searching for them a lot easier. But how could I do this myself and potentially contribute it back to a broader base of other users? I started with a bit of research on how others have done this in the past and tried to document a lot of it on the Indieweb wiki. I eventually asked David Shanske to reserve the idea of acquisitions within the Post Kinds plugin, which he did, but I wondered how I might have done some of that work myself.

So below, as an example, I thought I’d write up how I’ve managed to add Chicken posts to my website. To a great extent, I’m using data fields and pieces already built into the main plugin, but in doing this and experimenting around a bit I thought I could continue to refine chicken posts until they did what I wanted, after which, I could do a pull request to the main plugin and add support for others who might want it. Hopefully the code below will give people a better idea about how the internals of the plugin work so that if they want to add their own pieces to their sites or contribute back to the plugin, things might be a tad easier.

Pieces for a new Post Kind in WordPress

Adding a new Post Kind primarily consists of three broad pieces  which I’ll address below. The modularity of the plugin makes adding most of the internals for a new kind far simpler than one might imagine.

Adding Taxonomy Support

New kinds in general will require a small handful of properties which include:

  • a name (as well as its singular, plural, and verb forms);
  • a microformats 2 property;
  • a format, so that the plugin can map the new post kind to a particular Post Format type within WordPress core so that themes which use these can be properly set when needed. Format options include: aside, image, video, quote, link, gallery, status, audio, and chat. Some post kinds may not have an obvious mapping, in which case the value can be left as empty;
  • a generic description for display within the admin user interface as well as for the archive pages for the type which are auto-generated;
  • a description-url, typically this is a link to the IndieWeb wiki that has examples and details for the particular post kind. If there isn’t one, you could easily create it and self-document your new use case. It could even be empty if necessary;
  • A show setting with a value of true or false to tell the plugin to default to showing the kind in the Post Kinds “Kinds” metabox so that the new kind will show up and be choose-able from within the interface when creating new posts.

Code to include these pieces of data will need to be added to the /includes/class-kind-taxonomy.php folder/file path within the plugin so that the plugin knows where it needs to be found.

As an example, here’s what the code looks like for the bookmark kind:

'bookmark'    => array(
	'singular_name'   => __( 'Bookmark', 'indieweb-post-kinds' ), // Name for one instance of the kind
	'name'            => __( 'Bookmarks', 'indieweb-post-kinds' ), // General name for the kind plural
	'verb'            => __( 'Bookmarked', 'indieweb-post-kinds' ), // The string for the verb or action (liked this)
	'property'        => 'bookmark-of', // microformats 2 property
	'format'          => 'link', // Post Format that maps to this
	'description'     => __( 'storing a link/bookmark for personal use or sharing with others', 'indieweb-post-kinds' ),
	'description-url' => 'http://indieweb.org/bookmark',
	'show'            => true, // Show in Settings
	),

For direct comparison, and as an explicit example for my chicken post kind, here’s the block of code I inserted within the class-kind-taxonomy.php file immediately below the section for the acquisition type:

'chicken'    => array(
	'singular_name'   => __( 'Chicken', 'indieweb-post-kinds' ), // Name for one instance of the kind
	'name'            => __( 'Chickens', 'indieweb-post-kinds' ), // General name for the kind plural
	'verb'            => __( 'Chickened', 'indieweb-post-kinds' ), // The string for the verb or action (liked this)
	'property'        => 'chicken-of', // microformats 2 property
	'format'          => 'image', // Post Format that maps to this
	'description'     => __( 'Owning all the chickens. Welcome to my chicken feed.', 'indieweb-post-kinds' ),
	'description-url' => 'https://indieweb.org/chicken',
	'show'            => true, // Show in Settings
	),

You’ll probably notice that beyond the simple cut and paste, I haven’t really changed much. Syntax aside, most of these pieces are relatively obvious and very straightforward, but I’ll add some commentary about a few parts and what they do which may not be as obvious to the beginner. When creating your own you can copy and paste this same block into the code at the bottom of the list of other types, but you’ll want to change only the data that appears within the single quotes on each of the nine lines for the various settings.

For those not familiar with microformats you may be asking yourself what snippet to add for the property setting. The best bet is to take a look at the microformats wiki or look for possible examples of people doing the same type of post you’re doing and copy their recommended microformat. For extremely new and likely experimental edge cases, chances are that you’ll need to choose your own experimental microformat name. In these instances you can use prior microformats as examples and potentially follow the format. In my case I knew about the bookmark-of, like-of, favorite-of, and the experimental read-of, listen-of, and watch-of microformats, so I followed the pattern and chose chicken-of for my experimental chicken posts. One could also potentially ask for recommendations within either the microformats IRC/chat channel or the IndieWeb chat. If you create a new and experimental one, take a few moments to document your use case in the IndieWeb and/or Microformats wikis for others who come after you. Keep in mind that if you change the property name at a later date you will need to go into your database and change the wp_postmeta database meta_key field from mf2_property1 to mft_property2 so that WordPress will know where the appropriate data is stored to be able to display it.

Our new chicken post kind is available in the post editor because show is set to true

The show setting is fairly straightforward, but may not be as obvious to some. It has either a value of true or false. If the value is false, the new post kind won’t be displayed in the radio button options within the admin UI for creating new posts. If the value is true, then it will be available. The Post Kinds plugin has a number of reserved post kinds which aren’t displayed by default on most sites–primarily because they do not have appropriate views or data fields defined–but they could be enabled by changing the show flag from false to true. Most often we recommend you only show those kinds that you’re actively using.

Additional examples of the dozen or more standard post kinds can be found within the code to provide some additional potential clarity on what types of data each of them are expecting.

I debated a while on making the verb ‘chickened out’ instead of ‘chickened,’ but I chickened out thinking that it would make my posts something wholly different. Obviously you can now make your own choice.

With this chunk of code saved into the plugin, it is now generally aware of the new post kind and can save the appropriate data for this new kind of post.

Template/View Support

Now you’ll want to add some code to the plugin to tell the plugin how it should display the data it’s saving for your posts. The easiest way to do this is to copy and paste the code from one of the many default views already in the plugin and just change a few small pieces of data to match your post kind. This code can be created as a new file with your new matching post kind name (the one at the top of your code snippet above that appears on line 1 before the word ‘array’) in one of two places. If you put it in the views folder in the plugin, you may need to re-add it later on if the plugin updates. Otherwise you can add the code into a file which can be placed into a folder named kind_views in either the folder for your theme (or your child theme, if you have one.) We recommend placing it in your child theme, so if the parent theme updates, your code won’t accidentally be lost.

There are a variety of views for many post kinds available to stand as examples, so you can look at any of these and tweak them as you wish to get the output you desire. For more complicated output displays it might certainly help to have some PHP coding skills. For my chicken post kind I simply copied and pasted the code for the bookmark kind view and pasted it into a file named kind-chicken.php following the naming convention of the other files.

Below is a copy of the code I added for the chicken post kind which is nearly identical to the bookmark view with exception of changing the name of the template, adding u-chicken-of and changing the get_before_kind to chicken instead of bookmark. Note that because the chicken-of microformat is wrapped on a URL, it has the u- prefix, otherwise if it were on plain text it would have been p-chicken-of using the standard microformat h-, u-, p-, and e- syntax.

I also put both the u-chicken-of and the u-bookmark-of microformats in the view so that sites using the post type discovery algorithm that don’t recognize the chicken-of microformat won’t choke on the proverbial chicken bone, but will default back to thinking this post is of the bookmark type. I suspect that I could also have left the u-bookmark-of off and many would have defaulted to thinking this post was a simple note as well. You can make your own choice as to which you prefer as a default.

<?php
/*
 * Chicken Template
 *
 */

$mf2_post = new MF2_Post( get_the_ID() );
$cite     = $mf2_post->fetch();
if ( ! $cite ) {
	return;
}
$author = Kind_View::get_hcard( ifset( $cite['author'] ) );
$url    = ifset( $cite['url'] );
$embed  = self::get_embed( $url );

?>

<section class="response u-chicken-of h-cite">
<header>
<?php
echo Kind_Taxonomy::get_before_kind( 'chicken' );
if ( ! $embed ) {
	if ( ! array_key_exists( 'name', $cite ) ) {
		$cite['name'] = self::get_post_type_string( $url );
	}
	if ( isset( $url ) ) {
		echo sprintf( '<a href="%1s" class="p-name u-url">%2s</a>', $url, $cite['name'] );
	} else {
		echo sprintf( '<span class="p-name">%1s</span>', $cite['name'] );
	}
	if ( $author ) {
		echo ' ' . __( 'by', 'indieweb-post-kinds' ) . ' ' . $author;
	}
	if ( array_key_exists( 'publication', $cite ) ) {
		echo sprintf( ' <em>(<span class="p-publication">%1s</span>)</em>', $cite['publication'] );
	}
}
?>
</header>
<?php
if ( $cite ) {
	if ( $embed ) {
		echo sprintf( '<blockquote class="e-summary">%1s</blockquote>', $embed );
	} elseif ( array_key_exists( 'summary', $cite ) ) {
		echo sprintf( '<blockquote class="e-summary">%1s</blockquote>', $cite['summary'] );
	}
}

// Close Response
?>
</section>

<?php

Icon Support

Finally, you’ll want to include the appropriate svg icon within the plugin so that it will display on the post (if the appropriate settings are chosen within the plugin’s settings interface: either “icon” or “icon and text”), and within the Kinds metabox in the post editor.

You’ll want to have one icon named kindname.svg in the svgs folder and another named kinds.svg in the plugin’s root folder. The kinds.svg is a special ‘master’ svg of all of the kinds icons bundled together. If it helps in matching the icon set, all of the current kind icons are made with Font Awesome icons which have the appropriate licensing for distribution.

In my chicken example, I opted for the feather icon since Font Awesome didn’t have an actual chicken available.

When you’re done

Thanks to the rest of the plugin’s functionality, you should now automatically be able able to make and display individual chicken posts, display a chicken feed (pun intended), and allow people to subscribe to the RSS feed of your chicken posts.

Creating a plugin for new kinds

Naturally some people may want to display particular exotic kinds which might not extend to the broader public. A chicken post type certainly falls under this umbrella as I wouldn’t expect that other than for novelty, obsessive IndieWeb post kinds completeness, or for a very small handful of specialized farming, juggling, or comedy websites that anyone else in their right mind would really want to be doing a lot of posting about chickens on their site.

David Shanske, the plugin’s creator, has made it possible to create a sub-plugin of sorts so that one can add one-off support to these types using  a variety of filters and functions. This could be useful so that updates to the plugin don’t overwrite one’s work and require adding the pieces outlined above back in again. Sadly, this is a tad beyond my present abilities, so I won’t address it further at the moment other than to say that it’s possible and perhaps someone might document it for others to use a similar template in the future.

Try it yourself

Now that you’ve got the basics, it should be relatively easy to add many of your own new post kinds.

Exercise One

If you want a simple exercise, you should be able to go into the code and manually change the show flags for the eat and drink kinds from their default false to true to enable posting food to create a food diary on your website. (These have a reasonable default view and icons already built in.)

Exercise Two

With slightly more work you can change the show flag on the follow kind and copy a view based on the bookmark view to make a follow view to make follow posts. (Here’s a link to my version.) Similarly other hidden kinds like wishes and acquisitions can be enabled easily as well. These also have default icons already built in, but just need a view defined to show their data.

Exercise Three

If you want a slightly larger challenge that uses all of the above, why not attempt adding the appropriate machinery to create a want post?

Exercise Four

Though David has often said before that he wouldn’t build in support for multi-kinds, some people may still want them or think they need them. If you’re exceptionally clever, you might be able to create your own explicit multi-kind by mixing up the details above and creating a kind that mixes a variety of the details and creates a view that would allow the specific multi-kind you desire. Caveat emptor on this approach if you should take it.

Share your ideas

Now that you’ve got the general method, what kinds are you going to deploy in the future? What have you already created? Feel free to reply with your ideas and thoughts below in the comment section or send us a webmention from your own site with what you’ve done. Maybe consider doing a pull request on the plugin itself to add the functionality for others?
​​​​​​​​​

An IndieWeb Podcast: Episode 6 WordPress and Types of Posts

Episode 6: WordPress and Types of Posts

Running time: 1h 53m 58s | Download (35.3 MB) | Subscribe by RSS

In this episode, David Shanske and Chris Aldrich discuss how the Post Kinds plugin mapped IndieWeb types of posts to WordPress and why, the defined as opposed to implied types set up, and avatars.

While the conversation is WordPress-centric, there are a lot of discussions here relevant to a broader IndieWeb audience about adding new types of posts to your site, trying to design things flexibly (although a developer’s guide is probably needed), etc.

 

Huffduff this Episode

🎧 This Week in the IndieWeb Audio Edition • May 26th – June 1st, 2018 | Marty McGuire

Listened to This Week in the IndieWeb Audio Edition • May 26th - June 1st, 2018 by Marty McGuireMarty McGuire from martymcgui.re
Replacing Facebook with newsletters, “Taking Back the Web”, and privacy-preserving maps. It’s the audio edition for This Week in the IndieWeb for May 26th - June 1st, 2018.
Marty gives a nice mention to the note about ColoradoBoulevard.net in this week’s episode of This Week in the IndieWeb.

Here’s the media fragment for the impatient:

👓 New Communities Can Be Overwhelming | David Wolfpaw

Replied to New Communities Can Be Overwhelming by David WolfpawDavid Wolfpaw (davidwolfpaw.com)
I’ve been paying a lot more attention to the IndieWeb space this year, with the intention of revamping my lifelogging site to both include more services that I still use (and remove the fitness tracking that I decided to stop), as well as become a repository for webmentions.
David, Welcome! Come on in, the water’s fine…

I remember lurking for over a year and a half before dipping a toe in for the first time myself. Everyone I’ve met has been so kind, thoughtful, supportive, and helpful that I now regret having let so much time pass before jumping in with both feet.

Since it looks like you’re playing in the WordPress world, feel free to drop into the #WordPress channel (or any of the others for that matter) anytime to ask questions, help others solve problems (we can always use help with UX/UI, and themes especially), talk about what itches you’re working on, or even just to say “hi”. If you haven’t yet, I’m sure you’ll enjoy meeting some of the WP regulars including pfefferle (Germany), GWG (New York), miklb (Florida), snarfed (San Francisco), jgmac1106 (Connecticut), jeremycherfas (Rome), and me: chrisaldrich (Los Angeles).

I hope that the most overwhelming part isn’t getting to know the community, but the sheer number of things that are becoming possible to do with one’s website that weren’t as easily possible just a few years ago. My biggest problem reading the chat logs usually comes in the form of saying, “That sounds/looks cool, I want that too!” about 8 times a day. My best advice for “eating the whole whale” is to do it one bite at a time.

I’ll also personally extend an invitation to the upcoming IndieWeb Summit in Portland at the end of the month. If you can’t make it in person, there should be enough support to allow a lot of direct participation via chat and live streaming video–it’s not quite as much fun as attending in person, but you can participate to a level higher than most conferences typically allow.

Welcome again!