UI suggestions for watches

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

It would be nice if there were a way to distinguish between various watch types to differentiate between films, television, and internet based streaming media — perhaps with a data field and a toggle along with three appropriate icons for each of these rather than the single watch icon now (a generic “play” button).

Further, most of the current meta data fields are fairly solid for the most often used fields, but I often find that it would be nice to have fields for Season # and Episode # for television shows.

The last “big” piece that would be nice to have is a quickly usable ratings field of sorts so one could provide a rating 1-5, 1-10, or 1-100 rating field? Maybe it could be a simple numerical data field that calculates/displays a rough 5 star-based scale? h-review markup could also come into play here as well, though it would be nice to capture the raw data even if there is no UI display built for it.

Syndicated copies to:

Master View template

Filed an Issue IndieWeb Post Kinds (GitHub)
Adds support for responding to and interacting with other sites using the standards developed by the Indieweb Community

For ease-of-use as well as to help designers, theme builders, and maybe even Gen2 it might be useful to have a “master template” for views which includes all of the output of the data fields within Post Kinds in a single view.

If done in a relatively modular fashion with good commenting, perhaps even Gen2 folks could more easily delete or move pieces within such a master template to mash up various pieces to get what they’d like to display. Including alternate versions for displaying things could be useful as well (eg: raw display of things like start time and end time as well as a separate calculated duration time based on these two.)

Syndicated copies to:

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 #DoOO tweets to one of the channels (#indieweb or #dev) 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.

Syndicated copies to:

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.”

Syndicated copies to:

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

Syndicated copies to:

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.

Syndicated copies to:

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.

Syndicated copies to: