# Jamie Balfour'sPersonal blog

Notice anything different about my blog? No, you don't. And actually, this change came on the front end for a change. Yup, that's right. An unnoticeable change that no one would be aware of unless they are hosting using BalfBlog 2.3's latest update, which currently only I have.

So what is it?

Templates are finally back

What this means is you no longer follow the styling of BalfBlog in the front end at all, let your site do the work is now completely true. You can design a post template very easily by just editing the appropriate template. I have provided several basic templates with the default installation and these will soon be editable from the dashboard.

There are currently just two templates, introduction and post. These templates will be supplemented by a third one soon for single post view and further on I will perhaps change the way that the journal mode works to use one of these as well. This gives flexibility over the way posts are represented far more than before.

I will push this change live to my other BalfBlog installations very soon. Also, the standard GeneratePosts has been moved to GeneratePosts2 and the new GeneratePosts follows this template scheme.

Posted by jamiebalfour04 in BalfBlog
template
balf
blog
balfblog
update

When I started to write BalfBlog under the name JBlogs in 2014 I began using the now deprecated mysql commands. After some time messing about I switched to the much faster and more powerful mysqli commands.

This was the first big change in the history of the code in BalfBlog. Moving to PDO from MySQLi was another big change (probably about the sixth big change in the history of BalfBlog) and I claim it has many performance improvements.

The improvements do not come from querying the database because I know outright that MySQLi is better for that since PDO adds a layer of abstraction over the databases. No, they come from preventing running the query twice - which is an obvious waste of resources.

Now that I use PDO, this is no longer required since the way that binds are done is much better. Creating prepared statements is so easy and this is where the performance gains come from.

Also, I will point out as it seems a good time. Performance is being thouroughly tested at this point in time under many use cases. PDO definitely seems the way to go however, and it will also allow me to easily switch around database commands to allow other databases to be used in the future.

Also, not every part of the dashboard has converted yet, but most have.

Posted by jamiebalfour04 in BalfBlog
balfblog
pdo
2.3
efficient
faster
mysql
mysqli

One of the biggest updates in terms of what it brings is the move from MySQLi to PDO - PHP's data objects for databases. Not only does PDO make it easier for me to add future database systems, it makes it easier for me to write the code.

MySQLi's biggest problem is the way in which prepared statements are formed:

$stmt -> bind_param("ss",$username, \$password);

PDO solves this issue by making it possible for me generate any query and provide any number of parameters, thus allowing me to call the execute on the query at just one point. If you look through the new version BalfBlog you will understand why this is crucial.

Nothing will change on the front end, although the performance is much better with PDO because of the way it is written.

Posted by jamiebalfour04 in BalfBlog
php
pdo
balfblog
update
mysql
mysqli

I may have only posted the other day, but this update is a big update so it needs to be out there.

Version 2.3 will be a big overhaul of the internals of BalfBlog, similar to what happened to ZPE. This is a major code refactor and therefore it will take me some time to finish it. I am now improving the comments inside BalfBlog to make it easier to work on, changing the way variables are named, defining more constants and generally refactoring the code.

If you wish to contribute, get in touch.

Posted by jamiebalfour04 in BalfBlog
balfblog
developer
ideas
suggestions
features
2017
2.3

Although it's easy to find out about BalfBlog through the changelog, I thought I'd update you here.

The latest revision of BalfBlog is a bit of a step up in terms of security and performance. The main new features related to user accounts. Every BalfBlog installation from version 2.3 (Goldfinger) will now feature a special user account called helpdesk. It is disabled by default, so an administrator has to enable it in settings. Once it is enabled, helpdesk is used to allow me to remotely login to your blog and help you with issues. I suggest leaving it off unless you need help.

As well as this, at the end of February I added the switch user functionality, which allows administrators to use the user account of any user without the need for a password. This also is designed for debugging and will allow administrators to debug the system themselves. I also changed the dashboard menu to a new accordian style which keeps items better organised. You will see other asthetic changes across the website, including the new login page. On the development side, you can now switch quite easily to CKEditor instead of TinyMCE for a more lightweight editor (more editors will come soon).

I have recently begun work on the new Message Centre. I will primarily be using this on my blog to record issues. This new system allows you to setup an easy to use message system whereby users can get in touch. You will be able to set expiry dates on messages so they will only remain in the system for a few days.

Also coming in Goldfinger is the new logging system. This will allow you to see what people are doing in the dashboard. I will also be looking into building a comment system that I will integrate into BalfBlog. Version 2.3 will also possibly be changing from MySQLi to PDO, but we shall see. A new file manager is also planned and I'm looking to improve performance too.

I'm still working on improving the file upload system for images, which is no longer working.

As with all version of BalfBlog 2.x, HTML5 and CSS2+ is required to be able to actually use it, so please just stick to Firefox, Edge, Chrome or Safari 6+.

Posted by jamiebalfour04 in BalfBlog
balfblog
features
2017
update

BalfBlog is making a big change today that will change a lot of installations. Luckily there is a new plugin included by default with all installations that fixes this.

The fix I speak of is moving from using MD5 in any hashing algorithms at all. I was interested in finding out whether or not MD5 was a preferred choice to SHA1 for a short URL and came across a page in which the write manages to produce two images which are distinctly different yet the manage to produce the same MD5 value causing a collision. Not good.

As a result I have decided to change from MD5 being used to generate hashed URLs to SHA which has a much lower chance of a collision than MD5 does. For more information on creating collisions (and it's a very interesting article) look to here:

http://natmchugh.blogspot.co.uk/2015/02/create-your-own-md5-collisions.html

Posted by jamiebalfour04 in BalfBlog

December has been a month about bringing notifications to BalfBlog. This month has brought quite a lot of new features that connect with the users of the blogs.

First of all I added push notifications towards the end of November, allowing users to quickly subscribe to push notifications. Users can still subscribe by email using the my_blog/subscribe/ URL. On top of this, notification frequency can be changed so you don't spam your followers.

Secondly, I have finally added social media buttons for sharing. This is completely controlled by BalfBlog, so you don't need to worry. All that you have to do is style the buttons and set them to appear from the settings controls.

Take a look at my blogs to see exactly what has been done.

Posted by jamiebalfour04 in BalfBlog
balfblog
update
december
2016
new
features

The main focus on the latest bunch of updates was adding more modularity to the whole of BalfBlog. As a result the tools section is a plug in based system. This is achieved through tools which are comprised of a single directory which contains a simple XML file called info.xml and PHP files called front.php and do.php. The front.php file is used to instruct what the front of the tool does and the do.php is the process page. The tools page will now generate a list based on these tools. This allows me to be more modular and produce more tools for later versions without releasing a whole new version.

Subscribers and users can now be fully managed from within the Dashboard. The new setup for BalfBlog is also able to be accessed very easily since it will run when there is no data.php file in the appropriate location. I've still to think of an easy way to develop the multi blog single Dashboard system I have been talking of in recent posts but it will be done at some point.

Finally, on the subject of subscribers, there is one less requirement for you since BalfBlog now includes a new 'open' section of it's Dashboard and in it is the new subscribe page. What this means is that users can easily subscribe using the BalfBlog Dashboard.

All of this is still scheduled for version 2.2's official release at the end of the year.

Posted by jamiebalfour04 in BalfBlog
balfblog
end of october

A main focus in BalfBlog is having a functional dashboard. The dashboard is incredibly functional and well written so that it can be expanded easily. The BalfBlog Dashboard was originally developed to be entirely inspired by the host website, but as time went on, this concept became hard to manage and develop for and I began to write the new dashboard.

BalfBlog Dashboard is a complete back-end development environment for BalfBlog. It's great because it maintains it all in one simple place as well as ensures that only the right users can access content without needing some complicated system that the host website needs to provide. It was originally themed from my own website and I continued this theme for some time. It still follows this and the big changes I've made to my own website are now also included in BalfBlog. I always planned, and have continued to, keep it free from orange. Even though orange is my favourite colour, BalfBlog takes another colour from my website for it's theme.

The colour #269 is the dark blue you'll find across my website as my secondary colour also being used on buttons across my website now has found it's way into BalfBlog as the new primary colour here.

However, the restyling does not end here. I've got many plans on what is coming next. Most of the next few updates will focus on back-end updates, particularly related to user access.

Posted by jamiebalfour04 in BalfBlog
balfblog
jamie
balfour
jamiebalfour.com
update
style

The latest update to BalfBlog brings a range of new features. The most crucial is that you can now manage subscribers and users from the dashboard. On top of this, you can now change the date of a post after posting (I am putting in an option to disable this by default, but some people may want this).

This update also focuses on the dashboard side of things and improving the way it works. A lot of JBlogs 1.x is still exists in BalfBlog and it's being replaced with newer stuff in each update. This update removed a lot more of this.

As well as this, I focused on the way JavaScript is included. Since many people who use BalfBlog are developers I wanted to make it easier to include your JS in the post. A separate text area allows you to quickly insert JS code.

Posted by jamiebalfour04 in BalfBlog
balfblog