Comfort Zone Adjacent

Back in August I wrote about a plugin that I had created for the Stream Deck that was to help me with my pre-stream activities as I was terrible at remembering things, or just assuming things were still working since last time.

Just over two weeks ago someone dropped me a DM as they were interested in my plugin after reading my blog post but I had never released it into the wild. So I decided that I would dust it off again and get it into a releasable state for 2023, most likely just building a webpage to explain it and host the file.

Functionality

The core functionality of the plugin is very basic in fact is uses the baked in toggle nature of the Stream deck buttons, there was an underlying flaw that I wanted to address.
The state of the buttons persisted between uses, so if you Toggled on that you had published a tweet, the next time you opened the deck it would still be lit up.
For a Preflight Checklist that is going to be reset each use, that wasn’t ideal.

So I set about redesigning how the plugin worked, forcing it to toggle off any button on their first load, but ensuring that it didn’t reset when navigating between page on the stream deck.

Success, WOO.

But actually the ability to keep a button lit up was actually useful, if you were using the Plugin to track achievements or seasonal goals. So I set about adding the option to Persist a Buttons’ state between restarts of the stream deck.

This part took me the longest as the Property Window was always behaving in ways I didn’t expect. But after quite a bit of tinkering and help via BarRaiders PI Toolkit I got everything working as expected.

Comfort Zone

So once I got the plugin into a working state, I then started reading over the requirements for applying to have the plugin listed on the Stream Deck Plugin Store.
I wasn’t that far away from being able to submit the plugin, so I set about ensuring that everything was correct, then when I shared it publicly I also submitted it for the store too.

On the 24th of Feb I got confirmation that it was on the Plugin Store under Productivity, If this wasn’t terrifying enough people were actually downloading it.

Currently there are 487 downloads in the store, I’m hoping people that have grabbed it find good uses for it.

If you’d like to grab it, the plugin is here https://apps.elgato.com/plugins/com.welshtroll.preflightchecklist 

Pre-flight Checklist – Stream Deck Plugin

What started as a checklist on paper morphed into a digital format.

After I saw the benefit in using the Stream Deck Mini that I won back in 2019,within a year I had decided to upgrade from that to the standard 16 key version. It was well worth it as having more actions per page is great for having more options readily available without having to go between page more often.

One of the things that I was rubbish at doing before stream was, well Everything, I would invariably forget to do something, either forgetting completely or remembering a few hours into stream, such as eating food, checking my peripherals or updating my title and game. I used to have a physical list of things to complete, but invariably I would lose it.

So I decided to build a plug-in for the Stream Deck to digitise this pre-stream checklist, aiming to achieve exactly the same thing, but less likely to misplace it between streams.
Once I had the working prototype working it dawned on me that I could theme it in the style of togglable switches like you might find in a cockpit.

It can however be used for anything that required a checkable list of tasks, so the name change to pre-flight rather than pre-stream allowed it to be no prescriptive but also a familiar enough concept for people to understand.

I haven’t really devoted too much time to getting the plugin into a releasable state but it’s something I’d like to do so other folks can set up their own lists and hopefully get the same benefit I get from it.

4.3 update

I updated to WP 4.3 yesterday and found that one of my plugins ceased working, it also stopped the website from loading, both the blog and admin pages.
So I decided that I would raise a ticket to let the developer know there was an issue with the plugin:
https://wordpress.org/support/topic/cannot-redeclare-get_language_attributes?replies=2#post-7315181

I’m very happy that the problem has been fixed, but can’t say that I was ecstatic with the developers comment, seeing as my feedback was the first one posted after I’d checked to ensure there wasn’t one already raised. (The post ID’s give it away).

Perhaps I’m just in a grumpy mood today, as I often have to deal with many cases of people not reading things correctly, getting the wrong end of the stick or just ignoring the facts in-front of them. Normally these are my customers so it’s hard to rant at their complete lack of understanding or attention to detail, and you just have to point out their mistake.

I felt a little dissuaded from raising feedback in the future.

#software #sitenews #wordpress #plugins

Social linking text plugin

Whenever I make a post I like to have the Publicize element of Jetpack update my Social Media stuff when I make a new post. However I like to prefix the message that goes out with the text “[Blog]” so that on twitter it’s clean that I’m not just linking to something random. I usually remember to it the text but on occasion I forget completely and kick myself as it’s rather inconsistent.

After digging about in the bowls of wordpress there appear to be some functionality you can use to default before and after the usual Publicize text and link, I know that the ability to add a #Blaugust hashtag during the event would have been useful.

A number of places I read indicated you could add this functionality to the theme, however when I tried this it didn’t work for me correctly, so I opted for the plugin method which I’ve detailed below should you want to do the same. Yes there is most likely a plugin that will do all of this for you but it’s nice to build it yourself.

Note : you will need access to your website via FTP or a website portal that allows you to create folders and files.

  1. First you will need to navigate from the root of your wordpress install to the folder wp-content and then plugins.
  2. Create a folder for your plugin, mine is called “Publicize-Plugin”
  3. Navigate to your newly created folder and create a new php file, this usually takes the same name as the plugin folder, in my example it’s called Publicize-Plugin.php
  4. You will need to create the header elements of the file to just cover the basics your file will need to look something like this:
    <?php
    /*
    Plugin Name: Publicize Plugin
    Description: Custom Code for publicize function
    Author: welshtroll
    Version: 1.0
    */
    /* Prefix Code Goes Here */
    /* Suffix Code Goes Here */
    ?>
  5. Next up is adding the logic to Prefix the text to your publicize, you need to replace the text /* Prefix Code Goes Here */ with the following:
    function Publicize_prefix() {
         return '[Blog] ';
    }
    
    add_filter('wpas_default_prefix', 'Publicize_prefix');
  6. The first part creates an function (rename as you wish) that will return the prefix “[Blog] ” (Note the space after the text to stop it going straight against the generated title and link).
  7. The second part registers that function to be called when the prefix is need, the function name will need to match.
  8. So in theory you should be able to visit your wordpress admin plugin page and enable the plugin.
  9. The final step is to replace the placeholder /* Suffix Code Goes Here */
    function Publicize_suffix() {
         return '';
    }
    
    add_filter('wpas_default_suffix', 'Publicize_suffix');
  10. This will add the suffix element, in mine it’s empty but you could add anything you like such as hashtags. Again remember it will attach it directly to the text so add a space at the start.
  11. Now when you are creating a new post your publicize should contain your additional text.

You can find the file here http://welshtroll.co.uk/files/sampleplugin.txt

And there you have it, a basic plugin to modify the default publicize text.

#Coding #Plugins