Add Twitter mentions of #DoOO to one of IndieWeb chat channels

Filed an Issue Loqi (GitHub)
Loqi is a friendly IRC bot https://indieweb.org/Loqi
The #DoOO (Domain of One’s Own) hashtag on Twitter is essentially an equivalent of the #IndieWeb hashtag, but more often used by the education segment of the community. While used by educators and researchers, particularly in higher education, their content typically isn’t restricted to that sub-segment and thus are broadly applicable to our overall principles. Many using the hashtag are administrators, developers, and evangelists overseeing large installations to help Gen2+ people join the IndieWeb at scale.

Adding tweets to one of the channels (#indieweb or ) could certainly make sense for the community and be a welcoming addition to those joining us from the education related communities, many of whom have attended past IWCs or are actively participating already.

Current hashtag frequency is roughly 1-3 tweets per day, though for related conferences, their velocity can go higher on a particular day. Higher velocity days likely only occur 1-3 days per year.

Feature Idea: UI code to create an original-of page and/or widget

Filed an Issue Syndication Links Plugin for WordPress (dshanske/syndication-links) (GitHub)
Add and Display Syndication Links https://wordpress.org/plugins/syndication-links/
I noticed that Kartik has an an original-of page at https://kartikprabhu.com/original-of which may have inspired the original-of URL functionality for use in Syndication Links.

For improved UI, is there a code snippet that could be created (or which already exists?) that could be added to a custom page to allow the creation for a simple search for such things the way Kartik has done? I’m thinking of something along the lines of <?php get_search_form(); ?> which can be added to 404 page templates to allow the addition of a search box on such a page to get the user moving in the right direction.

This type of original-of search functionality could also be added to a simple widget as well so that one doesn’t need an entire page for it. Suggested verbiage: “Have a social media permalink for a piece of content? Use it here to search for the original version on this site.”

Fatal Error with WP_Error as array in Webmention Form

Filed an Issue pfefferle/wordpress-webmention (GitHub)
A Webmention plugin for WordPress https://wordpress.org/plugins/webmention/
As mentioned in IW chat:

When placing the URL https://abraham.uno/909/listening-an-indieweb-podcast-episode-0/ into the Webmention Form at http://boffosocko.com/2018/03/19/an-indieweb-podcast-episode-0-considering-the-user/#Respond+on+your+own the following Fatal Error appears at http://boffosocko.com/wp-json/webmention/1.0/endpoint:

Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /htdocs/wp-content/plugins/webmention/templates/webmention-api-message.php:119 Stack trace: #0 /htdocs/wp-content/plugins/webmention/includes/class-webmention-receiver.php(161): require_once() #1 /htdocs/wp-includes/class-wp-hook.php(298): Webmention_Receiver::serve_request(false, Object(WP_REST_Response), Object(WP_REST_Request), Object(WP_REST_Server)) #2 htdocs/wp-includes/plugin.php(203): WP_Hook->apply_filters(false, Array) #3 /htdocs/wp-includes/rest-api/class-wp-rest-server.php(380): apply_filters('rest_pre_serve_...', false, Object(WP_REST_Response), Object(WP_REST_Request), Object(WP_REST_Server)) #4 /htdocs/wp-includes/rest-api.php(271): WP_REST_Server->serve_request('/webmention/1.0...') #5 /htdocs/wp- in /htdocs/wp-content/plugins/webmention/templates/webmention-api-message.php on line 119

Better UI for status update cross-posting option

Filed an Issue Mastodon WordPress Autopost by L1am0 (GitHub)
A Wordpress Plugin that automatically posts your new articles to Mastodon https://wordpress.org/plugins/autopost-to-mastodon/
Given that I suspect most use Mastodon for short status updates (under their 500 character limit), it would be nice if there were an option for posting the_content from WordPress’ main body editor along with the URL and/or any hashtags. This way people could post short updates from their blog as status updates/asides and have the full post (or an automatically shortened version if too long) sent over with a link back to the original.

Currently the posting of Title/Link/Hashtags or Title/Content/Link/Hashtags is better for cross-posting longer blog articles which tend to have titles whereas status updates often don’t have titles.

From a UI perspective, it would also optionally be nice to have some type of character counter for the primary text box to fit into Mastodon’s guidelines. I recall there having been a plugin that did just this which might be repurposed: https://wordpress.org/plugins/character-count-for-post-content-excerpt/

To be able to switch between the various modes Title/Link/Hashtags; Title/Content/Link/Hashtags; and potentially this new Body/Link/Hashtags it would be nice if the Mastodon Autopost meta box had the option to also select between them in addition to the “Post to Mastodon” checkbox.

Replied to Updates broke query variable fill · Issue #158 · dshanske/indieweb-post-kinds (GitHub)
The adding of kindurl= no longer works. Fix needed.
@mrkrndvs I’ve found that if there’s an emoji within any of the metadata sucked into the meta box fields, the filter that sits on these fields to prevent malicious code, can then remove ALL of the data from them when you either save as a draft or try to publish the post.

If you’re finding that it doesn’t seem to work or does so sporadically, you might take a look for things like emoji or other potential unrecognized characters for the URLs you’re trying to use to see if that’s what is causing the bug.

Add support for acquisition kind

Filed an Issue dshanske/indieweb-post-kinds (GitHub)
Adds support for responding to and interacting with other sites using the standards developed by the IndieWeb Community
Based on prior art and details in the IndieWeb Wiki for acquisitions.

I’m including some potential code below, though it will also require adding the appropriate icon and some meta data in a few places for the “Kinds” meta box as well as to the admin UI locations which are currently missing.

I’ve “cheated” a bit and defaulted to display the “wish” icon and thus some of its metadata, so the acquisition kind would need its own icon (the same shopping cart icon may be best) and some small meta data would need to be changed as well in the final.

For those who need to have this right away, the code below will “work” from a display standpoint.

Taxonomy Code template

Code snippet I’ve added to indieweb-post-kinds/includes/class-kind-taxonomy.php just under the section for the wish kind:

'acquisition'  => array(
    'singular_name'   => __( 'Acquisition', 'indieweb-post-kinds' ), // Name for one instance of the kind
    'name'            => __( 'Acquisitions', 'indieweb-post-kinds' ), // General name for the kind plural
    'verb'            => __( 'Acquired', 'indieweb-post-kinds' ), // The string for the verb or action (liked this)
    'property'        => 'acquired-of', // microformats 2 property
    'format'          => 'status', // Post Format that maps to this
    'description'     => __( 'Purchases, gifts, found things, or objects donated to me', 'indieweb-post-kinds' ),
    'description-url' => 'http://indieweb.org/acquisition',
    'show'            => true, // Show in Settings
    ),

Naturally the “true” flag for ‘show’ should be set to “false” until the code is feature complete.

A simple view for the acquisition post kind

Add the following code to the folder indieweb-post-kinds/views/ in a file named kind-acquisition.php

<?php
/*
 * Acquisition 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 h-product h-cite">

<header>

<?php
echo Kind_Taxonomy::get_before_kind( 'wish' );
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', $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-brand">%1s</span>)</em>', $cite['publication'] );
    }
}
?>

</header>

<?php
if ( $cite ) {
    if ( $embed ) {
        echo sprintf( '<blockquote class="e-summary">%1s', $embed );
    } elseif ( array_key_exists( 'summary', $cite ) ) {
        echo sprintf( '<blockquote class="e-summary">%1s</blockquote>', $cite['summary'] );
    }
}
// Close Response
?>

</section>

<?php

Future enhancements

Future additions/improvements to this kind could include potentially adding new data fields to indicate the “location purchased” as well as the “purchase price”, the “manufacturer” and maybe the “condition” with a dropdown for selecting options like brand new, like new, very good, good, acceptable, poor, and unspecified. These could be marked up with the h-product related microformats of p-price and p-brand. These would then need to be tucked into the view as appropriate as well.

Per post map view

Filed an Issue Simple Location (GitHub)
Adds Basic Location Support to Wordpress. Contribute to dshanske/simple-location development by creating an account on GitHub.
Per our conversation and since there are map style features now:

I kind of like the Satellite map views, particularly for the Ireland stops. May be useful to have a toggle per post to do that versus street map view for more city-based posts.

I don’t do it often, but checkins on hikes or vacations would be cooler with satellite view (or topographic view if they had it) while city-stops would be better displayed with traditional line maps.