Where Authors & Readers find each other

The Fantastic (Group) of Lord Matt, Super Geek


Considerations for adding an AMA feature

October 23, 2025 in projects-and-ideas by Matthew Brown

My initial question was “What is the best way to add some AMA (ask me anything) feature (like on Tumblr) to one or more of my websites?” I’d thought about it for all of ten seconds before I realised that “best” was entirely subjective.

If you already know what we are talking about, feel free to skip to the ideas section. For the rest of us, let me briefly introduce the concept to you.

What is this AMA thing, then?

On the hybrid of social media and blogging that is Tumblr, users can enable the option to ask questions. When the user replies to the question and the answer appear together as a single post.

Questions can be anonymous, answered privately (if not anon) or answered as a public post.

Why would you want something like that?

An AMA (ask me anything) can be a great way to build a sense of community with your readers. For example, an author with an AMA can interact with fans but in their own time while creating content that the wider community will probably enjoy looking at. While yes, this is far from common, I think more artists of words and of images should do this more often.

Even if community building (or platform building if you want to call it that) cn be a goal, AMAs can just be a fun way to stay connected. In that regard, it feels like a most IndieWeb idea (even if it probably isn’t). (I like IndieWeb stuff BTW)

I think an AMA would be fun. I want to add the feature somewhere.

Where would you use this?

I see five use cases for my own use.

  1. Author Buzz UK user blogs (like this one)
  2. isBrill/isPants as an optional feature
  3. My social node
  4. My music blog
  5. My health blog

Where would you use this?

Authors and other creatives wanting to build a rapport with readers should consider such a feature. The easy answer is to start a tumble blog, but of course, I wouldn’t be your favourite old geek with a cop-out answer like that.

Chatty folks with IndieWeb personal websites featuring a blog or forum might be a good fit.

Anyone who likes answering random questions, I guess.

What about you? Pop into my comments and leave your use case.

Ideas for AMAs, depending on what exactly you want

Now we come to the brainstorming part. I’ve divided this up into potential solutions to explore the relative strengths and weaknesses of each approach along with how copyable the idea is. After all, if I’m having fun with AMAs, I bet others would too.

AMA built on existing IndieWeb stuff like WebMention

If you are already set up for WebMention, this should be dead simple. Make a page which accepts mentions, call it Ask Me Anything. Let people mention said page when they want to post questions to you.

The good

  • Easy to set up
  • No new code needed
  • Will probably work just fine
  • Very IndieWeb
  • Super easy to copy
  • Low effort

The bad

  • Not private
  • Not anonymous
  • Not inclusive for passing average citizens
  • A bit of a faff to maintain
  • No private replies

Conclusion on WebMention

If I am honest, I imagine an AMA built on WebMention will end up like the guestbook pages I have done this with – rarely used by humans but regularly attacked by spam bots. WebMention is great, but I do not think it is the tool for this task.

I would be delighted to be proven wrong if someone wants to implement AMAs this way.

AMA via ActivityPub (Mastodon inclusion mode)

The next approach I considered was to lean on ActivityPub. After all, most of my websites implement it (mostly via a WordPress plugin). For me, this would take the same approach – slap up an ActivityPub-enabled page and call it AMA.

The good

  • Compatible with the WebMention approach
  • A bit more inclusive
  • Easy enough to set up
  • No new code needed
  • Easy to copy
  • Low effort
  • Use the WP Reply block to display the question

The bad

  • Not (entirely) private
  • Not (entirely) anonymous
  • Only inclusive for Mastodon ActivityPub users
  • Still a bit of a faff to maintain
  • Not really what ActivityPub is for
  • Quickly lost in the timeline’s history
  • No private replies (sorta)

Conclusion on ActivityPub

With the plugin for ActivityPub I use on my WordPress blogs, this would probably be the least effort approach that would kind of display the way I would want it to. Mostly. It would be close enough that I could live with it.

However, a strong AMA launch could start with lots of questions as ActivityPub replies, but I can picture it tapering off in fairly short order. For most users, this will be a single toot in an avalanche of content. Thus, soon lost and forgotten.

Just use a forum or group for an AMA

This blog is part of Author Buzz UK (for now). I could just create a group with an AMA forum or add an AMA thread to an appropriate forum or group. That’s how the Reddit AMA works.

The good

  • Low effort
  • Easy to replicate
  • Can be taken to PMs for privacy
  • Sort of what a forum is for
  • Easy for passing average citizens to understand

The bad

  • Forces users to create an account
  • A massive faff to turn into blog posts
  • Not private
  • Not anonymous
  • Looks dead until sufficient uptake
  • A lot to set up without an existing forum in place

Conclusions of using a forum

This approach could be good for some people. If there is a forum or community that is okay with AMAs, you could set up shop there and just copy and paste back to your blog or personal website. This is mostly in the spirit of IndieWeb, I guess.

My problem with this is that I’m taking visitors off-site (sort of) and I can’t replicate this on sites like my social node, my music blog, isBrill, etc. as none of them have a forum. Also, this is not really in the spirit of the Tumblr feature I want to implement. It is more of the meme, “we have AMAs at home…”

Just use an AMA WordPress plugin

In this section, I’m going to take a look at the plugins and/or themes that implement AMA for WordPress specifically. All other platforms will have to roll their own.

Let’s see what I can find.

Spoiler: I found a lot of listicles about plugins to run a full-on Q&A forum/community. Not features to allow people to post a paragraph for you, the author, to reply to.

The also ran that was ask-me-anything-anonymously

A lot of blog posts (including WP Beginner) recommend this plugin. Except it was last updated about a year ago and has been closed due to security concerns (or WP Drama, one of the two).

The source code is on GitHub, though.

Conclusion: Nope.

CM Answers

CM Answers is a QnA plugin. It has a free and a pro version. Like many plugins it seems to take the kitchen sink approach. If you want to run something a bit like Stack Overflow or Quora, I’m sure this is fine. For an AMA feature, this is not the tool for the job.

Conclusion: A cannon to swat a fly

OMG WTF?

Searching WordPress.org was a hot mess of unrelated plugins, forums, and things no sane person should add to the WordPress install. Seriously, WTF?

Conclusions on “just use a plugin”

After a bunch of searching, I came up dry for a plugin that just implements “asks”. What I did find that seemed to be what one might want were thinly veiled adverts for AMA sites, code that should never be used in production, and a lot of irrelevant search results.

I have zero recommendations I am willing to make here.

Well, I guess we have to roll our own or something

I’ve reflected on a few ways to code this up. Let’s start with the least effort idea.

Just a form that creates a draft post

My first thought was that the least effort would be a form on the front end that anyone can fill out. The back end then does a few basic checks and puts the sanitised text inside a quote block in a draft post.

The good

  • Not all that much work
  • Would work as intended
  • Easy to copy

The bad

  • Spam would be a nightmare
  • Infrequency asks could get lost in the drafts section forever
  • Open to abuse
  • So much abuse potential
  • Dear lord, the possible abuse

Conclusions on just adding a form

On reflection, this is a terrible idea. There are many other ways to do this and almost all of them are better.

Okay, let’s spec this thing out properly then

It was at this stage of the rabbit hole that I thought to actually draft out what exactly it is I am looking for. I even went and found a quote to go with my work.

Write down this vision and clearly inscribe it on tablets, so that a herald may run with it.

Bible, Habakkuk 2:2b

I do like a good quote to go with things.

The vision: What I want this to be

Must haves

  • A form people can submit “asks” via
  • Strong anti-spam and abuse mitigation
  • An admin page with all pending asks ready to be turned into “ask posts”
  • Track which asks have answers (posts)
  • Asks are private until published in a post

Nice to haves

  • Option to private reply
  • Optional anonymous asks
  • Obvious link back to asker
  • Can work with WebMention
  • Can work with ActivityPub
  • Uses microformats

Running with it: How to make this happen

The way I see it, there are three possible approaches: (1) A custom post type, (2) a custom database table, (3) a third option that we already passed over.

A custom post type would store a lot of cruft in the database and come with a whole host of security and privacy problems. Posts are designed to be looked at so a custom type that is entirely hidden, while doable, is not really in the spirit of what these are made for. Also, it would be a lot of work, and I am lazy.

A custom database table solves a lot of problems. Each ask has a row to itself, and we could run the text through the input validation and sanitisation built into WordPress. Tracking which post contains the ask would be as simple as adding a field for post ID. Not the worst idea. Certainly workable.

The idea we walked right by is to just use a single page called AMA. Hear me out, now. Think about the spec I have just listed. Does that remind you of anything that already exists? It sounds a heck of a lot like the user comments feature. A plugin that just nominates a page and tracks its comments would benefit from WebMention, ActivityPub, and spam filtration as they are already built in (assuming you also use those plugins like I do).

Okay, smarty pants, how do we do that?

The page itself would have to have a custom template to skip showing comments. Plus or minus a few mitigations to stop them from showing up on “recent comments”. Other than that, and the post tracking, this is basically just native comments that don’t get published.

WordPress comments can have a comment type applied to them. If we set a hook that checks the page ID, we can modify incoming comments for that page to take the “ask” type. Then, I imagine there is a filter we can hook to remove that comment type from anything other things do with comments (like display the most recent ones).

Comment meta is a thing. In there, we can store any extra data such as which post contains the answer, if the ask has been closed, privately replied to (via email), or whatever.

Pair all that up with an admin page and a site can take asks. Go a step further, and you could probably make that a per-user ask. That’s only one more comment metadata point – user who is being asked. The list filtering for active users might not be screamingly fast but this is low enough use that this should not be a problem.

I’d want the admin area page to have a button to turn the ask into a post (a simple enough automated copy and paste into a quote).

In theory, you can then take AMAs via fediverse, WebMention, or onsite. You can use the existing tools to decide who gets to “comment”.

Could this work?

Theory is a great place; everything works there. In theory, this is a great idea. Use comments as asks. An idea that could be copied to most any CMS or software. My question now is, would this work?

Are there any gotchas waiting around the corner that I’d want to know about?

Please do criticise me on this as much as you feel is necessary.

Where does this leave us?

In this post, I looked at a number of ways to implement the AMA “asks” feature of Tumblr. I skipped over WebMentions and similar ideas as not going to work, but came all the way back to, with a little effort, maybe they could.

What I do know is that WordPress does not have a plugin that I could find to implement this. A modified page template could be a good solution. I can see this needing a custom template per theme to look really nice, but an out-of-the-box page with some custom CSS would probably look okay.

By reusing existing structures, there would be less work and more features. I’m not going to try coding this myself just yet. Tiredness is kicking my arse right now. I need to have my head on and brain working to do this myself.

I’d love it if someone else took my idea and made it a thing, but I’ve been around long enough to know that I’ll probably have to do it myself.

TL;DR: Anything that takes comments could probably be made to take asks with a little faffing about.

Thoughts?

I want to know what you think. I thrive on interactions – comments make me happy. In this case, I have a bunch of questions, but any thoughts in your head – please share with me.

  • Are you familiar with Tumblr’s asks?
  • Would you want an AMA on your personal blog or website?
  • Of the things I have explored, which seems to you like a good fit for adding asks?
  • Should I (or some cool geek) make this?
  • Do you wanna take a crack at it yourself?
  • What have I missed?
  • Is there anything I have overlooked?

Whatever you have to say – let me know. Please reply, mention, or comment – I want to hear from you. (Also share or boost if you are feeling particularly kind.)

Python: Objects that change (for story reasons)

October 17, 2025 in coding-and-development by Matthew Brown

For my visual novel project, I wanted things that have images and tags, but can mutate or change as they gain more.

This is the code I wrote: (Fediverse readers might find it looks nicer on the original page)

class item:
    def __init__(self, name):
        self.name = name
        self.tags = ['exists','unchanged']
        
    def setImage(self,image):
        self.image = image
        
    def aquire(self, tag):
        self.tags.append(tag)
        # look changerer list and trigger if needed
        for changer in self.changers:
            if changer[0]==tag:
                dothis = changer[1]
                for adding in dothis.add_tags:
                    self.tags.append(adding)
                for taking in dothis.remove_tags:
                    self.tags.remove(taking)
                if self.name != '':
                    self.name = dothis.name
                if self.image != '':
                    self.image = dothis.image
            #endif
        #endfor
                
    def change_on_aquire(self, trigger_tag, changer):
        tup_store = (trigger_tag,changer)
        self.changers.append(tup_store)
        
        
class changer:
    def __init__(self, name, image):
        self.name = name
        self.image = image
        self.add_tags = ['changed']
        self.remove_tags = ['unchanged']
        
    def addTag(self, tag):
        self.add_tags.append(tag)
        
    def removeTag(self, tag):
        self.remove_tags.append(tag)

I’m far from a seasoned Python game dev, which is why I am open to some feedback. Please feel free to review my code, tell me what I did wrong, and educate me on better ways to do it.

You can use this code yourself if you leave a comment saying where you got it, and don’t blame me if it doesn’t work. This is a work in progress.

What it does (or should do)

The first class is a thing that takes an image, a name, and some tags. It can receive new tags via the acquire method, where it checks for changers and applies them.

Changers – the second class – takes a name, an image, and two sets of tags (to remove and to add).

For example, we have a sword item with the “sharp” and “normal” tags. It acquires the “magic” tag. Following the changer, it renames to “enchanted sword”, drops the “normal” tag and gains the “magic” and “upgraded” tags. The picture changes from a boring sword to a nice glowing sword.

Items and their changers will be defined in the code – probably in a file called alltheitems.py. This way, I can change the defined values and triggers as needed.

I usually have to look up how Python handles arrays, as it has a bunch of ways of doing that. I think I have chosen wisely, but feel free to tell me how I have been a Class II Silly Billy.

How I charted pain over time on my WordPress blog

September 25, 2025 in coding-and-development by Matthew Brown

If you are one of the five or so people who read my weight loss and pain management blog, you may know I added charts. This is how I did that.

FYI: Fediverse readers, the code is unlikely to look all that nice on Mastodon, etc.. Choose “view original page” for an improved visual reading experience if the ugly code formatting gets too much.

Background

I maintain a blog at mattsbigfatarse.com. One of the things I started doing was recording some qualitative and quantitative health numbers each time I posted.

This resulted in posts that look (on the blog itself) a bit like this:

screenshot of blog post with a large list of various data about me.

When I started, I used self-input metadata and relied on remembering what all the fields are called. Later, I switched to ACF to get a nicer UI on it. This would have some technical issues for me later.

The page

One of the things WordPress does is search through a hierarchy of templates. This allows me to target a template to a single post ID. In my case, a page (a type of post). I use a custom child-theme so I can make arbitrary changes.

A child theme is just a theme that says, “any missing files, check the parent theme”. They exist so you can customise a theme without editing it.

My file was, therefore, in the form, page-nnnn.php where nnnn is the ID of the page.

The data

All this data lives in the post_meta table.

You might also guess there is a fair amount of-then-else going on to filter what metadata shows up in the box. You would be correct. For example, I can see another field that is showing that I should remove. A bool I use for display logic.

An additional problem comes from where I post the data. I have a second custom post type that never displays so I can post data without making a blog post. Fortunately, that too goes into the post_meta table. Unfortunately, that means custom SQL.

I’ve listed each step in the order that explains the next step. In reality, this was an iterative process with a fair amount of head scratching and wondering why things were off by one or otherwise weirdly borked.

The code: Getting the table names

The first issue was to get the exact table names. This is not something you should hard-code, as WordPress handles table prefixes behind the scenes.

This is how I did that:

global $wpdb;

$got_meta_table = $wpdb->prefix . "postmeta";
$got_post_table = $wpdb->prefix . "posts";

This gets me access to the WordPress database object.

The code: The SQL

To make the charts work, I was going to have to give a JavaScript library a bunch of quite specifically formatted data. I needed year, month, and pain level. The date data is in the posts table, while the number is in the meta table for the post. And the naming was not consistent

Here is the SQL stuff I landed on (after a few changes).

$matts_chart_query='SELECT 
YEAR(`'.$got_post_table.'`.`post_date`) AS `Y`, 
MONTH(`'.$got_post_table.'`.`post_date`) AS `M`, 
AVG(`'.$got_meta_table.'`.`meta_value`) as `av_value`
FROM `'.$got_meta_table.'` INNER JOIN `'.$got_post_table.'` 
ON `'.$got_meta_table.'`.`post_id`=`'.$got_post_table.'`.`ID` 
WHERE (`meta_key`="pain_level" OR `meta_key`="Pain Level") 
GROUP BY `Y`,`M`
ORDER BY `'.$got_post_table.'`.`post_date` ASC;';

$the_chart_data = $wpdb->get_results( $matts_chart_query );

The SQL explained

Line one is obvious; I’m telling the database to select data.

Lines two and three are getting date info from the post table. I let SQL do a year transform and then a month transform, and give the new invented fields one-letter names. This is because I did not plan on sharing my one-and-done code.

The next line (4) performs an average and turns that into a weirdly named imaginary field because I’m inconsistent like that and wrote those in different parses through the iterative process.

Next (5,6) is a two-line INNER JOIN. This tells the database to act like the two tables are part of the same table. The join is “inner” because I only want rows where there is a record in both tables with the same post ID.

To limit the data to useful stuff only, I use (7) a WHERE clause. In this case, I need the meta handle for both versions of the way I stored data.

The GROUP BY clause tells the database that I want the average to be performed for each Y and M (each month effectively).

Then I pick a useful order (the order the data goes into the chart) and hit send.

The code: Fussy JavaScript

I had the data, but a big fat gotcha was coming up.

In JavaScript, days are stored as 1 to 31, years are stored pretty much as years 2025 would be this year. Months, for no good reason, are stored as 0 to 11.

Why?

Just why?

After a lot of head scratching, I came up with a loop that puts my output data

              <?php 
    
              foreach($the_chart_data as $row){
                  echo ", \n"," [ new Date(" , $row->Y, ',' , ($row->M)-1 , ",1),     " , $row->av_value , " ]";
              }
              
              ?>

Notice how I have to do a minus one on the month value. It took forever to figure that little nugget out. The original version of this is more commented-out code (that almost worked) than used code by a factor of three. I kept thinking I messed something up when, in reality, JavaScript has an “undocumented feature” where only months are array indexes.

Do that all again

Then I did it all again.

This time I used the MAX function to get the biggest number for the month. This is so I can make a second chart with the worst pain over time.

Like this:

pain over time chart with polynomial fit line

Paging Doctor Google

I figure that, as my data is already mostly public, there was no harm in making Google generate my charts. That little loop outputting the data was so I could feed it into the Google chart API.

I had Google fit a 3-degree polynomial (the wavy line) as that seemed to follow the fluctuating data better than a flat fit line.

A theme gotcha

I was not quite done yet. The page was breaking on my theme something nasty.

The theme does a clever thing with code where it changes out some classes to give full width and page with sidebars. It took me longer than I care to admit to figure out that I did not have some HTML error that was breaking the page.

I fixed it with a little filter that sets up just as the custom page theme file is about to run.

function matt_added_body_class($classes) {
    foreach($classes as $cl=>$ss){
        if($ss=='gridview-layout-s1-c-s2'){
            unset($classes[$cl]);
        }
    }
    $classes[] = 'gridview-layout-full-width';
    return $classes;
}
add_filter('body_class', 'matt_added_body_class',PHP_INT_MAX);

I used a priority of PHP_INT_MAX to be certain that my filter ran last because the theme was going to try and have a say about which classes it was using. For this specific file, that opinion was wrong.

And now we are done?

While I was done charting my qualitative pain (on a scale of 0 to 10, where 10 is the worst pain ever and 0 is none at all), I went on to chart a few other numbers. I have some more I’d like to chart. Most will require some workaround for my inconsistency with how I recorded things.

My current charts are:

The only real difference is the “meta_key” value I am looking up and the chart labels.

Could I have done it better?

A quick question to my fellow makers of code – do you have any criticisms of my code? Is there a more efficient way to do that?

Before anyone asks, there is caching going on; I’m not hitting the database every page load.

Over to everyone else

What do you think? How helpful would you find it to chart your health over time? If, for example, I made a site where you could privately do that, would that be of interest to you?

Other thoughts, feelings, comments, ideas, suggestions, or damning faint praise, please comment below or reply/mention as you see fit.

Okay, “make what you need” might be good for the IndieWeb’s future after all

August 11, 2025 in replying-to-things by Matthew Brown

I recently made the case that Make what you need might be all wrong for the IndieWeb’s future and then theAdhocracy and made some strong counterpoints. I’d like to explore those counterpoints.

Just solve the problem

Make what you need can be stressed as make what you need. Just solve the problem or requirement you have and nothing more.

don’t try to make an all-singing, all-dancing tool that aims to do everything for everyone: solve the problem you have.

https://indieweb.social/@theadhocracy/115000006937409982

That’s totally fair. A good thing that does the one task is better than an okay thing that does what you need and a bunch of stuff you could live without.

A little Darwinism in the code space is a good thing

Survival of the best solutions in a space is almost certainly good for all of us. Indeed, as theAdhocracy points out, even more competition and services would be a good thing.

The community is, after all, working towards that.

I honestly had not considered this point at all. Sure, we might get a bunch of square wheels, but we will also get rounder wheels and even some good suspension and tires.

I still have doubts about WebMention spam

I’ve never seen it, but have encountered people claiming that WebMention spam was the cause for them giving up on the idea. I still suspect this was due to a weak implementation that might not have taken the “confirm link” step. I can’t know that for sure, but it is still my guess.

Conclusion

The comments from theAdhocracy contained a lot of truth and were a kind and gentle correction to my not-fully-informed opinion.

Perhaps “Make what you need” is not such a bad idea after all.

What I do know for certain is that I was on the receiving end of a great rebuttal. Something that hurts the ego a little but causes growth, increased understanding, and exposure to new ideas. I have benefited from the new ideas I encountered today.

All the WebMention libraries and plugins I could find

August 10, 2025 in the-internet by Matthew Brown

I’m a huge fan of WebMention. You might have noticed how often I go on and on and on about it. WebMEntion is the future of interactive communication. Or, at least, I think so.

As I have sort of made a huge fuss about how rolling your own might not be a good idea, I have compiled all of the WebMention implementations that are ready to use.

First up, the WebMention protocol specs.

PHP

Javascript

Rust

Go

Ruby

Python

Elixir

Third party

Eleventy

Did I get them all?

I searched a number of places and examined a bunch of other people’s lists. So, at the very least, I think I must have found the lion’s share. If I missed a library, some code, or a plugin – especially if the language is not listed – please don’t hesitate to reply, comment, or webmention (the classy way) to let me know.

I will update with any I missed, or even release a new edition if this list changes that much.

Is there a WebMention plugin or library for your favourite content platform?

Blog Activity