Posts Tagged ‘Meta’

Avatar Icon for WP Comments

Monday, August 19th, 2019

Something that I learned today:

If you put an avatar picture on your website, then WP will grab it to put next to the comments you leave on your site and on other WP websites. Specifically, it seems to be working with the file "avatar.png". Although, Diana Coman says it should be "avatar.ico", but I tried that and it did not work on this site. It is possible that different versions of WP look for different files, in which case it would not hurt to have a ".ico" and a ".png" file both in the root directory of your website.

Tada! Avatar for comments.

Tada! Avatar for comments.

Vpatch for Text Selection Fix

Monday, June 3rd, 2019

As I previously noted, I had to make a small change to get the javascript text selection thing to work on this website. The change I made seems to be addressing a symptom, rather than the underlying problem, since when I look at the source code it should work as written. But anyway, I made a vpatch for the MP-WP tree, so if anybody else sees the same problem they can use this fix.

mp-wp_fix-textselectionjs.vpatch (text version)
mp-wp_fix-textselectionjs.vpatch.peterl.sig (text version)

Getting Selection-Magic to Work

Wednesday, May 29th, 2019

Included in this set-up of WP is a javascript thing that allows the selection of regions of the text, which is convenient when you want to reference a certain passage in a blog post. I had noticed that the functionality was not actually working on my web page, so I dug into the problem. I learned a bit about javascript and a bit about Wordpress. Here are the things I had to change to get it to work:

In the single-post file, which is where the javascript thing is active, there were actually two <span>tags with the same ID, so I got rid of one of them. The big problem with the code was that this <span> tag ID must match the ID called for in the selection-magic script, and for some reason the script was not being updated to match the ID on the page. I reasoned that there is no reason that the ID should be unique for each page (it was being assigned a "shash-#" to match the post ID), it just has to be unique within the page. So I switched it to a static ID string, "sm-area", which solved the problem.

In trying to figure out why this was not working, I compared my script to the one on a page with a working version, and noticed that they included the word "selection-" in the generated address, so I added that too. I also did some minor edits to the javascript.

Next Step: I will review the standard files, and if appropriate, make a vpatch to include these changes into the tree as found on

Using the .htaccess File to Allow Two Computers Access

Wednesday, May 15th, 2019

In order to control access to parts of a website one can use a .htaccess file to restrict the IP addresses which are allowed to view files in a folder. I have two computers which I generally use to access the admin functions of my website, so I wanted to set up the .htaccess file so that either computer could log into the WP-Admin functionality. After looking through various online suggestions, I figured I should be able to do something like this to allow either IP address:

Order Deny,Allow
Deny from All
Allow from xx.xx.xx.xx
Allow from yy.yy.yy.yy

But when I put this in my .htaccess file, when I tried to load the website I just got an error saying that Apache was misconfigured. If you see anything wrong with the code above, I would love to hear why it does not work, since every site I looked at seemed to suggest this should work for what I am trying to do.

The setting that I have been using, and has been working, is like this:

Require IP xx.xx.xx.xx

But when I use this, each time I switch computers I have to ssh into the host and manually alter three different .htaccess files to use the correct IP address before I can log into WP-Admin, which is annoyingly tedious. So I did some more digging and came up with some more technical documentation, where I found the option to use this form:

Require IP xx.xx.xx.xx
Require IP yy.yy.yy.yy

Which lets either computer access the folder.

Hello from a Linux Computer

Monday, May 13th, 2019

Back in 2007 I got my first Macbook. I have been using Macs ever since, except for at work where I generally have been issued a Windows machine, the exception being the computer running the NMR, which has been a Linux system everywhere I have been.

Recently I decided that it would be better to have a Linux computer. I have heard good things about Gentoo, so I thought I would try to start there. I happen to have an old macbook pro sitting around that nobody is using, so I decided to try installing a new operating system there. Apparently macs can be finicky about the particular settings used. I spent the last week trying to follow the Gentoo installation guide, but the system never booted up.

Being rather frustrated at this point, I thought I would start with something easier. So I created a Ubuntu minimal installation disk. After fighting with the Gentoo install for the past week, the Ubuntu install was a breeze. There were just a couple simple questions to answer, and the install program did the rest. Now I have a working Linux system.

I imagine that it will take me some time to get all the settings just the way I want them, but I at least have something to work with. Right away I noticed there is no Curl, so I had to install that.

Show My IP Page

Monday, April 22nd, 2019

From time to time I have found it useful to have a way to view my IP address. In the past I would go to Google, and type "what is my IP" in the search box. I have chosen to rely less on Google, and so I have added a simple page to this website that shows that information. The page is located at, I am also putting a link section in the sidebar, and I am including this link there.

Brand New Blog

Tuesday, April 16th, 2019

Hi everybody, this is the home of my new blog!

I am going to start by re-posting some of my older writings, and I hope to have new things to say as time goes on.

I have not yet come up with a catchy name for the blog, so I will just use my name for now. If you have any good suggestions, I would love to hear them.

This blog is hosted by Pizarro the premiere hoster of the free world. In other words, hey look at me - I am off Google!