Home - andperry256/my-base-theme-and-dbadmin GitHub Wiki

Introduction

My Base Theme

My Base Theme is a WordPress theme used in most of the web sites that I have created. It is based on the Underscores starter theme (see https://github.com/Automattic/_s). My Base Theme provides a very basic layout consisting of a header, menu bar, content area and sidebar and uses a grey monochrome colour scheme. Whilst it is theoretically usable as a WordPress theme in its own right, it is intended to be used normally as a parent theme to a custom theme for the given site.

One of the main features of My Base Theme is in the ability to easily add custom PHP code to any WordPress page without the use of a specialised WordPress plugin. It operates by the creation and use of a "custom scripts "directory within the site filesystem. This contains a directory hierarchy corresponding to the page hierarchy within the WordPress site. When a given page is loaded, any scripts found at the appropriate point in the custom scripts directory will automatically be activated.

More recently My Base Theme has been used as the basis for the creation of the DB Admin facility, which is described below.

DB Admin

Some of my web sites have an extensive database set requiring a management console interface. For many years I used Xataface (see http://www.xataface.com/ and https://github.com/shannah/xataface). I am greatly indebted to Steve Hannah for the creation and maintenance of this project over many years. Due to technical issues relating to the way that I work, a decision was however made in January 2019 to write and maintain my own alternative to the Xataface platform and hence the birth of the DB Admin facility.

As Xataface runs as a standalone facility, it was necessary to operate non-WordPress pages within an otherwise WordPress site. Whilst this is not a problem it was decided nevertheless to integrate the DB Admin facility into the WordPress framework. It is designed specifically to operate within the structure of My Base Theme and hence the decision to combine the two facilities into a single project.

Extensive applications had previously been written to operate within the Xataface framework. As a result the DB Admin facility has been designed to facilitate the easy re-use of existing code. Like Xataface, much of the functionality is based around the handling of actions and tables. Table classes are created in the same way and use many of the same class functions.