Archive for the ‘Site Admin’ Category

_GET['cat'] Doesn’t Work With Permalinks

Saturday, January 3rd, 2009

My sidebar shows different content based upon the category that you are viewing at the time. There are so many links that I want access to that I had to break out the big categories like bicycle and garden into their own subpages.

The other day I switched to using permalinks for the URL. This replaces the URLs like this:
WordPressSS/?post_id=763
With URLs that look like this:
WordPressSS/2008/12/22/penny-stove/

This caused a big problem with showing different sidebar content based on the category. The category used to be passed in through the query string and you get it with _GET['cat']. Permalinks don’t use query strings.

To restore functionality, you need to replace “current_cat = $_GET['cat'];” with
$category = get_the_category();
$current_cat = $category[0]->cat_ID;

It would seem the permalinks can handle multiple categories, because get_the_category() returns an array. This might be useful for some feature I can’t image. Perhaps a sidebar for a tab to show Programming+Computers+Technology content.

Changes to the Bike Log

Wednesday, December 31st, 2008

Years ago when I was on the Atkins diet and exercising every day I had a little log book. This is a surprisingly simple and cheap motivation. It sucks to look back and see missing entries, I don’t feel guilty at the time, and I like recording big numbers. So, when I started training last summer I did the same thing on the blog. Later, this turned into an exercise log.

Keeping this on the blog is pretty kludgy. I have to copy and paste the last line then edit it. Changes to the table structure like adding new columns or colorization takes a massive amount of effort. It’s good for one thing, adding one line at a time.

I hoped to fix this with some WordPress plugins like WP_Tables, but these are almost as kludgy and are not easy to add one new row. If there’s one thing WordPress does exceptionally bad it’s table data. You can’t just paste in cells from an Excel spreadsheet or quickly mock up a 3 X 4 simple table. This is really too bad as spreadsheets are one of the little known foundations of the digital age.

The Recent Book list is nearly as bad. It’s not a table, but has many common elements and new books are added the same way as the Bike Log. A while ago I added book covers to the mouse hover event. This took a couple of hours.

For some reason, I got the idea on Sunday of writing a Windows app to manage the data and spit out a formatted HTML table that I could just paste into the blog. It took about 6 hours to put together a basic app that would read existing data, write it to a new file format, and spit out an HTML table for the blog. Editing, adding, and removing entries were still done by editing the text file, but that was about the same as the blog anyway. The table got an immediate improvement in appearance that was worth the trouble. Over the past few days I’ve added other basic features along with a few more columns.

I would like to add a bit of analyzation too; things like weekly, monthly, yearly mileage, comparison to past performance in events, and fancier HTML. And to address the other annoyance of the Book List. It would be nice if this were in WordPress as a plugin. My interest can wane overnight and it’s better to have a process that works at the end of each improvement session. PHP, MySQL, WordPress development on a remote box would take too long.

Site Changes

Sunday, October 12th, 2008

I’ve been upgrading the blog further with plugins and customizations. This weekend it became more searchable by changing the post URLs from using sequential numbers to words that search engines are interested in. The recent book list has popups for the book covers now. Other plugins have yet to be implemented. Making polls, making tables in posts, and redoing the workout log.

Ideas for the website

Wednesday, September 17th, 2008

1.
News based on separate, specific list of RSS feeds, combined to appear as “one” hourly, daily newspaper. A place to go for recent Bicycle news. Something I could use. A top 5 snippets on the sidebar.

Mashing Up Feeds Using Yahoo Pipes

2.
News from many feeds filtered based on certain keywords to sort or generate a new feed. A list of keywords shift certain stories to the top. For example, to get the release notifications, defects, betas, changes, etc.

3.
Making a post, like an essay, stick around longer. Some content is just commentary or transient, “look my new MacBook Pro came in” But a few articles are longer and well thought out.

How to Make a Featured Post Carousel for WordPress

Blog Upgrades

Saturday, September 13th, 2008

This morning I upgraded the blog to WordPress 2.6.2 and I’m trying to change the appearance to something more suited to my interests. Currently, all the posts are in one stream. For persistent items, I make a page on the side. However, there are getting to be more pages and more pages that I would like to add that don’t seem appropriate for the root page of the website. Pages that would be more suited to a particular topic.

The topics that I want to have are based roughly on the tags; rambling, bicycling, apple/mac, house projects, news, and gardening. I would like my bicycle items, for example, to stay closer to the top, but the current home page is correct in how it works. So, if I give them their own space the website can filter and organize them to represent my interests more accurately.

Trojan Removed

Wednesday, July 2nd, 2008

After pouring over the code the trojan has been removed from the website. The StephenSite blog can no longer infect Windows computers.

It seems this started on April 9th. If you looked at this website on a Windows computer, Firefox or IE, since then you should run a virus and malware scanner.

Thanks to FireFox 3 and the corporate virus scanners for catching this.

Blog Updates

Wednesday, July 2nd, 2008

There has been a trojan on the Stephen Personal Blog for a month or more. It only affects Windows computers, which is why I never noticed. Firefox and IE are vulnerable. The blog has been upgraded to the latest WP. However, the malicious code has been placed, it seems, in a php file and I have not yet found that. For now, a broken theme comes up the best, because it crashes before rendering the malicious code.

WordPress 2.5

Thursday, May 8th, 2008

I’ve been using WordPress 2.3 for a while. The new blog is 2.5 and I got say it rocks. This is one of the easiest and most customizable pieces of software I have ever used.

Garden WebSite Under Construction

Thursday, May 8th, 2008

Last year I wrote in a Garden Blog, but I’m needing more this year. More permanence for Plant Files, particularly rare varieties, a place for the garden calendar, and a place to journal or blog. Since Google seems to be keen on picking up things from my blog on topics that kind of fall in between the cracks, I thought I would make it a sub of my blog. Hopefully, others find it useful and it can become a hub for many gardening topics. What I’m particularly interested in are the topics that are difficult for me to find information; growing things in the Texas Panhandle soil, low water gardens, local suppliers and producers, rare and unusual varieties of plants, info on bugs, etc.

I also want to get a Weather Station that will attach to the computer to automatically log wind, rainfall, temperature, humidity, and pressure. So, that I can correlate these with plant yields. The more expensive varieties have many wireless sensors. This seems excessive until you consider the ability to monitor above the canopy, below the canopy, and several different spots in the yard. In effect logging the various microclimates. This would be extremely useful information. After all, I’m most interested in the interactions between plants that create such microclimates.

Wordpress is installing now. I looked for a different Content Management System (CMS), but none of them seem suitable. I have modified WordPress many times. Perhaps, I can hammer it into place to fulfill my needs.

None of the themes so far seem to fit the bill. One will most likely have to be heavily modified. I don’t look forward to this. It’s very time consuming. My needs are pretty specific here and a blog isn’t a good match, but the other choices seem confusing and excessive.

I would like this to be an excellent resource that shows up easily on Google for myself and my fellow dryland, cityfolk gardeners dealing with the thick muck that grows our landscapes and fruits and vegetables.

The link is Stephen’s Garden.

WP-Cache

Thursday, April 24th, 2008

I added WP_Cache to the blog. It’s supposed to cache the most commonly hit web pages to make the site faster. Right now, it’s running pretty good. We’ll see what happens one of these times when the server seems to slow down. Cross my fingers that the 90 second page loads are gone.

CH: Behold WordPress, Destroyer of CPUs

Wednesday, April 23rd, 2008

Jeff Atwood has a post about making WordPress faster. This is a big concern for my blog, which several degrades at times, but for which I can get no performance data for the machine. He is hosting a new blog locally and measuring the CPU under Win2K8.



For a bare-bones blog which is doing approximately nothing, this is a completely unacceptable result. It’s appalling.

As evidence of what a systemic problem this is, there’s an entire cottage industry built around shoehorning better caching behavior into WordPress. Take your pick: WP-Cache, WP-Super-Cache, or Bad Behavior. The caching add-ins don’t work very well under IIS because they assume they’re running on a *NIX platform, but they can be coerced into working.

Does it work? Does it ever. Here’s what CPU usage looks like with basic WP-Cache type functionality enabled:

About the Oxytocin blog post

Tuesday, April 15th, 2008

So, I got a real comment, not spam, on the Oxytocin post. This is kind of like getting the post from the lawyer on the toxic fertilizer post. I plugged in ‘oxytocin ecstasy’ to Google and my blog is the 8th link on the first page.

Again, there are “holes” where the search terms don’t find anything particularly useful. This is something that could be exploited and I think it is how my tiny blog moves up to the top.

WTF

Tuesday, February 12th, 2008

What’s up with the site double printing all the posts!!! This used to happen rarely and now it’s all the time. Arggh! and not the pirate “Arggh”.

The Purina Diet

Wednesday, January 9th, 2008

Patience sent this. I’ve seen it before, but it was just as funny the second time.

I was in Wal-Mart buying a large bag of Purina for my dog and was in line to check out. A woman behind me asked if I had a dog……..

Duh!

I was feeling a bit crabby so on impulse I told her no, I was starting The Purina Diet again, although I probably shouldn’t because I’d ended up in the hospital last time, but that I’d lost 50 pounds before I awakened in an intensive care unit with tubes coming out of most of my orifices and IV’s in both arms. Her eyes abo u t bugged out of her head. I went on and on with the bogus diet story and she was totally buying it. I told her that it was an easy, inexpensive diet and that the way it works is to load your pockets or purse with Purina nuggets and simply eat one or two every time you feel hungry. The package said the food is nutritionally complete so I was going to try it again. I have to mention here that practically everyone in the line was by now enthralled with my story, particularly a tall guy behind her. Horrified, she asked if something in the dog food had poisoned me and was that why I ended up in the hospital. I said no…..I’d been sitting in the street licking my …. paws…. when a car hit me.

I thought the tall guy was going to have to be carried out the door.

Your smile for the day. Think about this the next time you’re standing in line at Wal-Mart.

Google Webmaster

Sunday, October 21st, 2007

There was an unusual post on Techmeme friday that caught my attention. It was one of the few that was on the main page for a very short time. Following it, I discovered Google Webmaster. It is stunning.

When you search in Google and then click on a link it is recorded by Google. In addition, Google makes a copy of your website every so often. Google Webmaster makes this information available to you. To see it, logon or make an account. Enter your website address, then follow the instructions to verify your website. This consists of modify the main website by adding a specifically names 0 length file or adding a hidden meta tag. That will confirm that you have write access to the website. For example, there’s no way I could see the entries for Ars Technica.

The information you will see describes how people are finding your website, the links other websites have to you, links your website has to itself, and any problems Google has with reading your website. I did this for StephenSite.net and StephensGarden.Wordpress.com. Though, the latter requires a bit of a hack; adding a page with the name Google specifies, instead of a file.

So, what does it show?
screenshot

screenshot

screenshot

screenshot

screenshot

For months, I’ve been getting comments about the post I made concerning the Swedish Grandmother getting super high speed Internet. These are from people I’m not familiar with. Sometimes I let the comment go on, but sometimes I think it’s spam. After all, once I allow one of person’s comments to go on, they can post again without require me to explicitly allow it. It turns out there’s not spam. A weird aspect of the Google algorithm has pushed my blog post high on the search results. This really gives me hope that this blog will find a broader audience besides Suzie, Christopher, and Anthony.