Category

Web Development

W

Temporarily Disabling the WordPress Google Authenticator Plugin from the Command Line

T

This WordPress site uses the Google Authenticator plugin to provide two-factor authentication (2FA) when logging-in to the administration area. Occasionally I need to temporarily disable 2FA in order to publish posts from the blogging software I use. Traditionally toggling 2FA is achieved from the WordPress backend. This post looks at two alternative methods of doing this locally from the command line.

(more…)

Using the Cloudflare API to Manage DNS Records

U

I’m probably doing Cloudflare a disservice by categorising it as a CDN provider, but that’s certainly one of the many services they offer and perhaps how most individuals using their free offering see them. Like me, I’m certain the vast majority of that group use the Cloudflare dashboard to configure their domains, but Cloudflare provides an API that allows you to programmatically manage those DNS records through a command-line interface of a *nix shell such as Bash.

(more…)

mysqli::prepare Fails Using ALTER TABLE in a Statement With Parameter Markers

m

Part of a project I’m working on requires re-setting a MySQL table by deleting most – but not all – rows. In PHP I’m using mysqli::prepare to prepare the MySQL statements.

$id = 5;
$query = $conn->prepare("DELETE FROM table WHERE id>?");

 

 

The MySQL statement includes a parameter marker – denoted by ? – which is then substituted for the value of the $id variable using mysqli::bind_param.

(more…)

Collapsible Sidebar Lists Plugin for WordPress

C

A previous theme I used for this site incorporated For some while this site’s been using the collapsible sidebar lists I described in this post. This method requires manually adding PHP and Javascript to the theme’s code. All a bit clunky really.

I’ve finally completed a plugin which provides the same functionality, but in a far more convenient way. The collapsible lists currently displayed in this site’s sidebar are generated by this plugin.

(more…)

Vertical, Horizontal & Diagonal Spry Sliding Panels

V

I was recently looking to give my photo gallery an overhaul. I’m quite a fan of Adobe’s Spry framework, so I thought I’d give the Sliding Panels widget a try. There are several examples on Adobe’s site showing panels sliding vertically, horizontally and in any direction. The direction is controlled by some CSS and after successfully playing around with vertical and horizontal sliding I couldn’t figure out from the examples how to get the panels to slide in any direction. That is until I realised how the panels are laid out and the importance of one particular CSS declaration.

(more…)

Recent Comments

Recent Posts