Tag name:wordpress

Even more WordPress plugins I've used (but don't currently)

28th June 2022

I've audited again the plugins I've used on this site. I've removed the following, but not because they aren't useful (they are), but because I don't need them right at the moment:

Enhanced Media Library
Originally used to improve the functionally of the Media Library, but since outclassed by the Media Library Assistant".
Custom Post Type UI
Used to prototype the custom taxonomy I use to identify and the photos and images to which I'm the sole copyright owner. Doesn't need to be installed since I copied the taxonomy into my child theme.
Updates API Inspector
Used to get a view on what wordpress does to identify and install updates to plugins and themes. Doesn't need to remain installed once the investigation is completed.

Domain of the Ancients Plugin Details

6th February 2022

Description

This plugin adds the ability to insert an instance of the Domain Of The Ancients game. To do this:
  • It adds a new shortcode that inserts the game. Examples of use:
    [domainOfTheAncients/]
    Inserts an instance of the game.
  • Also, as standard for my plugins, it adds a shortcode to add the current version number of the plugin:
    [domainOfTheAncientsVersion]

Change Log

3.195.0 - 15 April 2022

Revamp of computer player's ship orders. Minor bug fixes to the vessel order dialog.

3.194.0 - 11 April 2022

Count reflecting shields as weapons (plus some refactoring)

3.192.0 - 09 April 2022

Bug fix (with this fix you can no longer cancel an order for a ship (and get a refund) AND still get the ship!)

3.191.0 - 07 April 2022

More AI improvements, More events get recorded for the history

3.190.0 - 05 April 2022

  • Add Suicide planet busters
  • Improve ship design stats
  • Slightly improve computer AI
  • Nerf jump space dredgers by significantly increasing their price and by resetting their production if a non-dredger unit enters their hex

3.186.0 - 01 April 2022

Support Standing Orders, fix fighters, minor wording/typo fixes

3.185.0 - 31 March 2022

Fix typo in the research (which broke selecting computers as the favoured tech)

3.184.0 - 30 March 2022

Wording Tweaks, Give the computer players some kind of AI and get them to make their own ship designs, Adjust ground combat

3.183.0 - 27 March 2022

Bug fixes, Refactoring, UI Redesign

3.182.0 - 10 March 2022

Bug fixes

3.181.0 - 04 March 2022

Minor cleanup, bug fixes

3.180.0 - 04 March 2022

  • Bug fixing
  • Colony Blocks converted into a single large block
  • Change one of the archaelogy techs and support one of the weaponary techs
  • Apply interdiction of colonies
  • Implement the history pages
  • Compute Win/Lose conditions

3.179.0 - 28 February 2022

Bug fixing. Complete support for some technologies

3.178.0 - 27 February 2022

Refactoring. Correctly report on other ships in the hex. Implement (largely) combat.

3.177.0 - 21 February 2022

Invert ship design sublist (so the best technology appears at the top of the list). Ensure computer players can't improve their low level colonies.

3.176.0 - 21 February 2022

Add computer players (who act at random). Remove Sensor Buildings

3.175.0 - 17 February 2022

Correct typo's in the ship designer for a couple of block types

3.174.0 - 17 February 2022

Allow colony ships to add to existing low-level colonies. Prohibit zero speed ships. Minor bug fixes. Some refactoring

3.173.0 - 16 February 2022

Bug fixes and some refactoring

3.172.0 - 15 February 2022

Add support for bases and fighters

3.171.0 - 13 February 2022

Allows most player actions - no AI

3.170.0 - 06 February 2022

Initial Version


The information on this page was retrieved by Plugin Information Version 3.202.0.

Setting up a ubuntu for my development enviroment

13th May 2021

So I'm experimenting with a new development environment - this one is a ubuntu 20.04 running inside of Oracle VM Virtual Box. The initial installation was done following the cookbook from Abhishek Prakash.

Initial VM setup

  • Download and install VirtualBox
  • Download the ISO for Ubuntu
  • Start Virtual Box and create a new VM - I specified 4GB memory, 4 processor and approx 60GB Hard Disc
  • Start the VM using the ISO image and complete the Ubuntu installation

Development Environment Setup

  • Install fossil using sudo apt install fossil
  • Install ant using sudo apt install ant
  • Install npm using sudo apt install npm
  • Install php 7.4 using sudo apt install php7.4
  • Create directory for the website development mkdir website
  • Clone the website fossil and open it:
    • fossil clone http://david:password@virtual.internal:7780/website website.fossil
    • cd website
    • fossil open ../website.fossil
  • Install prereq npm packages:
    • sudo npm -g install jshint@2.11
    • sudo npm -g install qunit@2.10
    • sudo npm -g install ajv-cli@4.0
  • Test the build by
    • cd build
    • ant rebuild-all

WordPress setup

  • Install prereqs by sudo apt install apache2 mysql-server libapache2-mod-php php-mysql
  • Configure and enable apache2 by
    • sudo systemctl start apache2
    • sudo systemctl enable apache2
    • sudo ufw allow in "Apache Full"
  • Configure mysql and setup a database for wordpress by
    • sudo mysql_secure_installation
    • sudo mysql -u root -p and enter these commands:
      • CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
      • CREATE USER wordpress IDENTIFIED WITH mysql_native_password BY '12345';
      • GRANT ALL ON wordpress.* TO 'wordpress'@'%';
      • quit
  • Install php extensions used by wordpress using sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
  • Restart apache2 using sudo systemctl restart apache2
  • Install curl using sudo apt install curl
  • Download wordpress using curl -O https://wordpress.org/latest.tar.gz
  • Extract the archive and move under apache:
    • tar -xzvf latest.tar.gz
    • sudo mv wordpress /var/www/html
    • sudo chown -R www-data:www-data /var/www/html/wordpress
    • sudo chmod -R 775 /var/www/html/wordpress
  • Setup the wordpress config:
    • cd /var/www/html/wordpress
    • sudo mv wp-config-sample.php wp-config.php
    • Edit wp-config.php to setup the credentials for the database
  • Setup the apache2 config for wordpress:
    • sudo nano /etc/apache2/sites-available/wordpress.conf
    • Make the contents to these lines:
      <Directory /var/www/html>
              Options Indexes FollowSymLinks MultiViews
              AllowOverride All
              Require all granted
      </Directory>
      <VirtualHost *:80>
              ServerName wordpress
              ServerAdmin webmaster@localhost
              DocumentRoot /var/www/html/wordpress
              ErrorLog ${APACHE_LOG_DIR}/error.log
              CustomLog ${APACHE_LOG_DIR}/access.log combined
      </VirtualHost>
      
    • Check the config via: apache2ctl -t
    • Enable it with sudo a2ensite wordpress
    • Disable the default site with sudo a2dissite 000-default
    • Activate the new apache2 configuration with sudo systemctl restart apache2
  • Complete the wordpress install by browsing the image's website

phpMyAdmin installation

  • Install phpmyadmin via sudo apt install phpmyadmin
  • You may need to enable the apache2 conf via:
    • sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
    • sudo a2enconf phpmyadmin
    • udo systemctl reload apache2

Ningxia Child Theme

15th April 2021

Description

This child theme provides customisations for the Chronicle, En Garde! and Liftoff!
  • Version: 3.213.0
  • Author: David Vines
  • Last Updated: 2022-06-27T09:34:13Z
  • Requires WordPress Version: 4.0 or higher
  • Tested up to: 6.0
  • License: This theme is based on the ming theme used under the terms of the GPL v2 license. This theme may be used under the terms of the GNU General Public License, version 2 license.

Many thanks to Axiu, the author of the ming theme.

Change Log

3.213.0 - 27 June 2022

Support a pseudo tag cloud in a widget and full tag cloud page

3.212.0 - 26 June 2022

Bug fix the copyright notice

3.211.0 - 26 June 2022

A better taxonomy-mediatag page (uses the mla-gallery shortcode, so requires the media library assistant plugin)

3.210.0 - 26 June 2022

Provide link to full size image for large images on the image attachment page

3.209.0 - 24 June 2022

Add camera device on image attachment page

3.208.0 - 22 June 2022

Cope with both '0' and 0 as being not supplied values (as well as not being present)

3.207.0 - 22 June 2022

And remove paragraph tag around the copyright tag line too

3.206.0 - 22 June 2022

Remove image timestamp if is zero. Remove paragraph tags on the attacmhment page (since it's already wrapped in a definition tag)

3.205.0 - 22 June 2022

Reverse the sort order on the mediatag taxonomy page. Show image sizes on image attachment pages.

3.203.0 - 18 June 2022

Add support for a mediatag custom taxonomy

3.189.0 - 03 April 2022

Get the icon reference correct when the mimetype is not recognised directly by wordpress

3.188.0 - 03 April 2022

Add Axiu reference for the copyright page

3.187.0 - 03 April 2022

Add icons for epub and mobi. Add support for copyright-first-year attachment tags

3.170.0 - 06 February 2022

Tweak Support for Domain of the Ancients

3.169.0 - 10 January 2022

More Support for Domain of the Ancients

3.168.0 - 04 January 2022

Support Domain of the Ancients

3.165.0 - 11 September 2021

Support a template that is 'wider' but for a sandpit (i.e., a page without a header)

3.161.0 - 09 September 2021

Fix update detection logic

3.158.0 - 23 July 2021

Common up copyright logic!

3.157.0 - 21 July 2021

Fix updating logic!

3.144.0 - 18 May 2021

  • Reinstate version strings

3.126.0 - 15 April 2021

  • Support plugin information pages

3.97.0 - 22 February 2021

  • Remove empty and duplicate annotations from image and video pages

3.96.0 - 15 February 2021

  • Modify the font size on tag cloud to utilise the space freed up by the smaller count

3.95.0 - 14 February 2021

  • Make counts on the tag cloud small

3.93.0 - 10 February 2021

  • Modify font size on the tag cloud

3.90.0 - 07 February 2021

  • Move fonts (and one style) that should have been in this child theme to this child theme

3.76.0 - 28 January 2021

  • Add support for self-hosted update notification

The information on this page was retrieved by Plugin Information Version 3.202.0.

Sumo Oyakata Plugin Details

28th March 2021

Description

This plugin adds the ability to insert an instance of the Sumo Oyakata game. To do this:
  • It adds a new shortcode that inserts the game. Examples of use:
    [sumoOyakata/]
    Inserts an instance of the game.
  • Also, as standard for my plugins, it adds a shortcode to add the current version number of the plugin:
    [sumoOyakataVersion]
  • Version: 3.199.0
  • Author: David Vines
  • Last Updated: 2022-05-13T09:13:33Z
  • Requires WordPress Version: 4.0 or higher
  • Tested up to: 6.0
  • License: Although I claim sole ownership of the copyright for this plugin, I hereby grant permission to use this plugin under the terms of the GNU General Public License, version 2 license.

Change Log

3.199.0 - 13 May 2022

More names, fix table links

3.198.0 - 11 May 2022

More names

3.197.0 - 24 April 2022

Add scroll bar to history

3.196.0 - 23 April 2022

  • Save and shhow Rikishi Basho history.

    Sadly the save data is not compatible and this version cannot load from earlier versions.

3.183.0 - 27 March 2022

  • Even more names, allow 13 character names

3.182.0 - 10 March 2022

  • More names

3.170.0 - 06 February 2022

  • More names and add endurance
  • Promotion/demotion more aggressive
  • Added speed controls

3.161.0 - 09 September 2021

Fix update detection logic!

3.157.0 - 21 July 2021

Fix updating logic!

3.153.0 - 21 July 2021

  • Common up the plugin updating code between my plugins

3.152.0 - 09 June 2021

  • Make debug a toggle and adjust some text

3.151.0 - 08 June 2021

  • Fix four+ way ties

3.150.0 - 08 June 2021

  • Add Mono-ii text
  • Rikishi tire quicker
  • Adjust success odds (ironically back to much closer to the original 🙂

3.149.0 - 04 June 2021

  • Refactoring, add debug flag to see the odds and die rolls

3.148.0 - 29 May 2021

  • Change the algorithm used for the odds of a move to succeed
  • Change rikishi's stats a little between bashos

3.147.0 - 23 May 2021

  • Fix checking for Ozeki winning two basho in a row
  • Tighten the odds (i.e., stats matter more than randomness (to a degree)
  • Some code refactoring
  • Yet more names added as the basis for the name generator

3.146.0 - 21 May 2021

  • More names added as the basis for the name generator. Allowed names increased to 12 characters

3.145.0 - 18 May 2021

  • Bug and typo fixes

3.144.0 - 18 May 2021

  • Properly support version numbering for more correct browser cache busting

3.142.0 - 18 May 2021

  • Add trip action
  • Add some more names
  • Fix odds of successful (base number was inverted)

3.139.0 - 14 May 2021

  • Some more names

3.135.0 - 30 April 2021

  • Check for demotion from Komusubi before automatic promotion

3.134.0 - 27 April 2021

  • Fix date display when the load is older than 2 days

3.133.0 - 19 April 2021

  • Reduce further the element of luck in the bouts

3.132.0 - 19 April 2021

  • Reduce the element of luck in the bouts
  • Use west's odds for west's moves (instead of east's!)

3.130.0 - 18 April 2021

  • Increase width of the info panel
  • Improved description of the bout

3.128.0 - 16 April 2021

  • Fix the Bug fix - Ozeki should not be automatically Maegashira (in fact they never move directly to Maegashira!)

3.127.0 - 16 April 2021

  • More Bug fixes

3.125.0 - 14 April 2021

  • Bug fixes

3.124.0 - 13 April 2021

  • Mark Kadoban Ozeki

3.123.0 - 12 April 2021

  • Stop showing champion at the top of the list for the entire Basho
  • Setup the next button on load rather than just doing it

3.122.0 - 12 April 2021

  • Add info below load/save buttons

3.121.0 - 11 April 2021

  • Don't count non-yokuzuna as yokuzuna!

3.120.0 - 11 April 2021

  • Fix save/load during tie-breaks
  • Fix three+ tie-breaks

3.119.0 - 11 April 2021

  • Take account of yokozunua, ozeki, sekiwake and komusubi counts when deciding on maegashira demotions
  • Stop KK winnners from being demoted to Juryo
  • Highlight Kachikoshi and Makekoshi results

3.118.0 - 11 April 2021

  • Fix broken fix of load between Bashos

3.117.0 - 11 April 2021

  • Fix saving of the seed state for the random number generator
  • Fix load between Bashos

3.116.0 - 10 April 2021

  • Fix spelling of Komusubi
  • Fix save during tie breaks
  • Fix some promotion/demotion logic (including allowing Komusubi to be promoted directly to Ozeki)
  • Allow retirement of Yokozuna and for promotion/demotion from/to Juryo

3.115.0 - 08 April 2021

  • Fix tie break logic and bugs in that logic
  • Reduce effects of randomness
  • Reduce order on the name generations (names more random, but more likely to generate strange letter combos)
  • Allow wider choice of opponents at the beginning of the basho and narrow down as the days pass
  • Assign initial ranks at the end of the first basho
  • Add load and save buttons
  • Have multiple bashos

3.114.0 - 06 April 2021

  • Expand to 42 rikishi (the size of the Makuuchi)
  • Fix some odds
  • Decide on the bouts at the beginning of the day, avoid duplicate bouts

3.113.0 - 03 April 2021

Fix tie break match logic, more names (simplify names to allow generator more scope)

3.112.0 - 01 April 2021

Fix slug used for the plugin (again!)

3.111.0 - 01 April 2021

Fix slug used for the plugin

3.110.0 - 01 April 2021

Used the procedure from The Compleat Strateyst to choose between moves

3.109.0 - 29 March 2021

Added intelligence. Allow for tie-breakers at the end of the basho.

3.108.0 - 29 March 2021

Initial Version


The information on this page was retrieved by Plugin Information Version 3.202.0.

Plugin Information Plugin Details

22nd March 2021

Description

This plugin adds the ability to show the description and change log of one of my plugins in a similar way to that provided by the wordpress admin pages. In support of this, the plugin provides three shortcodes:

pluginInformation

This shortcode provides the description and other information about the plugin. Additional information may be added into the right handbox of the generated table by placing the text inside of the shortcode. The additional text will be placed inside a list item (<li> tag)

Example of use
[pluginInformation slug="LatinSquares"]<strong>License:</strong> GPL v2[pluginInformation]

If the attachment attribute is provided on the shortcode, links will be updated to point to the attachment page instead of the direct download page. For example
[pluginInformation slug="LatinSquares" attachment="true"]

If the homepage attribute is provided on the shortcode, a link to the plugin's homepage will be added to the information panel. For example
[pluginInformation slug="LatinSquares" homepage="true"]

pluginInformationChangeLog

This shortcode provides the change log for the plugin

Example of use
[pluginInformationChangeLog slug="LatinSquares"]

You can ask for only the first few sections of the change log (as introduced by h4 tags in the change log) by specifying 'latest' on the shortcode, for example:
[pluginInformationChangeLog slug="LatinSquares" latest="1"]

Normally the links in the change log will be removed. These can be kept via the attachment attribute. If set the links will be kept and if attach is 'convert' the links will be converted from links to the download to links to the relevant attachment page for that download file.

pluginInformationVersion

Provides the version number of this plugin (not the version of the plugin being queried)

  • Version: 3.202.0
  • Author: David Vines
  • Last Updated: 2022-05-25T12:31:21Z
  • Requires WordPress Version: 4.0 or higher
  • Tested up to: 6.0
  • License: Although I claim sole ownership of the copyright for this plugin, I hereby grant permission to use this plugin under the terms of the GNU General Public License, version 2 license.

Change Log

3.202.0 - 25 May 2022

Support Tested up to

3.201.0 - 25 May 2022

Next update

3.191.0 - 07 April 2022

Fix display of multiple change log entries when removing the attachment links

3.186.0 - 01 April 2022

Add the 'latest' option to the changelog short code. Remove links if 'attach' isn't specified

3.183.0 - 27 March 2022

Fix wording of the generated description (no change to the actual plugin itself)

3.161.0 - 09 September 2021

Fix update detection logic

3.157.0 - 21 July 2021

Common up duplicated code in the plugin update logic

3.149.0 - 04 June 2021

Add Last as a prefix for weekdays. The ISO time is prefilled into last updated text field in case the javascript is unable (or has not yet) run

3.139.0 - 14 May 2021

Support a more generalised development environment. The plugin now looks for the json information file on the hosting site first rather than to a hardcoded site. The standard fallback is still to blog.tremlas.com, my standard website.

3.138.0 - 03 May 2021

Get yesterday to be displayed only if yesterday actually makes sense 🙂

3.137.0 - 01 May 2021

Bug fix to prevent infinite loop!

3.136.0 - 01 May 2021

Have the last updated field filled in by javascript so that the static version doesn't change so much

3.126.0 - 15 April 2021

Provide option for links to be to the attachment page rather than being a direct download

3.108.0 - 29 March 2021

Update URL of the details page

3.106.0 - 24 March 2021

  • Remove plugin link if it's the same as the current page

3.105.0 - 23 March 2021

  • Add a download link for the current version
  • Improve style of the table a little

3.104.0 - 22 March 2021

  • Initial published version

The information on this page was retrieved by Plugin Information Version 3.202.0.

Yet more wordpress plugins I've uninstalled but want to keep a record of

7th February 2021

I've recently done another audit of the plugins used on this site. This was in response to the Media Library insisting that it couldn't update the metadata for media in the media library because it already existed in the library. To track this down I ended up doing a review of the media related plugins. The ones I've uninstalled are:

Bulk Change Media Author Plugin
Allowed me to fix up the author field on multiple media items. I'm now less concerned about this and hence no longer need this
Enable Media Replace
Having sorted out the correct directory structure for my plugins and themes I no longer need this plugin
Phoenix Media Rename
As with the previous plugin, sorting out the directory structure means I no longer need this plugin

Enabling updates for self-hosted WordPress themes and updates

30th January 2021

I recently experimented with changing my themes and plugins to support self-hosted updates. For plugins this was relatively straight-forward once I'd found two articles, one by Misha Rudrastyh, which got me to adjust the contents of the zip files down one level (which allows WordPress to understand that the new zip file being uploaded is a replacement/update for a plugin that is already installed) and gave the basics of the self-hosted update process1, including hosting a file that describes the update along side the zip file that is the actual update. The second article by Paul Biron showed what the current version of WordPress is expecting in the php code for plugins

However those articles don't talk about themes that much. To be fair the process for themes is very similar2. However the expection of the WordPress code is different to that for plugins, so as a record here's my code:

function ningxia_check_for_update( $slug ) {
 $info = ningxia_get_remote_update_info( $slug );
 if ( false == $info ) {
  return false;
 }
 if ( version_compare( '@@@VERSION@@@', $info['version'], ' $slug,
    'new_version'   => $info['version'],
    'url'           => $info['homepage'],
    'package'       => $info['download_link'],
    'icons'         => array(),
    'banners'       => array(),
    'banners_rtl'   => array(),
    'tested'        => '',
    'requires_php'  => '',
    'compatability' => new StdClass()
  );
  return $update;
 } else {
  return false;
 }
}

function ningxia_pre_set_site_transient_update_themes( $transient ) {
 // Check for update
 $themeslug = 'Ningxia';
 $update = ningxia_check_for_update( $themeslug );
 if ( $update ) {
  $transient->response[$themeslug] = $update;
 }
 return $transient;
}
add_filter( 'pre_set_site_transient_update_themes', 'ningxia_pre_set_site_transient_update_themes' );

My build process modifies the @@@VERSION@@@ string into the current version number for the build being created (for example, 3.80.1) whereas the $info[['version']] comes from the json that been retrieved from the self-hosting site.


Last updated: May 30, 2021 at 9:36 am

Footnotes

  1. Though I did have to adjust the logic slightly - when you detect that the filter call is not for the current plugin you need to return the current value of first parameter and not just return false
  2. Though the articles I've read suggest that there could be differences for multi-site setups - as this site is not a multi-site setup, I've yet to test how well this description works for that kind of setup

Fixing the Simply Static plugin

18th November 2020

After updating my Ubuntu system to 20.04, I discovered that my method for generating the static version of the site no longer works. It turns out that the Simply Static plugin has a hidden dependency on PHP 7.2 (and upgrading Ubuntu from 18.04 to 20.04 incidently updates the PHP level from 7.2 to 7.4).

After doing some digging I discovered that the Simply Static plugin has an included library called PhpSimpleHtmlDom and the version in the plugin (1.5) is the culprit, I downloaded a more recent version of that library from github and replaced the version of the library with that level and (after a minor hack to change the namespace of the library to match the old namespace being used), Simply Static is now working again.

Hopefully, at some point, the author of the plugin will update it and I won't need the hack. That said the plugin has not been updated for a few years so may now be abandoned. If so I'll probably have to change the infrastructure that builds the static version of the website...

My thanks to Github user caophihung94 for providing a newer version of the PhpSimpleHtmlDom library

Legal

21st October 2020

Privacy Policy

This website is intended purely as a Personal web site. As such it does not collect any personal information from any body other than myself.

Cookie Policy

This site uses cookies - small text files that are placed on your machine to help the site provide a better user experience. In general, cookies are used to retain user preferences, store information for things like shopping carts, and provide anonymised tracking data to third party applications like Google Analytics. As a rule, cookies will make your browsing experience better.

On this site, the only cookies are those used by WordPress itself so that it can determine where you are in the site and if, for example, you've logged on or not. There a good write up of this on the cookielawinfo website (note, however, that wesbite is trying to get you to sign up for their plugin for wordpress that provides a cookie consent banner among other GDPR features).

However, you may prefer to disable cookies on this site and on others. The most effective way to do this is to disable cookies in your browser. I suggest consulting the Help section of your browser or taking a look at the About Cookies website which offers guidance for all modern browsers.

Local Browser Storage

Both the Sumo Oyakata and the Domain of the Ancients games provides load and save1 buttons. The data saved is entirely local to your browser and never leaves it in any form.

Copyright

Unless otherwise noted on the relevant page all text is my own and is thus copyrighted by myself (David Vines). Again unless otherwise noted on the relevant page you may copy and reuse the text as long as you abide by the terms of the Creative Commons License Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. The copyright in the images varies by the image. If you click on the image you should be taken to the attachment page for the image where details of the copyright owner will be stated and the license used by this website to the image.

Contact

Should you need to contact me, please send an email to webmaster(at)blog(dot)tremlas(dot)com.


Last updated: May 22, 2022 at 22:44 pm

Footnotes

  1. Sumo provides a save button, Domain of the Ancients doesn't (because it auto saves at the beginning of every turn).