Threat Scan Plugin Updated

I wrote the Threat Scan plugin about 8 years ago, I think. I fixed a few bugs and then forgot about it. It looks into the WordPress installation for dangerous code.

I recently noticed that it has over 1,000 users and still gets downloads in spite of being listed as inactive.

I gave it a brush up and updated the WordPress.org site with the new code. I had a bear of a time doing it. It had been 6 years since the repository had been updated. I have changed machines twice, joined with a new co-developer, and changed passwords since then. The plugin did not want to update.

I finally got it all fixed and the plugin already has a new download after two minutes.

Garage Sale Finder GPX File

I wrote a program that scrapes craigslist to get the GPS information about up and coming garage sales. It converts the information into a GPX file that can be read by Garmin GPS units.

try the Garage Sale Finder GPX File

I am putting the form up for use here and it will stay here until the craigslist people decide to ban my IP.

You can host it yourself if you have PHP by downloading the code:

PHP Source for Garage Sale Finder

There is some interesting Javascript for selecting the craigslist region. The GPX file creation is there for anyone who wants to purpose the program for something else.

 

Firefox add-on to hide auctions with price variations

I an frustrated by auctions on eBay that list a range of prices for items. Recently I wanted to buy a bicycle signal light and almost all the auctions listed as a range of prices like $2.95 to $21.95. These are called listings with variations. The problem with them is that the lower price is usually for an very low priced item that may or may not be sort of related to the auction. To me this is Bait-and-Switch.

I got so tired of it that I wrote a Firefox add-on to hide these kinds of auctions. It uses a snippet of JavaScript to fix the page so that the auctions are still there, but they don’t show up.

I have it here for testing. If you use Firefox and you use eBay you can install it by clicking on this link: eBayVarFix (dumb name).

As an eBay page renders the auctions will initially show up and then as the page finishes they disappear.

Let me know what you think. I need a better name. If it works for a few people I will submit it to the Firefox people for listing on their add-on page.

I made a Chrome version that works, but you have to register with Google and pay a fee to get it published. I might try that when I get a more substantial version, but for now Chrome users are out of luck.

I am looking into an IE or Edge version.

 

SiteGround.com adds backups.

I’ve been using SiteGround.com to host my sites for many years now. I tried other hosting companies with mixed luck. SiteGround is by far the fastest and has the best hosting plan for me.

They’ve just added a comprehensive backup feature to my plan and I am using it daily.

SiteGround Hosting Backup Benefits:
View and manage backups easily with a simple 1-click Backup Tool
Create and restore website backups quickly and easily with one click
Avoid data loss due to website mistakes
Experiment with website updates that you can quickly undo

Check out the new features:
Hosting Backup Landing page:
https://www.siteground.com/hosting-backup

I use the “Go-Geek Plan” for a dozen websites.

Ad block Nag Script

I made a little plugin that loads some javascript that detects ad blockers and puts up a nag box at the top of the page.

It can be found at: Beta test Plugins.

I did not make it configurable, so you have to manually edit the message if you don’t like the stupid one that I put there.

One nice thing is that you can grab just the javascript file after you download the plugin and unzip it, and use it on any page, even ones that are not WordPress pages.

Ad Blockers are continually adding to their filters to prevent this kind of script, but for now it works with uBlock, and that’s pretty good.

 

Notes on my Magento Installation

Notes on installing Magento on my personal computer so it works in localhost.

I have need of an online store, so I am trying to install Magento, which is a leading online store package.

The installation, including sample data is huge. About 500 megs. I will not be able to install it on my hosting company because they have a limit on the number of files and storage space.

I am having trouble installing it on localhost.

The first problem is to edit the .htaccess file and find where they have the magento root.

#RewriteBase /magento/

If you didn’t install it in a folder called magento then the installation won’t run and throws a 500 error.

I commented out lots of stuff, so I am timing out. Try not to change anything else in the .htaccess file.

I keep “trying again” on the install process and each time I get a little further along.

I have the feeling that this may not be a good thing.

One more try and if I don’t make it to the end I will try the version without the sample database.

I gave up and now I am working on the version without the sample database. It takes about 15 minutes to extract the zip on this machine. I think it is time to get a computer that is less than 10 years old.

OK, .htaccess fails with IfVersion directive. This probably means that my version of Apache is too old. I am deleting the section. (don’t do this – see below).

It remembered all my settings and failed trying to load samples. There is a config file hanging out that Magento must have created.

It is a browser cache issue. Something weird is happening. I switched from Firefox to Chrome and got further along. I am guessing that the installation drops a cookie so that a restart of the installation uses old data. This is not good.

It seems to have hung up at 5%. I am restarting everything and trying again.

I will update when I succeed or else give up.

update:

OK. I got things to work. Installation absolutely requires Apache MOD VERSION. In my configuration it is listed as just VERSION. When I enabled it, all the ifVersion errors went away and I was able to load the pages.

I put in the wrong password and locked my account. Because it is running on //localhost Magento cannot send an email reset to me.

Installation, including deleting old installs and databases, takes about an hour. I did the reinstall 4 times today and I’ve had enough.

I’ll try again tomorrow.

 

 

 

Trying out Woocommerce

I’ve decided to make a new WP install on my JT30.com site and use it to sell off my microphones. I have way too many and I need to get rid of them. I see on other sites that they good ones go from $250 to $400, that is if these sites actually get takers at those rates.

I’ve install Woocommerce on my test site and so far I have been able to get the pages working well. I have added to cart, made the purchase and made it all the way to the paypal login. I am hoping that that will do it.

I need to get a nice modern theme (my old jt30 theme is about 25 years old at its heart). I also have to figure out how to combine shipping in a way that it knows I need a bigger box. I got the USPS plugin working OK.

I also hope to test the Woocommerce spam protector and see if it actually works.

 

Static Page Creation

I have some sites that started as static sites. I then started using Blogger.com. I then converted to WordPress. These were hybrid static page sites and blog entries.

My two blogs expanded to eight sites and then I compressed them back into for separate domains.

One site was a complicated site that used a database to generate pages and I used WordPress to manage the theme for all of the generated sites. WordPress itself consisted of only the index page and the rest of the pages had the WordPress theme wrapped around the body of the generated pages. The WordPress wrapper gave me access to plugins and widgets and was very convenient. I used Disqus for comments.

This page https://www.harptab.com has since been converted to all JavaScript page rendering using Angluar.js. I picked up Angular on a contract and I like it, although I pretty much roll my own code and only use Angular for a couple of its more convenient features.

I want to do the same thing with my site https://www.jt30.com. It used to be a blog with lots of static pages, but Facebook has replaced blogging. It has many WordPress pages in addition to posts and I would like to preserve as much of the taxonomy as possible.

JT30.com has static pages, WP pages, WP posts, galleries, PDF libraries, a JavaScript store, and PHP files that use zips to hold text files. The text files are extracted wrapped with the WordPress theme on the fly.

My goal over the next few weeks is to:

  1. Extract all WordPress data and place these in JSON files that can be used to recreate the posts and pages.
  2. Create a JSON file with the permalink as a key to the WordPress pages as a lookup hashmap for recreating the taxonomy.
  3. Extract comment information and save in JSON files keyed by post of page
  4. Discover all static html, htm and shtml files on the site, strip the headers and side panels off and save the data in JSON files in the format of 1).
  5. Update the JSON file in 2) to contain the new static page hierachy.
  6. Find all the PDF files on the site and create a JSON file in format 1) so that they can appear inside an iframe on the website Angular theme.
  7. Add the PDF data to the taxonomy
  8. Discover the generated data contained in zip files and convert to JSON
  9. Add the generated zip data to the taxonomy
  10. Using an htaccess 404 process start an Angular.js process to lookup the missing page in the taxonomy and display it in a theme page.

I have been testing a PHP script to walk the WordPress database and save the Page/Post information to JSON files. This has been easy. The taxonomy is not so straightforward. Luckily, I only used keywords to tag posts sporadically so I can ignore tags. I did not keep posts in a separate “blog” taxonomy so they are mixed with pages. This I have to fix. Static pages were mostly in a folder named “jt30page” from when the website was in a shared hosting site the used a separate folder for each domain. In the main folder there are many “headless” web pages that should be in a taxonomy and need to be organized.

I found many .asp files that I did not know that I had and they have very old content in them. I have to figure out if they are lost files or if they were converted.

When I get a clean taxonomy from the PHP script I will create the pages and posts from WordPress and test them. This will require emulating a blog for the blog posts and using simple links for the pages.

I then have to pass all the static files and create the JSON files for the static taxonomy and incorporate that into the WordPress one that works.

Next I have to extract the zip file texts and create the JSON files for them. This involves 3 or 4 levels of hierarchy and may be tricky.

Test, repeat, test and then publish.

I will post code when it is stable. This will be the PHP scripts to extract the WordPress data, extract the static data and create the taxonomies. It will also include a bare bones Angular index page that can be modified to fit a theme.

Clicking like it’s 1994

I am experimenting with the original banner add that first appeared on websites in 1994.

It clicks through to the amazon page for one of my books.

I am going to keep it up for a few weeks to see if I get an increase in sales. Actually any sales would be an increase.

Retired again

My six months is up at Verizon. At 66 years old, I never fit into the group there. It was mostly young people from India. The Americans mostly worked from home, so I never got to know anyone.
I made about $60,000 without ever actually doing anything, so I can’t complain, even though I accepted the contract below what I usually get.
Since I’ve been off, I’ve already made some changes to my plugins and finished a short story. I have plenty to keep me busy.