Reply to vishae’s issue Affects the status of private posts

Replied to Affects the status of private posts · Issue #70 · dshanske/simple-location by vishaevishae (GitHub)
I've noticed this issue for a little while now but it's only today that I took the time to try and weed out the source. Whenever I update a post marked as private (visibility set to private), the post would get published to the public instead. Even when I edit the post to try to set it to private again, it still remains public. I have to go to the All Post (edit.php) page and quick edit the post to change the privacy there. It's only when I deactivated simple-locations this issue stopped happening and I can update and change the privacy of my posts in the indvidual post editing page.

I could have sworn I filed this as an issue before myself, but I’m not seeing it in the queue. Perhaps I mentioned in chat somewhere?

Simple location’s privacy setting seems to override the post’s public/private settings on my site as well. Perhaps it’s a naming conflict (function/filter/etc.) with WP’s core content visibility code?

In any case, I can’t make a post private while Simple Location is installed/activated either. This seems to happen regardless of other plugins. I do seem to be able to use @vishae’s method of using the quick edit option to change a post to private. I’m not sure if this may indicate a potential solution to the issue based on what is firing on a post save/update versus what fires on a quick edit save.

Additionally, I don’t seem to be able to mark a particular location as “private” in a post either as upon saving it it defaults back to public in the UI. I only seem to be able to use “public” or “protected” options for locations.

Syndicated copies to:

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:

Reply to More IndieWeb compatible themes #2

Replied to More indieweb compatible themes · Issue #2 · indieweb/wordpress-feature-requests (GitHub)
Currently SemPress is listed as the only theme that is fully microformats2 compliant, but its style is very distinct and will not appeal to everyone. Many indieweb WP sites use twentysixteen or Independent Publisher. I have tried many combinations of the last 2 with the mf2 plugin, and ended up having to edit the theme code to get everything working. Would be great to have more options for themes that "just work". :)

A few random tips/pointers:

@GWG has put out a very customized version of his Twenty Sixteen Theme on Github. For those who have some development skills or are willing to look at examples to try changes themselves, the commit history of this particular theme is very enlightening and does a reasonable step-by-step job of providing snapshots of what he changed in Twenty Sixteen to make it more IndieWeb-friendly. For most themes, one may not want to go as far as he did to remove Post Formats in favor of Post Kinds for greater flexibility, but most of the rest is pretty useful and solid as an example if one is converting/forking other popular themes to make them more IndieWeb friendly.

There are a number of very IndieWeb-friendly themes and even child themes listed on the Themes page of the wiki. Most of these should “just work” though a few may have small bugs which could be filed to their respective repositories to improve them.

It’s generally recommended not to use the mf2 plugin with themes which are already very IndieWeb-friendly as it can cause issues or have unintended consequences. That plugin is generally better used when themes only have the minimal microformats v1 code which is added by WordPress core.

There are also lots of details and brainstorming for improving themes in general on the wiki page for WordPress/Development/#Themes.

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

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: