Git Product home page Git Product logo

indieweb-post-kinds's Introduction

Post Kinds

Contributors: dshanske
Tags: indieweb, interaction, posts, webmention, share, like, scrobble
Stable tag: 3.7.3
Requires at least: 4.9.9
Requires PHP: 7.0
Tested up to: 6.5
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Ever want to reply to someone else's post with a post on your own site? Or to "like" someone else's post, but with your own site?

Description

Post Kinds adds support to the Classic Editor for responding to and interacting with other sites using the standards developed by the IndieWeb by implementing kinds of posts. It is not compatible with Gutenberg.

It can also distinguish certain types of passive posts in a manner similar to post formats. While it can work alongside post formats, it is recommended as a replacement as it is designed as a replacement using IndieWeb Post Types.

Many sites will not need all of the kinds set up. What kinds of posts you wish to publish are specific to your needs.

Screenshots

1. Here is an example of what a like looks like

Here is an example of what a like looks like

2. Here is a reply to a Youtube video

Here is a reply to a Youtube video

Installation

The plugin requires the webmention plugin to support sending/receiving notice of a reply/like to another site which will appear as a comment. The Semantic Linkbacks plugin is available to more richly display received comments.

Privacy and Data Storage Notice

Post Kinds stores extra data in a post indicating what you are responding to. This data is either hand-added or can be parsed from the source URL if provided. This means you have additional responsibilities to responsibly use this data, and to remove information on request.

Credits

  1. Kind Icons are currently provided by Font Awesome and are licensed as CC BY 4.0. A copy of the license notice is bundled.
  2. Chris Aldrich always receives a credit on my plugins due his regular feedback, input, and usage.

Upgrade Notice

3.7.0

This version introduces review posts, but they use an experimental review-of property as a h-entry, not an h-review.

3.6.0

This version introduces the ability to filter kinds from the main feed and introduces a second feed that has all kinds, called the 'firehose' feed, available by default at /firehose. This feature could have unanticipated interactions with other plugins. Please report any issues so they can be addressed.

3.5.0

On This Day and Updated Functionality has been moved into its own plugin, Tempus Fugit, along with various other time based functionality from my plugins. You will have to install that plugin to get these features.

3.3.0

Media metadata storage has been moved into the attachment as opposed to being stored in the post itself. This may have some unexpected effects. Please report if needed. The next version will improve presentation by adding custom media gallery generation functionality.

3.1.4

This version is compatible with 5.0 of WordPress but is not integrated with the Gutenberg editor and requires the Classic Editor to function correctly.

3.1.1

  • Bugs were reported in 3.1.0 and this is a quick fix for the ones initially reported

3.1.0

  • Custom post kind registration, previously done by filter, is now done by registration. This will cause issues who had been using the filter. Due to a particular user who created many custom kinds, decided to create a better way to do this.
  • Posting capability via custom REST API endpoint has been removed due improved Micropub support
  • Kind_Meta class deprecated as promiseda
  • Media Data is no longer stored in the post instead being stored in the attachment
  • This version introduces a lot of base changes. Before making additional ones will be releasing this version so that things can stabilize

3.0.0

Major refactoring of the plugin. The interface has been completely changed to improve simplicity. Please submit all bugs to our Github page.

2.7.0

Storage locations have now changed as part of the nested properties settings and things should migrate automatically but pleasse backup before upgrade. Kind_Meta function is deprecated and will be removed in 2.8.0, so if you depend on this, please update to use MF2_Post

2.5.0

Settings have been completely changed and you will have to reset.

2.4.2

Due to changes in the Micropub plugin, multiple values for properties are now supported. Until this feature is supported in this plugin it will only look at the first value and ignore the others.

2.4.0

I have changed the icons again, to go back to something closer to the original. If anyone wants to contribute alternate icon sets for the project, willing to consider adding them. Also, coming up is another change to how the plugin stores and works with data to continue to move toward something closer to Microformats. Looking at a JF2 representation.

2.0.0

This version makes some changes to the presentation. Backup your installation first as a precaution. Lots of changes under the hood which will bear fruit in future.

1.2.0

This version migrates data to a new storage formats. Backup your installation first as a precaution.

Frequently Asked Questions

How does it work?

Kinds, like Post Formats built into WordPress, allow you to specify that a post contains a certain type of content. It also, based on you classifying it that way, displays it appropriately and marks it up accordingly so outside sites can identify it. Kinds are either a response to something, such as a URL, or a more passive type of post where you are recording/logging something you did, for example, watched a movie.

How do I interact with other sites?

This is added by webmention support.

  1. Bob wants to reply to Sue on his own website.
  2. Sue enables webmentions(separate plugin) on her site.
  3. Bob creates a post and sets it as a reply to or a like of Sue's post.
  4. A webmention is sent to Sue's site, and Sue's site uses the markup added by this plugin to determine what kind of post it is.
  5. Sue's site stores and displays data from the post as a comment on Sue's post.

How do I learn more?

For more information on the Indieweb and tools for WordPress, visit Getting Started on WordPress.

There are too many Post Kinds

You can enable/disable more based on preference. Some may be enabled by plugins. You do not have to use ones you don't want. Not having a post kind enabled will not disable the functionality on existing posts, it only hides the selection in adding new posts.

What are the kinds of posts I can make?

These kinds have an analog in post formats. Adding context to one of these may make it a Passive Kind.

  • Article - traditional long form content - a post with an explicit post name(title)
  • Note - short content - a post with just plain content (also the default)
  • Photo - image or photo post - a post with an embedded image as its primary focus. This uses either the featured image or attached images depending on theme.
  • Video - video post - a post with an embedded image as its primary focus.
  • Audio - audio post - a post with an embedded sound file as its primary focus.

The Response Kinds

  • Reply - Replying to someone else's comment
  • Repost - a complete repost of someone else's content
  • Like - props/compliments to the original post/poster
  • Favorite - special to the favoriter
  • Bookmark - This is basically sharing/storing a link/bookmark.
  • Quote - Quoted Content
  • RSVP - A specific type of Reply regarding an event
  • Check-In - Identifying you are at a place. To show full location, the Simple Location plugin is recommended as it will display maps.
  • Issue - Issue is a special kind of article post that is a reply to typically some source code, though potentially anything at a source control repository.
  • Review - Review is a post evaluating a product, service, or experience.

The Passive Kinds

To "Scrobble" a song is when listening to it, you would make it a post on your website. This is the most well-known example of a passive kind of post. They are formed by having content in the context box on one of these types of posts.

  • Listen - scrobble - listening to an audio post
  • Jam - Indicating a particularly personally meaningful song
  • Watch - video - watching a video
  • Play - playing a game
  • Craft - making something...such as 3D printing, crafting, etc.
  • Read - reading a book, compared to online material
  • Eat - Representing recording what you eat, perhaps for a food diary
  • Drink - Similar to Eat

What kinds do you plan to add in the future?

The following Kinds are reserved for future use but will not show up in the interface at this time.

  • Wish - a post indicating a desire/wish. The archive of which would be a wishlist, such as a gift registry or similar.
  • Weather - A weather post would be current weather conditions
  • Exercise - Representing some form of physical activity
  • Trip - Representing a trip...this represents a geographic journey and would require location awareness.
  • Itinerary - Itinerary - this would refer to scheduled transit, plane, train, etc. and does not require location awareness
  • Tag - Allows you to tag a post as being of a specific tag, or person tagging.
  • Follow - A post indicating you are now following someone's activities
  • Mood - Mood - Feeling
  • Recipe - Recipe
  • Event - An event is a type of post that in addition to a post name (event title) has a start datetime (likely end datetime), and a location.
  • Sleep - Sleep is a passive metrics post type that indicates how much time (and often a graph of how deeply) a person has slept.
  • Acquisition - Purchased, Donated, or otherwise acquired an object
  • Question - Question is a post type for soliciting answer replies, which are then typically up/down voted by others and then displayed underneath the question post ordered by highest positive vote count rather than time ordered.

Can I add my own kinds?

I would prefer if something is popular enough to merge it into the plugin. Feel free to ask for a term to be reserved by filing an issue. However if you are interested in creating your own there is functionality around it.

register_post_kind( 'reply', array( 'singular_name' => __( 'Reply', 'indieweb-post-kinds' ), // Name for one instance of the kind 'name' => __( 'Replies', 'indieweb-post-kinds' ), // General name for the kind plural 'verb' => __( 'Replied to', 'indieweb-post-kinds' ), // The string for the verb or action (liked this) 'property' => 'in-reply-to', // microformats 2 property 'format' => 'link', // Post Format that maps to this 'description' => __( 'a reply to content typically on another site', 'indieweb-post-kinds' ), 'description-url' => 'http://indieweb.org/reply', 'title' => false, // Should this kind have an explicit title 'show' => true, // Show in Settings ) ) );

Add a function with your kind in the above format, hooking it in the init hook and it will add the Kind to the system.

Can I enable one of the Kinds you plan to offer in future?

set_post_kind_visibility( $slug, $show = true ) - If you add this function in early on, it will change the visibility of a kind.

Can I create archives for each kind?

Post Kinds automatically handles the display of archives of individual types. So to view all the posts marked as "note", for example, one could visit the URL http://www.YOURSITE.COM/kind/note/. Simply replace YOURSITE.COM with your particular site name and the particular post kind name to access the others.

You can also add the date /kind/note/2018/12/24 to see date-based archives.

For archives if you add exclude_kind as a query variable it will exclude specific kinds from the query ?exclude=kind&exclude_terms=note. You can also do this as /exclude/kind/note,checkin as it accepts multiple values

There is also a special photo photo included, using ?kind_photos=1 or /photos or /photos/yyyy or /photos/yyyy/mm or /photos/kind/note or any other taxonomy. This will use the photo enhancements introduced in 3.4.0 to only show photos from all types of posts.

Do you have RSS feeds for each kind?

Post Kinds also automatically handles RSS feeds which can be made available or subscribed to for any of the particular kinds. The RSS feed for all the posts marked as "note", for example could be found at either the URL http://www.example.com/kind/note/feed or http://www.example.com/feed/?kind=note (if one doesn't have pretty permalinks enabled). Others can be obtained by replacing "note" with the other kinds.

Do you support bookmarklets?

At the moment, a fully automatic bookmarklet is not yet part of the plugin but you can send data directly to the Post Editor

  • If you add ?kindurl=URL to the post editor URL, it will automatically fill this into the URL box in post properties
  • If you add ?kind=like to the post editor URL, it will automatically set the kind.

So - https://www.example.com/wp-admin/post-new.php?kindurl=URL&kind=like will automatically set a like with the URL

Can I post automatically outside the Post Editor?

Using the Micropub plugin for WordPress is the easiest way to post outside of the Post Editor. This will work with any Micropub client.

I installed JetPack and I am no longer getting context added to my posts

The JetPack sharing module conflicts with this plugin.

When will this plugin support the Block Editor?

I am not sure. It is not a strict priority. At this time, there is no definite time for this support. I have been gradually moving toward abstracting more of the data into the REST API so it could more easily be added to the block editor.

How do I get support?

The Development version of the plugin is hosted at Github. You can file issues there.

Theme Support

Post Kinds automatically adds information to the_content and the_excerpt filter. Being as this is inside the content block, which may or may not be desirable, you may remove these filters as noted below and call kind_display directly. This will allow it to appear outside the content block. To remove the automatic display, add the following to your theme. * add_filter( 'kind_content_display', '__return_false' );

The functions has_post_kind, set_post_kind, and set_post_kind will allow you to manipulate the kind settings in a post. get_post_kind_string will return the display name of a kind.

If you want to customize the look of the display, you can create a directory in your theme called kind_views, copy the file from the views directory of the plugin, and modify it. This will persist through future plugin updates.

Changelog

  • 3.7.3 ( 2024-04-09 ) =
  • Ensure widget array is instantiated

3.7.2 ( 2023-12-25 )

  • Fix markup on kind_get_the_link function to allow for classes for date for overall link

3.7.1 ( 2023-12-17 )

  • Fix issue where the brackets for kind in the title were added even when there was no kind

3.7.0 ( 2023-11-24 )

  • Introduce rating property, offering 1-5 ratings
  • Introduce review post kind, which uses ratings
  • Extend ratings to Watch, Listen, Read, Eat, and Drink

3.6.5 ( 2023-10-01 )

  • Posts with no Kind will appear even when the firehose filter is enabled
  • Minimum PHP is now 7.0
  • Replace ifset with the null coalescing operator
  • Minor dependencies

3.6.4 ( 2023-01-02 )

  • Fix issue with Parse This for PHP8 and above

3.6.3 ( 2022-12-26 )

  • Minor bug fixes for error messages
  • New version of Parse This

3.6.2 ( 2022-11-21 )

  • Try to set ActivityPub type for the ActivityPub plugin based on Post Kind.
  • Update to latest Parse This Changes

3.6.1 ( 2022-07-16 )

  • Minor bug fixes
  • Update to latest Parse This changes

3.6.0 ( 2022-06-19 )

  • Fix issue with dynamic menus not appearing on custom archives
  • Fix issue with bulk edit removing data
  • Update to Parse This Version for better results
  • Add ability to filter main feed, and add secondary all kinds feed.
  • Introduce filter config option to display additions to content instead of having to remove it specifically.

3.5.12 ( 2022-01-09 )

  • Markup time appropriately in kind_link function.

3.5.11 ( 2021-11-03 )

  • Fix bug introduced in error type checking in prior version

3.5.10 ( 2021-11-02 )

  • Additional type checking

3.5.9 ( 2021-08-25 )

  • Move title generation for lists into a separate function that can be called for widgets and other items to avoid duplication
  • For photo posts in list view, show a photo thumbnail as opposed to the photo kind icon.

3.5.8 ( 2021-08-08 )

  • Improved support for widget_title filter
  • Allow for removal of icon attributes using filter.

3.5.7 ( 2021-07-27 )

  • CSS Style Changes

3.5.6 ( 2021-04-01 )

  • Introduce Craft Post Kind.

3.5.5 ( 2021-03-19 )

  • Update filter and CSS for This Week functionality.

3.5.3 ( 2021-03-16 )

  • Fix issue with spurious filter.

3.5.2 ( 2021-03-12 )

  • Fix reported minor bugs.
  • Move to GitHub Actions for Automated Testing

3.5.1 (2021-03-09 )

  • Do not Enqueue Media Fragment JS if AMP Endpoint

3.5.0 (2021-03-09 )

  • Removal of On This Day functionality to separate plugin
  • Removal of Updated functionality to separate plugin
  • Rewrite of all rewrites to simplify generation
  • Improve archive title, document title, and archive description generation.

3.4.19 ( 2021-02-22 )

  • Improve output of On This Day Widget.
  • Flush Rewrite rules on Plugin Upgrade.
  • Add 'food' as alias for eat,drink. Example /kind/food
  • Add 'reaction' as alias for bookmark,repost,like,favorite
  • Add 'media' as alias for watch,listen,play,read posts.

3.4.18 ( 2021-02-03 )

  • Fix bug with sending of webmentions ( props @pfefferle for discovering it)
  • Fix issue with echoing proper microformats class after recent addition of p- option for non-urls

3.4.17 ( 2021-01-22 )

  • Fix reversion issue with photos not being picked up.
  • Add check for VR/360 shortcodes
  • Mix on this day and photo template to show On This Day photo template

3.4.16 ( 2021-01-19 )

  • Fix issue with photos overrunning boundary
  • Fix issue where photos were not picked up on certain kinds of posts
  • Minor structural issues.

3.4.15 ( 2021-01-16 )

  • Rewrite existing rewrites.
  • Allow the onthisday and photos slug to be customized

3.4.14 ( 2021-01-13 )

  • Fix CSS issue for On This Day widget
  • Update checkin view to use Kind_Post function to retrieve photos
  • Look for galleries as part of photo posts
  • Add /photos rewrite to show all posts that have photos in them.
  • Fix issues with empty urls displaying.
  • Fix issue with start and end date saving caused by previous changes.
  • Do not show domain for publication when it is the same as the website.

3.4.13 ( 2020-12-25 )

  • Add On This Day Widget
  • Add /onthisday for the current day

3.4.12 ( 2020-12-18 )

  • Update dependencies
  • Remove JS scripts for time handling due issues in use
  • Fix issue with video handling
  • Minor bug fixes

3.4.11 ( 2020-11-24 )

  • Fix markup issues for checkins.
  • Add domain name as the default for publication property on display.
  • Misc markup issues.

3.4.10 ( 2020-10-24 )

  • Fix issue with Twitter summary not showing up.
  • Remove p-name markup for now from displayed name of media so it does not mess up microformats parsing.
  • Check if default name of attachment is the filename without extension and do not display if it is.

3.4.9 ( 2020-10-14 )

  • Normalize citations for use in display and metaboxes.
  • JSON-LD returns an h-card as a publication parameter, but that isn't currently supported, so fix this in the import.

3.4.8 ( 2020-10-12 )

  • Add migration for pre 2018 data to new format.

3.4.7 ( 2020-10-12 )

  • Fix Parse This issue with normalization of atypical datetime strings to ISO8601.
  • Add additional validation to DateTime conversion in Post Kinds to check that input is a valid string and fail if it is not instead of PHP Notice
  • Add tests for Kind_Post class and add argument to get_cite to allow a specific key to be retrieved from the cite property, eliminating some duplicate code.

3.4.6 ( 2020-10-09 )

  • Add authorship display for media files
  • Add duration display for media files
  • Fix issue with saving attachment files
  • Check and enhance media metadata display options

3.4.5 ( 2020-10-05 )

  • Added additional unit tests for mf2/jf2 conversion in Parse This to see if this was causing some inconsistency issues.
  • Centralized retrieval of embed, author, and url before the view template is loaded instead of in it. Believe that this process needs to be simplified, possibly through some functions as this is what keeps causing PHP Notices and Save Errors.

3.4.4 ( 2020-10-01 )

  • Fix save and retrieve issues.
  • Parse This version now offers Twitter parsing again, using Oembed data.

3.4.3 ( 2020-09-29 )

  • Fix issue with Kind Post Widget

3.4.2 ( 2020-09-26 )

  • Fixed DateTime parsing bug in UI
  • Fixed issue with suggested permalink
  • Fixed issue with title in admin.

3.4.1 ( 2020-09-24 )

  • Introduced two bugs not discovered in testing.

3.4.0 ( 2020-09-24 )

  • Add support for the Hum URL shortener to adjust prefix based on post kind. Implementation is not strictly as per the Whistle spec as it uses some suggested prefixes.
  • When a post is updated, go through the content and extract any image, video, or audio IDs from the content and save them to meta so they do not need to be parsed each time. If there are any media items in content this will disable auto-embedding.
  • Add an Artist Name and Artist URL field to the Image Media Metadata.
  • Introduce Kind_Post class that will replace MF2_Post. Difference between the two is that MF2_Post generates all properties when you instantiate it. Kind_Post gets each property on demand.
  • Move all sideloading functions to the Media Metadata class
  • Lots of fixes to avoid duplicate media display.
  • Remove custom Micropub query source code.
  • Switch duration display to dt-duration from p-duration

3.3.6 ( 2020-08-15 )

  • Fix deprecation issues from WordPress 5.5
  • Update embed provider approval list

3.3.5 ( 2020-08-02 )

  • Parse This refresh
  • Try to fix author saving issue where author was not saving if not both name and url
  • Add offset support to Post Kinds implementation of q=source for Micropub
  • Fix Kinds showing as option in Menu Customizer

3.3.4 ( 2020-06-28 )

  • Maintenance Release
  • Parse This version updated
  • Store image credit as the author
  • Show context at bottom option not respected on feeds ( props @tonzyl on first PR )
  • Fix pagination issues on custom archive pages.
  • Master branch now the trunk branch.

3.3.3 ( 2019-09-16 )

  • Fix and improve view template search functionality
  • Set title tag from title generate function if empty

3.3.2 ( 2019-08-03 )

  • Improved logic around no Block Editor support - thanks @tw2113
  • Fix Settings Link in Plugin page - thanks @glueckpress
  • Update admin notice text for clarity - thanks @glueckpress
  • Fix issue with atom feed

3.3.1 ( 2019-06-23 )

  • Filter issue immediately reported after deploy
  • Sanity check missing

3.3.0 ( 2019-06-23 )

  • Add remote as an RSVP property
  • Add feed templates
  • Misc bug fixes
  • URL validation in JS not firing if property is empty
  • Updated Parse This
  • Rearrange Parse This filed and removed bundling SimplePie with Post Kinds from Parse This
  • HTML5 Masterminds library is now part of Parse This so new load procedure needed
  • Use new autoloader from Parse This
  • Add autoloader for included classes
  • Added Clone Media Fragment JS courtesy https://aaronparecki.com/2017/02/19/4/day-61-media-fragments. This allows for timestamps for audio or video
  • Fix issue with exclude argument for the default feed

3.2.6 ( 2019-05-16 )

  • Only allow citations for more than one video until improvement to media display
  • Adjust inline style again at request of theme developer
  • Fix issue with WordPress filters not being used by moving Post Kinds additions to before they are run
  • Add Nag for Classic Editor

3.2.5 ( 2019-05-14 )

  • Merge in update from Parse This that did not make it into 3.2.4 fixing saving of citation tags
  • Fix issue in new markup

3.2.4 ( 2019-05-12 )

  • Add exclude kind query var and rewrite
  • Adjust icons to relative values and prevent fatwigoo
  • Change checkin icon
  • Fix issue where post date was not being passed to widget
  • Attempt to fix permalink issue reported

3.2.3 ( 2019-04-27 )

  • Fix issue with attached media
  • Only suggest permalinks if not published
  • Fix storage issue with tags in citation
  • Hide media box when not media type
  • Fix duration storage issues

3.2.2 ( 2019-03-24 )

  • Fix issue with kindurl query
  • If no title try to generate a slug from the content or excerpt
  • Add food and drink templates and activate types

3.2.1 ( 2019-03-10 )

  • Revert load change

3.2.0 ( 2019-03-10 )

  • Switch from SVG Sprites to inline SVG
  • Adjust storage locations for included libraries
  • Refreshed version of Parse This that improves post type discovery for Micropub and parses more properties
  • Add basic template to display events and itineraries from Quill

3.1.8 ( 2019-01-12 )

  • Fix issue with Micropub posting caused by this plugin

3.1.7 ( 2019-01-05 )

  • Fix issue with new tag rewrite overwriting feed by changing tag kind archive to /kind/????/tag/?????

3.1.6 ( 2018-12-31)

  • Fix Micropub bug introduced by Parse This change.
  • Written on a JetBlue flight as the last fix of 2018

3.1.5 ( 2018-12-28 )

  • Update Parse This load to only load when needed
  • Add title to Kind Menu widget
  • Add Kind Posts Widget
  • List minimum supported version as PHP5.4 as part of a slow bump up of version requirements

3.1.4 ( 2018-12-07 )

  • Fix issue with widget
  • Declare metaboxes are not compatible with Gutenberg

3.1.3 ( 2018-12-06 )

  • Add Kind Menu Widget
  • Add onthisday redirect
  • Minor fixes

3.1.2 ( 2018-11-24 )

  • Date archive view for kind archives
  • Tag archive view for kind archives
  • The Embed template allows for a template in the theme based on post format. This allows post kinds as an alternate
  • Take over source queries for Micropub

3.1.1 ( 2018-10-14 )

  • Fix save issues for Post Kind
  • Fix auto-import for bookmarklets
  • Fix author showing anonymously
  • JSONFeed enhanced to use external url property

3.1.0 ( 2018-10-13 )

  • Missing Add New Note in Dashbar
  • Add itinerary to post type discovery
  • Do not return a failed attempt to parse a URL
  • New post kind registration function and classes replaces the previous filter and array.
  • Parse This split into a more independent library.
  • MF2 Debugger removed in favor of test parser inside admin
  • Link Preview endpoint moved to Parse This and posting capability removed due improvements in Micropub
  • Parse This now uses DOMDocument and XPath over regex. To avoid high overhead, since MF2 parsing also uses this, shift to generate DOMDocument only once.
  • Parse This now generates compliant mf2 and jf2
  • Kind_Meta class now removed as promised in prior version
  • Parsing author URLs by making a second call to the URL and parsing that is now disabled by default as making multiple calls was slowing the parsing and therefore should be optional.
  • Name of Kind Terms in Taxonomy adjusted to singular internationalized string per request
  • Descriptions of kinds and names now updated on plugin activation or loading of settings page.
  • For new posts citations should now be stored in compliant mf2 h-cites and will be refreshed on update of old posts.
  • Delete old property when changing kind
  • Finding photos, audio, and video is now in the MF2_Post class and the views are updated accordingly
  • An instance of the MF2_Post class($mf2_post), the kind($kind), the mf2 property associated with that kind($type), as well as initializing $embed and $url are available to all views rather than having them instantiate them individually. This means some overhead.
  • The MF2_Post class now caches the generated data in the event it is requested multiple times in a pageload.
  • The MF2 post class now checks the photo property only for remote URLs and sideloads them.
  • As of this version, Parse This is now a separate repository and all feature updates will be noted as of the next version in its separate changelog.
  • Kind now appears in REST API post controller
  • Photo Video and Audio now use the WordPress media selector and the citation should now be added in the attachment, as opposed to inside the post
  • Photo Video and Audio presentation have new functions for display that are currently wrappers around the WordPress functions but hoping to add more customization in future

3.0.9 ( 2018-06-23 )

  • If title is empty show start of excerpt in admin only
  • Set default to article if post is a published post as opposed oto the default.

3.0.8 ( 2018-06-20 )

  • Fix read template
  • Add change_kind hook that triggers when a the kind on a post is changed
  • Flush rewrite rules on plugin activation

3.0.7 ( 2018-06-17 )

  • Add support for read-of property in micropub code
  • Add direct links to post a new kind
  • Add title property to kind info array

3.0.6 ( 2018-05-14 )

  • Add option to move response to bottom
  • Restore response to jsonFEED
  • Only show text on feeds not icon

3.0.5 ( 2018-05-06 )

  • Add privacy policy
  • Change read property to read-of
  • Add mf2 data to JSONFeed
  • Improve feed handling of context in general

3.0.4 ( 2018-04-28 )

  • Add support to automatically generate enclosures on photo, video, and audio kind
  • Add player to audio and video template for provided URLs if not attached or not a known embed

3.0.3 ( 2018-04-14 )

  • Update PHP-MF2 and add HTML5 parser
  • Add support for checkedin-by property to parser
  • Add ate and drank properties to post kind discovery
  • Initial support for media files locally
  • Update Kind Archive and Description Display to support multiple terms passed through( example.com/kind/checkin,photo ) See notes on unsupported WordPress status( https://core.trac.wordpress.org/ticket/34587 )
  • Restore post type discovery behavior to note as testing seems to work now
  • Reserve acquisition kind per request @chrisaldrich and assign icon
  • Add hidden link with u-url to rich embeds in order to parse correctly

3.0.1/3.0.2 ( 2018-02-24 )

  • Forgot to include a JS dependency

3.0.0 ( 2018-02-24 )

  • Redo metabox into new more dynamic function
  • Move metabox to default above editor
  • Hide metabox when note or article is selected
  • Show RSVP only when RSVP option is selected
  • Show Duration and Start End only on appropriate kinds
  • Add Duration selection
  • Automatically retrieve details when URL box is updated allowing button to be removed
  • Validate URL in box client-side
  • Reserve question and sleep kind
  • Activate Issue Kind due Github publish support added to Bridgy
  • Override WordPress functionality to protect against empty posts if kind metadata is present
  • Split time related functions into their own global function file
  • Remove old tab templtes and replace with new templates for dynamic functioning
  • Switch to dependency management for JS includes with npm
  • Remove/consolidate admin JS

2.7.6 ( 2017-12-23 )

  • Add audio kind view template
  • Amend video kind template to include u-video
  • Bypass micropub enhancements if micropub query as was generating error
  • Add photo capability to checkin template
  • Add safety check to Micropub filter to ensure not corrupting data

2.7.5 ( 2017-12-14 )

  • Remove support for showing settings in REST API due issue with array property
  • Add support for automatically retrieving when URL passed through from Micropub
  • Add support for automatically retrieving when URL passed through as query variable in post UI
  • Add support for simple API using REST to post
  • Multi-author data no longer dropped but not fully supported

2.7.4 ( 2017-12-09 )

  • Check for missing properties in all templates which should only happen if improperly filled
  • Switch entirely to icons from the new Font Awesome 5 release
  • Bugfixes

2.7.3 ( 2017-12-03 )

  • Change user agent
  • Parser now captures video and audio tags and attempts to identify common file extensions
  • Adding filters to make additional custom parsing possible
  • Additional site tests
  • Add specific featured image parsing
  • Fix issue with author details generating fatal error when name only
  • Fix underlying issue of collapsing single property associative arrays instead of just single property numeric arrays
  • Parsing tweaks to allow for improved data to be passed, even if not yet displayed

2.7.2 ( 2017-11-30 )

  • Remove PHP Shim library as not maintained and only used to get two extra properties from Twitter
  • Switch to Composer for quick updates to PHP-MF2 (inspired by similar move by Semantic Linkbacks )
  • Additional bugfixes for issues introduced in 2.7.0

2.7.1 ( 2017-11-25 )

  • Fix check-in markup
  • Fix errors caused by transition to arrays in 2.7.0 by not calling for single values in output

2.7.0 ( 2017-11-24 )

  • Introduction of MF2_Post class to convert the Post into MF2 properties as a replacement for Kind_Meta
  • Unit tests for Kind_Taxonomy
  • Tests revealed issue in has_kind function - fixed
  • Kind_Meta now deprecated and is a wrapper for retrieving using MF2_Post
  • Storage has changed to a nested mf2 from a simplified jf2 however returns from MF2_Post are still in the simplified JF2 by default
  • Checkin kind is now active but there is no full Post UI for it so this is primarily for use Micropub.
  • Additional improvements in template and storage.
  • Improvements in parsing different cases for the purpose of previewing links

2.6.6

  • Fix eat svg icon
  • Update travis and phpcs testing parameters
  • Fixes in code based on phpcs discovered parameters
  • Support additional properties in the parser and some nested microformats(h-adr)

2.6.5

  • Add video kind template ( props @Ruxton )
  • Restore ability to use text instead of icon
  • Add option to select icon text or no display
  • Add filter to disable icon or text
  • Add new PHP requirement option to header
  • Update Travis CI due changes

2.6.4

  • Enhance kind detection ( props @Ruxton )

2.6.3

  • Hide KSES option behind POST_KINDS_KSES flag as it confused new users. (Sorry @acegiak)
  • Allow meta tags with content first to be parsed and add Foursquare specific OGP tags
  • Move enabling of kinds into the new unified settings
  • Set checkin kind if checkin property is present in Micropub
  • Preliminary checkin template

2.6.2

  • Fix for absence of kind

2.6.1

  • Fix photo template
  • Add audio and video kind.
  • Reserve event and issue kind.
  • Fix overbroad u-photo.

2.6.0

  • Remove h-as properties
  • Add basic templates for some different kinds
  • Improve duration display
  • If post_ID not passed to display function will use get_the_ID
  • Remove mf2 CSS from being styled
  • Allow for child themes to add kind templates
  • Photo post will now use either featured image or gallery of attached media automatically.

2.5.2

  • Generation of strings being moved from individual functions to one unified function to make management easier
  • Description now appears on Archives
  • Description now appears on settings page
  • Adding of kind-type css class only to posts
  • Enhance setting of kind based on micropub properties
  • Only set post format on initial save not subsequent ones

2.5.1

  • Fix bug hiding metabox
  • Add drop down filter for Kinds to View Posts

2.5.0

  • Parsing code now rewritten to add Parse This class based on Press This parsing code
  • MF2 parsing code rewritten and consolidated - future improvements coming
  • Link Preview class now supports AJAX over REST API instead of admin-ajax
  • Start/End and Published/Updated Separated in UI
  • Duration is calculated and saved when post is saved based on start and end dates
  • RSVP property created and the RSVP kind now available as an option
  • Tags now an option for a reply-context and will be displayed as hashtags in future.
  • Facebook manual embed code removed as Facebook is now supported by WordPress as of 4.7 for embeds
  • Google Plus manual embed code removed even though Google Plus is not supported mostly because did not wish to maintain as sole exception
  • Add whitelist - oembed will only be used if one of the officially whitelisted sites is there(Filter Available). Otherwise it will use the link-preview generation. Option to disable.
  • Set default post format based on post kind.
  • Redoing of options and removal of option to remove post formats support and theme compat
  • Update help description
  • Fix Mood SVG
  • Cleanup and removal of older code

2.4.4

  • Simplify coding standards issues
  • Update settings
  • Add quote kind ( props @miklb )
  • Enhance parsing code in preparation for more enhancement

2.4.3

  • Setting of Kind from Micropub now fixed due changes in Micropub plugin
  • Micropub sets all properties as arrays including single properties and to match this will require more extensive changes. In interim plugin will ignore multiple values and only use the first.

2.4.2

  • Fix text domain
  • Compatibility check for 4.6
  • Change default to article from note, per commentary.

2.4.1

  • Fix error where Twitter shim is not loaded if other version of MF2 Parser is loaded
  • Reserve Recipe per Request
  • Removed the word travel and replaced with trip and itinerary...(idea from @aaronpk).

2.4.0

  • Refactor to initialize classes in new plugin loading class
  • Remove additional global functions
  • Switch from inline SVG to an SVG sprite
  • Switch icons back to new Genericon svg icon set with supplements from FontAwesome
  • Switch like to a heart to be in line with current thinking on this
  • Views now use a function that looks for a directory called kind_views in the theme in the event any theme wants to customize display kinds
  • Mood was added as a reserved kind per request @acegiak
  • Made some adjustments to the meta parsing to improve results

2.3.7

  • Remove auto-set function for kind if not post type post
  • Move global functions to the class in which they were used
  • Refine MF2 parser check to hide retrieve button if version is less than 5.3

2.3.6

  • Manually fix Parser which in latest version has one line that breaks compatibility with PHP 5.3
  • Disable MF2 Parser usage if version lower than 5.3

2.3.5

  • Remove comment transition action in favor of proposing it be moved into webmentions plugin
  • Replace send webmentions code with a hook
  • Add PHP docblocks to php-mf-cleaner
  • Update to latest version of MF2 Parser
  • Theme Compatibility CSS separated from Basic CSS and Admin CSS again
  • Remove helper functions no longer used

2.3.4

  • The CSS included with Post Kinds hides entry-title by default where applicable for non-aware themes.
  • Attempted to fix reported issue with wrong URL being sent webmention
  • Fix error with emoji decode test backcompat
  • Separate parsing code into separate class
  • Retire separate OGP Parser in favor of simpler built in code

2.3.3

  • Fix issue with improper microformats generating bad parsed results.
  • Add default kind option
  • Change how plugin handles default options by adding Defaults function
  • Bug fix by acegiak to content protection override
  • Feature added by acegiak to set default kind if no kind is set when post is saved
  • Add post_id to filter kind_response_display
  • When retrieving information on a URL, set the title to the title of the URL if no title is set
  • Add kindurl query variable to admin. If you add it to wp-admin/post-new.php with a URL then it will automatically put that URL in the URL box. For use by bookmarklets

2.3.2

  • Fix rendering issues when no response
  • Add support for Indieweb Plugin
  • Special rendering for excerpts

2.3.1

  • Changed method of retrieving svg files due server restrictions
  • Jquery Date and Time Picker now enables when HTML5 input date/time not supported

2.3.0

  • Attempt to fix emoji issue reported by @acegiak
  • Duration to be deprecated and replaced by start date and end date. The presence of a duration field will be used over start minus end date..
  • Start/Published Date and End/Updated Date have an updated input field instead of a text string
  • Response caching removed due limited utility
  • Removal of older code in favor of new templating system for each kind. Have tried this before, but really want to make it work.
  • Font icon replaced with SVG icons.
  • Retrieve button now generates an alert if the URL box is blank or does not have a URL.
  • Start of help system
  • Hooks for possible future author data to be stored/retrieved from a nicknames cache
  • Activation of the jam post kind, previously reserved.
  • Addition of the read post kind, reflecting having read a book, as opposed to shorter content.
  • Reserving of the quote post kind, for excerpting. Will be added in future version

2.2.1

  • Minor Tweaks and Bugfixes from changes in 2.2.0.
  • Inputs Sanitized for Your Protection
  • Summary currently shows summary of input if available. Full content is parsed if marked up with microformats, however this, like many elements, is not currently used.
  • Rewrote storage protocol for better retrieval but still in intermediate state.
  • Plan to rewrite and improve the display functionality with more templates for version 2.3.0.

2.2.0

  • New Tabbed Metabox - More Fields are Always Desired and this new design allows for more fields to be added without overwhelming the interface
  • AJAX Enabled Retrieve Function instead of Automatic Retrieval
  • New Fields for Citation (Published, Updated, Featured Image)

2.1.2

  • Fix priority - user entered values should override parsed ones
  • Add filters for parsing from additional markup and building the metadata
  • Support for microformats2 import of metadata in addition to existing support for OpenGraph
  • In the next version, will be rewriting the additions to the post editor. per request, it will give more control over the automatic parsing.
  • Webmentions are now only sent if the new status is publish

2.1.1

  • Bugfixes from Version 2.1.0
  • Removal of Semantic Linkbacks code due upgrade in Semantic Linkbacks making it unnecessary

2.1.0

  • Metadata Processing will be centralizing in the Kind_Meta class
  • Continuing to move toward WordPress Coding Standards including inline documentation
  • Fixes for the OpenGraph Parsing of Content to Fill Additional Metadata
  • Metadata fields not part of the user interface to be stored for future use
  • You can now pre-select a kind by adding ?kind=reply to wp-admin/post-new.php
  • Merged the Kind_View and Kind_Display into a single class
  • Plan for Customizable Display Objects will be replaced by hooks/filters in the next version.
  • New Function get_post_mf2meta to retrieve the mf2 prefixed metadata
  • Supports setting the post kind for posts created by Micropub plugin
  • Rearrangement of classes and functions in an attempt to simplify
  • Settings Page Now Allows You to Select which Kinds to Show in the New Post UI
  • Clarified that some terms are reserved for use as future kinds.
  • Added reserved terms eat, drink, follow and jam.
  • Supports setting kind eat or drink when triggered by Teacup/Micropub only

2.0.2

  • Change markup to use e-content instead of p-content
  • Add versioning for CSS

2.0.1

  • Bugfixes
  • Accepted fix for webmention sending from acegiak
  • Add option to disable sideloading of author images

2.0.0

  • Rewrite completed
  • Multi-author/multi-reply temporarily removed in storage, but it wasn't being used yet anyway
  • Customizable display objects now supported
  • Open Graph Protocol Parsing Added to Extract Title/Description/Image from URLs
  • Sideloads Author Picture
  • Add Duration Meta Field by request of Acegiak. This can be used for duration of activity...for example, watching/playing/listening/exercising/etc.

1.4.1

  • Bug fixes for changes made in 1.4.0.

1.4.0

  • Begin rewrite to class-scoped functions in line with WordPress Guidelines.
  • Part of a major refinement and tightening of code

1.3.1

  • Additional refinements to kind defaults and minor bugfixes

1.3.0

  • Add functionality to better customize displays for different types.
  • Add default options on activation.
  • Show/hide check-in if Simple Location plugin is enabled.
  • Change exclude types to include types.
  • Add filter for plugins to show/hide kinds in the selector.
  • Reduce default to a handful of kinds for new users. The plan going forward is to have some functionality enabled by secondary plugins

1.2.3

  • Fix bug introduced in 1.2.2 with URL storage.
  • Add publication as a field option

1.2.2

  • Add option to disable KSES protection on the content box(courtesy/request of acegiak).
  • Minor cleanup

1.2.1

  • Add filter to support post kinds for Semantic Linkbacks plugin.
  • Add responses to feed content.

1.2.0

  • Change to store meta using WordPress Data proposal.
  • Display functionality broken into individual pieces to make it easier to customize and edit
  • Multi-reply support in the data structure/display but not in entry

1.1.1

  • Adds theme support and removes embed in content option

1.1.0

  • Added new kinds - listen, watch, check-in, play at the suggestion of acegiak.
  • Adds support for passive kinds.
  • Some code cleanup and commenting.
  • Start of add_theme_support function. This will replace the setting to embed in content in a future version.

1.0.2

  • Bug fixes

1.0.1

  • Update Readme to better describe

1.0

  • Now in the WordPress repository

0.3

  • Custom Code for Generating the Kind Select Box to Allow for Default Kind.
  • Defined constant POST_KIND_EXCLUDE to hide kinds from the selector

0.24

  • Added Grunt/SASS support to more easily control changes and support internationalization

0.23

  • Option to refresh the cache on each load added

0.22

  • Complete response html cached to post-meta and purged on post update.

0.21

  • Temporary fix for slow embed code in preparation for caching to reduce calls.
  • Removed defaultterms check to only run on settings page save or plugin activation instead of on each load.

0.2

  • Forked to Indieweb Post Kinds to reflect a change to act as an alternative to the post formats feature of WordPress.
  • Removed multikind option. Prior to this, the plugin functions mirrored those of tags. With the removal of multikind support, each post can only have one kind, and the functions will more closely mirror the Post Format.
  • Complete rewrite of the display functionality.

0.1.1

  • Option to Update Metadata Deliberately Commented Out.
  • Anyone who used the old plugin should backup their database before considering migration. The data should still be in the database regardless.

0.1.0

  • Revised settings page to use WordPress Settings API. Alert: This version switches to using an array for storage of response data for future development. To migrate your data, please backup your database and then check Migrate to new data structure on update on the options page.

0.0.6

  • Added in support for Favorite
  • fixed webmention support.

0.0.5

  • Set up embed handler for commonly linked sites.
  • Add options to turn on embeds for these sites.
  • Plugin is probably now feature complete enough for test deployment to a live site.

0.0.4

  • Add function to generate verbs(Like to Liked...) for a given kind.
  • Add Display functionality in Beta.
  • Include Genericons and Dashicons for icon options for the various kinds.
  • Add plugin option to add the response URL to the top or bottom of the content section.
  • Plugin near point at which can be deployed for basic use.

0.0.3

  • Location function removed and split into separate plugin called Simple Location.
  • Any check-in kind functionality will have this as a dependency.

0.0.2

  • Location meta box with HTML5 geolocation fill-in added. This allows posts to optionally have a location. This is as per the Wordpress Geodata specifications, so the Wordpress Android app will fill them in. There is no display functionality.
  • Various functions that mimic the built-in functions for other taxonomies were added, including filters to add additional behaviors. Default terms now prepopulate if no terms exist.

0.0.1

  • Registers a custom taxonomy
  • adds in code snippets to turn the post meta box from checkboxes to radio buttons
  • adds code to allow a custom permalink tag if needed.

indieweb-post-kinds's People

Contributors

acegiak avatar chrisaldrich avatar dependabot[bot] avatar diniscorreia avatar dshanske avatar florianbrinkmann avatar glueckpress avatar idallas avatar mcleodchris avatar miklb avatar paulrobertlloyd avatar pfefferle avatar prtksxna avatar rosemaryorchard avatar ruxton avatar tonzyl avatar tw2113 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

indieweb-post-kinds's Issues

Multikind post support

Posts that have multiple verbs/kinds are a common use case on several existing social networks and so for some people it is the most natural ux flow.

Cannot activate plugin

Installed it; when trying to activate:

Fatal error: Cannot redeclare kindstyle_load() (previously declared in .../wp-content/plugins/indieweb-post-kinds/indieweb-post-kinds.php:54) in .../wp-content/plugins/indieweb-post-kinds-master/indieweb-post-kinds.php on line 55

UI thoughts for Bookmark Kind

Need an extra space between "Name/Title" and "Site Name/Publication/Album" when there is no other intervening text:
missing space

Could also add a space between author picture and author name.

spaces

It would also be nice to have a space between the bookmark information and the summary blockquote.

Similarly, is there a way to remove the < hr > underneath if the body tag for the post is empty with no actual content?

I'm loving post kinds more and more...

Add Endpoints

Add a URL to allow directly posting Likes/Favorites/Reply/Repost/Bookmark etc directly to the post editor.

As a precursor and complement to possible full Micropub support.

Retrieve Running Time for listen and watch post kinds?

For sites like Soundcloud, ITunes, Netflix, youtube (if it's available) it would be nice to retrieve the "running time" of the music, show, film, etc. to display as a running time in the UI for listen, watch, and jam types (rather than the published/updated) for other post types.

Sample URLs
https://www.netflix.com/watch/60002321?trackId=14170060&tctx=1%2C1%2C711b329a-1ca8-4c14-b4d7-43f682113d2e-14372159
https://www.youtube.com/watch?v=FNr0JNwsLy8
https://soundcloud.com/user-154380542/how-to-build-an-autocracy-david-frum-the-atlantic-march-2017
https://open.spotify.com/track/3B3ZOmLGFlAjyBKHbgiblv
https://www.hulu.com/watch/403538
WordPress blueberry podcasts: http://www.eatthispodcast.com/long-live-the-carolina-african-runner/

When not scrape-able, allowing one to simply enter a 0:00:00 time and a finish time and letting it display the appropriate running time (without entering a date) would be useful for these types as well. (I'm presuming it requires dates to calculate currently as I haven't yet checked....)

Author Icon

The author icon is set to height/width using HTML,instead of caching one at the right small size.

Caching should be implemented, but possibly in another plugin.

Default Kind

There is no setting or function to establish a default kind that will be selected if nothing is.

Haven't cracked it yet.

Store MF2 Data as Arrays

The new Micropub changes storing certain mf2 properties, even if singular, as arrays, matching the MF2 JSON practice. I'm going to have to support this one way or another.

Issue with webmention target for type=reply

Hi David,

I've noticed that no one of my reply-to posts (on multiple wp-installations) ever got shown on the addressed pages as comments a while ago.
Currently I'm implementing the webmention.io api on an independent project and it seems to get more clear.

I've seen that the webmention target is set to the receiver author url, not the receiver note url. I'll attach the response on bottom of this comment.

Because I can not believe that I am the only one noticing this issue I may addressing this issue on the wrong side, but hopefully you can help me solving this issue (or addressing it right).

I am using Post Kinds Version 2.3.3 on WordPress 4.5.1.

Thank you for your attention.

The api-result:

{
        "source": "http://brands.mediaberger.com/brokendreams/webmentions-ftw/",
        "verified": true,
        "verified_date": "2016-05-02T00:44:27+00:00",
        "id": 330707,
        "data": {
            "author": {
                "name": "Amber",
                "url": "http://brands.mediaberger.com/brokendreams/author/amber/",
                "photo": "https://webmention.io/avatar/1.gravatar.com/89d2e3afda6a6ca1a3cdbd986d666e7302326ddadf0f4df6040f7a170ab12afa.jpeg"
            },
            "url": "http://brands.mediaberger.com/brokendreams/webmentions-ftw/",
            "name": "Webmentions #ftw",
            "content": "<a class=\"p-name u-url\" href=\"http://indieberger.mediaberger.com/note/receive-webmentions-here--11/\">note</a> by <a class=\"h-card p-author\" href=\"http://indieberger.mediaberger.com/\"><img alt=\"Ari Rosenberger\" class=\"u-photo\" height=\"32\" src=\"http://www.gravatar.com/avatar/4e051a772d471ab535b687d15ec35f83?s=50\" width=\"32\" />Ari Rosenberger</a><em>(indieberger.mediaberger.com)</em><p>Nice one. I hope this works for you.</p>\n",
            "published": "2016-05-02T02:44:21+00:00",
            "published_ts": 1462157061
        },
        "activity": {
            "type": "reply",
            "sentence": "Amber commented 'note by Ari Rosenberger(indieberger.mediaberger.com) Nice one. I hope this works...' on a post that linked to http://indieberger.mediaberger.com/",
            "sentence_html": "<a href=\"http://brands.mediaberger.com/brokendreams/author/amber/\">Amber</a> commented 'note by Ari Rosenberger(indieberger.mediaberger.com) Nice one. I hope this works...' on a post that linked to <a href=\"http://indieberger.mediaberger.com/\">http://indieberger.mediaberger.com/</a>"
        },
        "target": "http://indieberger.mediaberger.com/"
}

Spurious additional line showing on Pages (as opposed to Posts)

I'm still mostly relying on native WordPress Post Formats, though I'm leaning toward switching completely to post kinds (or figuring out how to straddle the two.) Though for the IndieWeb noobs, I'll mention what appears to be an odd conflict(?) between the two worlds.

Since the last one or two updates of Post-Kinds, there's a snippet of code somewhere that's adding an additional grey bar between the title and the content on them, specifically in WordPress "Pages", which probably shouldn't be happening as the native theme is more likely than not handling that output. See picture below:

post kinds

Deactivating Post-Kinds removes the additional bar <hr> (?), so it's definitely coming from code within the plugin. It appears to me to be hiding within
<div class="e-content"><div class="h-cite response "></div><div class="entry-meta">

The line doesn't appear to show up on blog posts marked as "article", "notes" or "photos", but does show up (with the appropriate icon) for posts marked as bookmark, favorite, like, listen, play, read, etc. (which is what I and others would presumably expect) Ex: http://boffosocko.com/2015/11/20/the-information-theory-of-life-quanta-magazine/

As most wouldn't expect it to show up on Pages, you might consider removing it from them in the next iteration.

In case it's necessary for troubleshooting purposes, I'm using Version 2.3.1 and in the settings I've not checked "Disable Post Formats".

General Suggestions for data and UI

First, I love some of the new changes in v2.2.0!

Here are some additional random thoughts for improving the layout and positioning of some of the final published look of particular posts, if they're not on your "roadmap":

Add an author URL field which could then wrap the data input into "Author/Artist Name" field. For those that want to use it, it makes for a nice way to promote the original author, particularly for properly crediting "bookmarked" items.

In the bookmark post type layout, the order and presentation of the data could be a bit more streamlined.
Eg: Bookmarked: (Name/Title) in/from (Site Name/Publication/Album) by (Author/Artist Name)
Currently it displays as "(Name/Title) on (Site Name/Publication/Album)" and "on" may be an awkward preposition for most cases, though it does work for Albums. Similarly the author name is currently just under the title of the post with no other data, which may be somewhat confusing. I note that some of the post formats are slightly different in how they display, but they could certainly be a bit more systematized/similar with appropriate grammar.

I haven't dug into it, but does the author photo URL have a preset size? One of my sample tests displayed a fairly large photo which was oversize compared to what I might have liked. Otherwise adding a sizing field(s) (height/width or percentage) to add to the image output would be useful for its ultimate display.

I love the idea of the featured image! I presume it will actually be output in the layout in some future release to make for more visually interesting posts?

Add option to disable CSS

Hi David,
it would be great if you add the option to disable css in the plugin's settings page. After your last change I was wondering, why all my post titles are hidden.. I'd also like to style post kinds like reply-to my own way. And even if I can disable it via hooks, it's just a cleaner way to have it in the settings. (Maybe I don't have access to the template code...)

Error Activating Plugin

I get the following error when I try and activate this plugin:

Fatal error: Cannot redeclare kindstyle_load() (previously declared in /var/sites/r/rossgoodman.com/public_html/wp-content/plugins/indieweb-taxonomy-master/indieweb-taxonomy.php:31) in /var/sites/r/rossgoodman.com/public_html/wp-content/plugins/indieweb-post-kinds/indieweb-post-kinds.php on line 73

Add Option to Disable Post Formats

While Post Kinds and Formats can co-exist...it is better to not use both.

Also, add function to read format and set kind when there is an equivalency...

Repost displays the_title

It's likely an oversight, but reposts are currently displaying the_title (similar to the "article" kind). I suspect that like many other post kinds (eg. note) you probably meant to strip the title out of the display and inject it using "title" in Post Properties.

Defaulting to 'note' causes title to vanish when importing

If Post Kinds is installed when importing old posts, it sets the kind to note on creation, because of the defaults. This leads to the titles being hidden.

There are a combination of things going awry here - if a post kind wasn't set, leaving it unset is probably a good idea. I'm not sure which default is going wrong, whether it is micropub_set_kind()

public static function micropub_set_kind( $post_id ) {

Which doesn't check if title and content are equal per post-kinds (otherwise should be article, not note)

or the default choice of 'note' bieng written back.

To fix this I had to do

DELETE FROM `wp_term_relationships` WHERE `wp_term_relationships`.`term_taxonomy_id` = 37

Support Post Kind: Recipe

I've been playing around with food recipes lately and thought this might be another worthwhile/relatively common post type (https://indieweb.org/recipe) to add/have in the future along with food and drink.

I'll also note that WordPress (via JetPack) just updated their recipe shortcode: https://en.support.wordpress.com/recipes/ which
gives some additional front end support (as well as mf1 mark up for hrecipe, though I'll see what I can do to inject mf2 as well)

Potential icons:
Fontawesome: <i class="fa fa-cutlery" aria-hidden="true">
Genericon: ??

Use case example: http://boffosocko.com/2016/07/17/chili-prep-for-dinner-tonight/

Change over Kind_Meta to Something More Like JF2

PHP-Comments uses the below format

$result = array( 'type' => 'reply', 'author' => array( 'name' => 'Aaron Parecki', 'photo' => 'http://aaronparecki.com/images/aaronpk.png', 'url' => 'http://aaronparecki.com/' ), 'published' => '2014-02-16T18:48:17-0800', 'name' => 'Example Note', 'text' => 'this text is displayed as the comment', 'url' => 'http://aaronparecki.com/post/1' )

JF2 returns a simplified mf2 output as well.

I want to explore the idea of making Kind_Meta, which was meant to abstract out storage, more a layer that accepts jf2 and saves as post meta or vice-versa.

UI: Duration doesn't make sense in Read post kind

When making a "Read" post in which data exists in the "time" tab for published dt and updated dt, the output displays more like one would anticipate with a music post type (or jam, listen, play, watch, travel) using start/end vocabulary instead and outputting a "Duration".

Duration may make sense if one were doing a start/end time for their reading, but then the scraper shouldn't be automatically pulling in the publish/update dates/times. Personally I'd prefer to let the publication time of my post indicate when the thing was read and have Post Kinds indicate the publication of the original piece I was reading.

Possibly better would be an if/then statement to differentiate types and for Read types outputting a date/time for the original publication and/or potentially an updated date/time if it exists.

At present, the issue is most common on New York Times posts for which the scraper pulls in the correct metadata.

Example: http://boffosocko.com/2016/11/14/chris-aldrich-is-reading-facebook-restores-iconic-vietnam-war-photo-it-censored-for-nudity/
duration

For a small portion of IndieWeb sites, the scraper is returning data in these fields that are identical for both the published and updated fields which returns an odd duration result as well. (See: http://boffosocko.com/2016/11/11/chris-aldrich-is-reading-fragmentions-for-poets/) Perhaps if the date/time in both fields are identical, there could be some error checking to prevent a spurious output since published shouldn't equal updated.

Stylable CSS classes

Is it me being crazy, or are all the classes on the data here just semantic?

For front end developers, it would be nice if you included some plugin-wide classes (or ids) to allow easier styling of individual post kinds, particularly since we all know styling on microformats is a bad idea... ;)

Maybe pk-like, pk-bookmark, etc. for the "titles" and a class on the blockquote as well? It seems odd to me that the title is smaller than my default blockquote font, but there isn't anything non-semantic to style on...

css classes

Separating Out Link Preview Generation into Separate Library

I just separated the Link Preview code...which parses a URL and tries to determine information about it, into its own class. I'm thinking of expanding on it with more functionality. Using this issue to note my thoughts and get other input.

consider markup for reposts that preserves HTML

currently Post Kinds marks up reposts with u-repost-of h-cite > p-content which means that HTML inside the repost body is flattened and converted to plain-text (i.e. styling, images, etc. are stripped).

my preference is to mark up reposts like h-entry > e-content > u-repost-of h-cite > e-content. This gives you a couple nice properties.

  1. without understanding the semantics of reposts, consumers will automatically get something reasonable (the content of the outer h-entry > e-content)
  2. if a parser does understand the semantics of reposts, all the data is there -- the original post's author, url, and content; and the reposting author, url, etc.

Improved Kind Selector

The current taxonomy selector is a third-party coded one designed for a generic instance. One custom written for the plugin should be added

Problem with Previewing Post

After adding data to "Post Properties" and attempting to Preview the post, I get the following error messages:

Warning: array_key_exists(): The first argument should be either a string or an integer in htdocs/folder/wp-content/plugins/indieweb-post-kinds/includes/class-kind-meta.php on line 197

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/folder/wp-content/plugins/indieweb-post-kinds/includes/class-kind-meta.php:197) in /htdocs/folder/wp-includes/pluggable.php on line 1228

Occasionally I see issues like this from post-kinds when saving a draft or publishing as well. It isn't a fatal error and the system seems to be saving the data properly and the final post always ultimately seems fine, but it would/could be daunting for new users.

Currently using the most recent WP.org Version 2.3.3 of the plugin.

IndieWeb and Android Mobile

IndieWeb and Android Mobile

@dshanske I remember you mentioning it briefly the other day and then saw something more specific this morning: http://indiewebcamp.com/irc/2016-05-03/line/1462285944410

Have you hacked around with either Bookmarklet Free or URL Forwarder apps from the Google Play store? They’re mentioned in the following two places:
https://snarfed.org/easy-indieweb-interactions-on-android
http://stream.boffosocko.com/2016/sharing-from-the-indieweb-on-mobile-android-with-apps-and

I’d gotten URL Forwarder set up and configured to make mobile sharing for my WithKnown install to make bookmarking, sharing, reposting, and a few other functionalities work incredibly quickly and well. I’ve put off doing so on WP since I have some other back-end dependencies that need tweaking so that I don’t create redundant loops with some of my other configuration. With any luck one or the other will get you pretty far without having a full micropub application.

With these you can use Android’s ubiquitous sharing icon and share to one or the other of the apps which will do the URL scraping to be able to do some of the posting types you want. Depending on the output, you may need one or two additional tweaks, but it’ll give you a reasonable template for a workflow. I’m sure some further url parameters and integration could be put in to auto checking the correct post kind and thereby making your posts fully indieweb compatible on WP. Adding Indieweb Press This https://github.com/pfefferle/wordpress-indieweb-press-this/ functionality for bookmark, share, watching, listening, et al. would complete a larger cycle of functionality.

Then, I’m sure there’s the additional functionality of API calls to Twitter/Facebook/etc. to implement the actual retweet/like on the native platform, but that could be handled later/separately (though Bridgy Publish might be able to handle this? I seem to remember a mention of it in the bookmarklet set up.)

Finally, if “Post Properties” could import the same URL and scrape the metadata, the entire process would be almost too simple and not need a “traditional” mobile app at all.

For URL Forwarder the base settings should be:
Reply: http://YOURSITENAME.com/wp-admin/press-this.php?v=8&type=reply&u=@url
Like: http://YOURSITENAME.com/wp-admin/press-this.php?v=8&type=like&u=@url
Repost: http://YOURSITENAME.com/wp-admin/press-this.php?v=8&type=repost&u=@url

Hopefully this gets you a few steps further on android mobile without a huge amount of work…

Dashboard Widget

Suggestion has been made to add a dashboard quickpress like widget to the plugin.

Preview

Suggestion has been made to allow previewing the display before publishing.

"Summary" field not maintaining data

The field "Summary" under the "Citation" tab in prior versions was constantly self-updating with details of the original website/URL and not allowing the editor to make permanent changes which then propagate to their site.

Under the changes in v2.2.0 it seems like one can finally make changes to this field manually, but after saving/publishing, the field seems to self-delete and any future updates to the post result in the "Summary" text disappearing from the final post (at least from my tests with bookmark post types.)

Taxonomy Term Meta

Wondering about whether there is anything worth storing in term meta for the taxonomy Kinds. Opened this to remind myself of the question.

Differentiated presentation

Version 2.3.0 releases a new generic presentation for Post Kinds. The next step is custom presentations for each kind. Opening this issue to capture ideas on customizing by type.

Issues with Rich Embeds

With the oembed change in 4.4, the behavior is not as consistent as it was when this setting is enabled.

Pages get default kind

Any pages in my site are currently being set with the default kind (note).

Which means that I'm losing page titles on my pages. Seeing as how kinds aren't even available to set on pages, can we either:

  • Stop outputting kinds on pages; or
  • Automatically set pages to 'article' kind; or
  • Have a setting for the default kind for pages

Example of a page being marked up as a note - https://ignite.digitalignition.net/code/master-link-wordpress-plugin/

Version 24.0 not acting as a reply

Hi @dshanske.

I just updated to the latest version. When I paste the URL in the 'Post Properties' and hit retrieve I now get a dialog box with "davidjohnmead.com says:" and an OK button.

screenshot 2016-07-22 22 11 03

I click OK. Bridgy Publish is set to Twitter and Post Kinds is set to reply. When I publish the tweet doesn't appear in my timeline at all, and the post doesn't show the content of what I'm replying to, but does show the new icon.

screenshot 2016-07-22 22 21 19

Any ideas?

Tag Support

Post Kinds currently supports tag as a kind. But does not have any specific settings for its use.

RSVP

RSVP requires special information and markup not currently enabled. It must be done manually in the Post Editor.

Allow icons to be changed

Currently there isn't any way to change the icons being generated by kind_icon. It would be nice if there was a way to change them without needing to replace files or hack on the code.

I'll probably take a crack at this when I have a chance, but I wanted to make the suggestion in case others have thoughts on how it should be accomplished.

Other post properties appear in e-content and are parsed by other sites, plugins incorrectly.

When replying to another WordPress site (and other platforms as well) the webmention sends the additional meta-data from Post Kinds' Post Properties in the webmention.

When this metadata appears on the originating site, it gives the necessary detail and context for the reply which follows it.

However, when the webmention appears as a comment on the receiving site(s), the additional metadata is extraneous. The receiving site places the reply into its comment stream (which already provides the context that the webmention is a reply!) Additionally, because the reply icon/svg isn't sent/displayed it removes a bit of the added context and makes replies even odder looking.

If there's a way to remove the metadata from the sent webmention on replies, this may be the best solution. In other post types, this may not be the case, for if you remove this data (for a bookmark as an example), then the URL wouldn't be included and there would be no webmention at all.

Example:
post kind reply

Original reply post: http://boffosocko.com/2016/08/26/reply-to-scott-kingery-about-wallabag-and-reading/
Receiving endpoint: http://techlifeweb.com/14892-2/#comment-120995
Additional receiving endpoint: http://boffosocko.com/2016/08/22/a-new-reading-post-type-for-bookmarking-and-reading-workflow/#comment-31841

Additional information/thoughts/considerations:
Recall though that on POSSE copies of the original, because the metadata from Post Kinds isn't "technically" part of the_body (right?), many POSSE methods (except manual methods) won't pick up any of these data. In some cases, what is in Post Kinds' Post Properties may be ALL of the data which was meant to be POSSEd (example: bookmarks, likes, favorites, read, etc.)

Ideally, having things set up to support the largest flow of POSSE methods (Jepack, SNAP, et al.) in a simple manner would be best.

Post Editor

Based on Post Formats UI, add functionality to display/hide elements based on kind selected.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.