Photo by: StockSnap.

Adding WordPress Statistics to the Dashboard

Photo by: StockSnap.

Photo by: StockSnap.

This post is part of a series of posts I’m writing about the dashboard that I’m developing to explore web development with Laravel.

To increase the usefulness of the dashboard, and to get some experience with the some more technologies, I decided to collect, store and display statistics on my two WordPress blogs.

I use the excellent JetPack plugin to provide additional features on my blogs, including the collection of site statistics. The reports are great, but I wanted a simple overview of my sites in the dashboard.

To achieve my goal I needed to integrated my dashboard with the WordPress REST API to retrieve the statistics for my two blog, Thoughts by Techxplorer and  Elemental Fiction.

The technologies I needed to learn about included:

The end result is a page that looks something like this:

Screen capture of the WordPress Statistics page

Screen capture of the WordPress Statistics page

The development of this part of the dashboard was surprisingly easy. This was due to the hard work that other developers have put into the following libraries:

If anyone is thinking of doing something similar, I can highly recommend these libraries. They saved me a great deal of time, work and frustration.

Lego man sweeping. By: Michael Schwarzenberger.

Scheduling Tasks in Laravel, When You Can’t Run the Main Task Every Minute

Lego man sweeping. By: Michael Schwarzenberger.

Lego man sweeping. By: Michael Schwarzenberger.

Earlier this week I posted the first post, in what I hope will become a series of posts, on my explorations with Laravel and building my own dashboard. The first post focussed on the functionality records pings from my home server. It is a way to replace the need for a dynamic DNS service for my home server.

Each ping records the current external IP address of my home server, and a ping occurs once every twenty minutes. The table will quickly fill up with old records, which is not desirable. I need a way to periodically tidy up the table to remove old records.

The Laravel framework includes the task scheduling functionality. When this is combined with an artisan console command I have everything that I need to periodically tidy up the table.

Or so I thought…

The task scheduling functionality relies on a Cron entry that runs the main schedule command every minute. The trouble I have is that my hosting provider, Dreamhost, does not allow cron entries to run every minute on their shared hosting infrastructure. This is a perfectly reasonable restriction, and one I needed to work around.

When I considered the types of things that I’ll need to run via scheduled tasks, I realised that I only need to run tasks once every hour. I don’t need a more frequent schedule.

To work around this issue I now run the main task scheduler 29 and 59 minutes past the hour, every hour. I then use the when method to implement a ‘truth test’ constraint. The basis of my constraints are the following three functions, implemented as part of the App\Console\Kernel class:

Using a combination of these three functions I can schedule a task to run:

  1. Twice every hour.
  2. Twice on a specific hour.
  3. Every hour, only in the first half of the hour.
  4. Every hour, only in the last half of the hour.
  5. A specific hour, only in the first half of the hour.
  6. A specific hour, only in the last half of the hour.

This meets my needs, and doesn’t require the main schedule task to run every minute. For example I can schedule a task to run like this:

I hope this post helps others who need to schedule tasks, but cannot run the main schedule task to run every minute.

Vintage Antique Truck Key and Gauge. By: Catherine Haugland.

Learning Laravel by Building a Dashboard

Vintage Antique Truck Key and Gauge. By: Catherine Haugland.

Vintage Antique Truck Key and Gauge. By: Catherine Haugland.

One of the challenges for me with learning a new programming framework, or language, is having a project that keeps my interest.

To that end, I’ve started a new project to build what I’m calling a dashboard, for my online activities and websites. I’m using the latest version of Laravel as my framework, and Bootstrap with HTML5 for the user interface.

It has been surprisingly straightforward so far. I’m also using and building upon the lessons I’ve learnt while working on an internal project as part of my role as a Business Analyst at Flinders University.

The first item that I needed to develop was a replacement for my Dynamic DNS service, so that I can use SSH to access my Raspberry Pi based home server from anywhere. To that end I’ve developed a ‘Pings from home’ page in my dashboard. Below is a screen capture of the page.

Latest Pings From Home page in my Dashboard

Latest Pings From Home page in my Dashboard

The IP address of my home router is displayed, and is incorporated into a link that I can click that logs me in to my server.

Over the next few months I’ll add more functionality, as a way of exploring the capabilities of Laravel, integrations with other systems and APIs and exercising my programming skills.

Original image by: Bryan Nielsen.

Release of Techxplorer’s Content Tweaks Plugin

Original image by: Bryan Nielsen.

Original image by: Bryan Nielsen.

Today I am really pleased to announce the release of my latest plugin for WordPress. The plugin, called Techxplorer’s Content Tweaks, implements a few tweaks to content and media that I find useful. I’m releasing the plugin in the hopes that others may find these tweaks useful as well.

The tweaks that version 1.0.1 of the the plugin implements are:

  • Automatically adding WordPress tags to posts based on hashtags found on the post content.
  • Adding three custom fields to uploaded media to make it easier to track attribution. The fields are:
    1. Author name.
    2. Author profile URL.
    3. Source URL.
  • Automatically calculating, and displaying, various statistics on an individual post. The statistics include:
    1. Word count.
    2. Estimated reading time.
    3. Date and time of last update.
  • Adding a notice to posts which are 6, 9 or 12 months old.

More information on the plugin is available on the plugin project page, as well as the plugin page in the WordPress Plugin Directory.

Asrar a Veiled Chameleon at Adelaide Zoo

Asrar the Veiled Chameleon at Adelaide Zoo

Yesterday the family and I visited Adelaide Zoo. Not the best day to go as it rained in the early afternoon. Before it rained I had the opportunity to get some good photos.This is the last gallery of photos from the visit. This is Asrar a Veiled Chameleon.

Not the best set of photos I’ll admit, it was a little too dark and I had the wrong lens on my camera (I’d left the other lens at home). But Asrar was too beautiful to not at least attempt to get some photos.

A White-checked Gibbon at Adelaide Zoo

White-checked Gibbons at Adelaide Zoo

Yesterday the family and I visited Adelaide Zoo. Not the best day to go as it rained in the early afternoon. Before it rained I had the opportunity to get some good photos.This gallery is of photos of a White-checked Gibbon and what I assume is one of her offspring. The female is a lovely golden colour, and the male offspring has black colouring.

A Brush Tailed Rock Wallaby at Adelaide Zoo

Brush Tailed Rock Wallabies at Adelaide Zoo

Yesterday the family and I visited Adelaide Zoo. Not the best day to go as it rained in the early afternoon. Before it rained I had the opportunity to get some good photos.This gallery is of photos of Brush Tailed Rock Wallabies.

Image by: Gerd Altmann.

My Brief Reflections on Workshop Wednesdays

Image by: Gerd Altmann.

Image by: Gerd Altmann.

Brief Reflections on Workshop Wednesdays

Ever since I saw a link to this article in the Twitter feed of my friend Kahiwa Sebire a few weeks ago, I’ve had this post percolating in the back of my mind.

The article is a humorous piece about the evils of all staff meetings. The article was particularly amusing because I was, and still am, reflecting on a regular meeting that I’m advocating, and organising within my team at Flinders University.

With the support of senior management, I started an initiative early this year which I called Workshop Wednesdays. The purpose of the meetings, as I outlined in my original proposal, is to try to foster a culture of collaboration, cooperation and knowledge sharing.

I can’t go into too much detail, as I don’t have the permission of the team. The one hour, fortnightly meetings, are divided into three main sections.

First, is any administrivia that needs to be shared with the team, as well as an update on any issues raised in the previous meeting. In this section we have also covered updates on mini projects that the group has started. I was particularly excited by our first few meetings where we identified changes to the login process to the student information system that we believe has improved the student experience.

Second, is the standups. We’ve adapted the concept of standup meetings from the agile software development methodology. Each team member focusses on the following three questions:

  1. What did I accomplish in the past two weeks?
  2. What will I do in the next two weeks?
  3. What obstacles are impeding my progress?

Each team member has two minutes to work through the above questions. To help us focus, I developed the Workshop Wednesday standup helper webpage.

I feel that these two minute overviews by each staff member are very important. And some very valuable, and sometimes robust, discussions have been sparked  by them. A constant challenge is striking the right balance between the need to keep people to time, and to give people the opportunity to contribute and feel they’ve been heard.

The third and final section is a discussion section. During these sessions we’ve reflected on this such as ways to improve the student experience, and what the team needs from a possible change in issue tracking and project management systems.

These workshops are challenging, and it is a challenge that I take seriously. I am always seeking feedback, and looking for ways to improve.

In June this year the workshops will have been going for a little under six months. During that time we will have a formal review. The goal of the review is to identify ways to improve the workshops, outside the regular requests for feedback. Additionally the team, in conjunction with senior management, will decide if we continue to have these sessions.

While I can appreciate the sentiment of the article that Kahiwa tweeted about. I also feel that some all staff meetings can be beneficial. A sentiment that I hope is shared by the rest of my team.

Two doctors at the empty graduation desk.

Reflections on volunteering to help at graduations

Two doctors at the empty graduation desk.

Two doctors at the empty graduation desk.

Last Friday I had the privilege to volunteer and help with two graduation ceremonies at Flinders University. I’ve been to three graduation ceremonies, as a graduand, this was the first time I was at a graduation ceremony as a staff member.

As someone with an introverted personality, I tend to avoid social situations, especially those with large crowds. I’m terrible at small talk and chit chat. I have no idea what to say.

However when the invitation to volunteer to help at the graduation ceremonies came out I jumped at the chance. This is because I’ve realised that I’m at a point in my career where I need to grow my professional network. I felt that volunteering would be a small, but significant step towards this goal.

I’m so glad that I got over my trepidation that morning and went up to the registration desk for the first ceremony of the day. There were so many happy, excited and nervous people. Young and old, from all walks of life. I couldn’t help but be swept up in the excitement.

Working on the registration desk is a critical part of the preparation of the ceremony. This is because we check off the graduands who have arrived for the ceremony and give them their seat numbers. It is critical that they sit in their allocated seat, so that they are in the right order for when their name is called to cross the stage and receive their parchment.

Having graduands out of order is a nightmare scenario. It would be embarrassing for us, the graduand, and the academics on stage. We take many precautions to ensure this doesn’t happen, and it starts with the registration desk.

It’s critical to be accurate and make sure the graduands know how important it is. I keenly felt the pressure to be accurate, and yet fast, to ensure everyone could register in a timely fashion.

The time flew by and there were many happy people. It took the pressure off, and it was with a sense of accomplishment that I crossed off the last name and handed over the last seat number sticker.

For the second ceremony I was stationed out the front of the registration tent. I had to ask each graduand which degree they were graduating from that day, to ensure they went to the right registration desk. I believe I spoke to more people that day than I have in months.

It was exhilarating to help people get to the right registration desk, answer questions, and generally try to be as useful as possible. One of the many highlights was helping a family by taking some photos of their group, making sure they could all be in the photo together. They all had smiles on their faces, and I couldn’t help but smile back.

Reflecting on my experiences over the weekend , I became convinced that sometimes it is good to get out of my shell and experience new things. It also gave me an appreciation for what my friend Mark Drechsler went through at the start of semester at Flinders Connect. I had to interact with lots of people for one day, and it left me exhausted. I have no idea how he did it at the start of semester with many more people each day for two whole weeks.

This is a long way of saying that volunteering not only helped the graduations team, it was a growth opportunity for me. I look forward volunteering again next time.


Illustration by: Willian Yuki Fujii Memmo.

Techxplorer’s Anime list – Version 1.1.0

Illustration by: Willian Yuki Fujii Memmo.

Illustration by: Willian Yuki Fujii Memmo.

Tonight I am really pleased to be able to release version 1.1.0 of the Techxplorer’s Anime List plugin for WordPress.

For those that may not be familiar with the plugin, it allows users of WordPress to display a list of the anime that that they’re currently watching. It does this, by integrating with the Hummingbird platform and using the list of titles in the ‘Currently Watching’ section of a users library.

There are two new features in this version:

  • A new widget allows users to display a list of anime titles in the sidebar
  • The alternate title can be displayed below the canonical title in the list of anime

You can see the plugin in action on my site. More information about the plugin is also available on the plugin page in the WordPress plugin directory.

As always, I hope that this plugin proves useful. If you like using the plugin please let me know. If you notice a bug, or have a feature request, please create an issue.