Category Archives: WordPress

Site Upgraded

Well, I finally upgraded the site. I have to say I like where WordPress is going with things. I don’t think there are too many changes so far as you the reader goes, but there are lots of changes to the admin areas. If you are running a blog, then I suggest WordPress without reservation.

New Theme

As you may have noticed, I am using a new theme. I really dig the theme. It gives lots of cool options on the front that I seemed to be missing in other themes…
You will notice the featured stories. These are not the newest stories all the time, but just posts I figured were worthy of that space.
There are a lot more ad spaces in this theme. Remember, those are here to help me pay the hosting costs, so please follow them. Same thing with the Amazon links. If you want to buy something from Amazon, click one of the Amazon links first, then find your item and buy it.
There is a bug in the comments, but it isn’t from the theme itselffixed. I hope to have that issue fixed this weekend.

If Your Comment Wasn’t Approved

I use Akismet to block comment spam. For one of the very few times in the last few years of using it, I looked through the comments it caught and I found 3 comments out of 60 or so that weren’t spam.
After a bit of searching on Akismet false positives I am now convinced that a ton of messages may have been marked as spam that were in fact not. My deepest appologies and while I can not recover those lost messages, I will try to change to Spam Karma or something like that.
(Also, if we loose our Internet connection again soon, which is likely, it may be a while before the comments are approved, I’ll try to post that when the site goes down…)
EDIT 1: Now using Spam Karma to do help with the moderating… only a couple hours and already 50 some spams… would hate to see what a blog with higher popularity would have to put up with.
EDIT 2: I am now considering switching from WordPres to Drupal… but will probably wait until Drupal 7 is out before making that choice… and it has little to do with the Spam since that would be an equal problem with both platforms.
EDIT 3: With all the real comments I have had since I turned off Akistmit, I am now sure it was giving TONS of false positives.

Odd Comment Error With WordPress 2.5.1

I just noticed an error with WordPress 2.5.1, which I recently upgraded to.
It says I have 4 comments waiting for approval, but when I go to the screen to approve them it says there are “No comments awaiting moderation… yet.”
Comment Error for WordPress 2.5.1
I have searched Google, I found one suggestion to make sure the comment_date_gmt field is in the wp_comments table, which it is. I turned off Brian’s Threaded Comments to see if it was a conflict with that, no luck, so it isn’t that plugin, which aside from Akismet, is the only comment related plugin I use (I turned that off as well, and no luck either).
I have now tried plugins and problems with the database structure, but no closer to a fix. Anyhow, if you leave a comment, it may be stuck in the que until a fix is found.
EDIT: Forgot to add, it shows there are no comments found if I look in the “All Comments” and the “Approved Comments” sections of the Comments tab as well. Yet, if I check a post with comments, they are there.
EDIT 2: Obviously until there is a solution, I won’t see any comments at all, so if somebody has a solution the result will have to be emailed to r underscore flagg 10 at hotmail.
EDIT 3: The problem is there even with IE, so not a Firefox bug…
EDIT 4: Fixed.
For those having the same issue. First backup your database. Then logon to your cPanel, get to the phpmyadmin screen. Check the index option on the comment_date_gmt field in the wp_comments table.

Intense Debate

Okay, so I have been playing with Intense Debate (ID) for today. Most of the problems I have run into are either problems with compatibility with my theme, or other plugins.
For example, my theme used to put a little gif on the sidebars for list items, however, I had to turn that off for now as when I put up Recent Comments on ID, it had that gif at a bad spot on all of them. So for now, until I figure out how to override the theme’s default on just that small section, this is calling for CSS above my norm, it seems all I need to do is set the script that adds the recent comments inside a div tag and id it with something, then in the theme’s CSS override the li placement of the gif, but none of the stuff I tried works yet, so for now the gif is gone, which honestly is okay, the thing looks fine. Odds are I’ll have to make a separate CSS for it, then let the ID system know where that CSS file is, and have that override the gif placement. More trouble then I want to go through.
Another problem is that it doesn’t work yet with the code highlighter plugin I use…or the plugin doesn’t work with the ID… time will tell on this one, I contacted both ID and the author of the plugin to see where the problem may lie. I suspect the problem may be on IDs end, and that they’ll just have to add a code highlighter themselves. This is fine since there was little code on any comments.
Importing old comments doesn’t seem to work from my old WordPress posts to the new system. I would need it not only to import them, but to keep the names if possible, a sort of self validate process.
The only other problem is that trackbacks doesn’t seem to show up.
Aside from those issues, and of those only the importer not working is of any size so far as I am concerned for the moment. It is a very good system and I recommend everyone upgrade to it. Of course we’ll see how it handles Spam and if they use Askimet or something like that.

Fixing GStyles

I am working on fixing the theme I am using, GStyles (available here) and trying to make it work with WordPress 2.3.
So far I have fixed index.php and singles.php.
Here is an original code snippet from singles.php (sorry, the code runs over the edge, the theme is fixed width so it runs over… I might make this column flexible in due time, one thing at a time… or see if there is a “word wrap” feature in the program highlighter)…it should be the same in index.php:
[php]Category: | |‘); ?>

This was fixed in my new version to look like this:
[php]Category: | |‘); ?>
‘); } else {echo “Tags: None”;} }?>
‘; } ?>
That should allow it to fall back to UTW if somebody is still using an older version of WordPress. However, I don’t have an old install to test it on, but near as I can tell it should be good.
I am now working on fixing the functions.php and finding a fix for the post2cat problems in it.
The problem with GStyles in WordPress 2.3 as it stands now also comes from the following in singles.php:
[php]No related posts


} else {

echo ‘





The fix is simple enough for now, just take that bit out. It kills the Related Posts function, but cattag_related_posts needs the post2cat. Now that is the part that may be past my programming experiences so far… then again, I did figure out how to get the rest working.

Scripturizer is Out There

I managed to find the new repository for Scripturizer, and it does work in WordPress 2.1, which the older version did not for some reason. I am using version 1.6 Developer. A few changes to make…

Line 75:

Needs changed to say:

This is a minor cosmetic change, but makes the options page show the correct version.

The big fix is lines 425 to 429 which look like this:
[php] //***** Begin WSC hack
if ($book == (‘WSC’ || ‘Westminster Shorter Catechism’) ) {
$bible = ‘WSC’ && $translation = ‘WSC’;
//***** End WSC hack[/php]
This needs commented out, otherwise it will come out as the Westminster Shorter Catechism regardless of what you chose as the default.
[php]// //***** Begin WSC hack
// if ($book == (‘WSC’ || ‘Westminster Shorter Catechism’) ) {
// $bible = ‘WSC’ && $translation = ‘WSC’;
// }
// //***** End WSC hack[/php]
Technically you don’t need to comment out the lines that are already comments. I can’t see yet why it defaults to the WSC when it goes through this block the logical operators seems to be correct but if we just take out the OR logical operator it works again as well, so I don’t know what is going on, as in the below code:
[php]//***** Begin WSC hack
if ($book == (‘WSC’)) { // || ‘Westminster Shorter Catechism’) ) {
$bible = ‘WSC’ && $translation = ‘WSC’;
//***** End WSC hack[/php]

Back Online

As you can see, I am back online. I think the total downtime was less than 30 minutes, mostly to wait for my FTP client to delete all the old files from the server and than upload all the new ones. I am not sure why the deleting of the files took so long.
Things that are not back. The Bible Verse plugin that finds a Bible verse in the post and generates a link automatically. This plugin doesn’t work with WordPress 2.1. Perhaps I’ll look at the plugin myself. I fixed one problem with it once before which was put into the plugin by the author. If, and that is a big if, I get around to it and fix it, I’ll post up the code.
Speaking of code, some old code blocks may not work properly, but most should be okay.
Things that are back. My Now Reading list is back, that seems to be about it… 🙂 That was gone for a long time. Either the upgrade to 2.1 or upgrading the sidebar widget plugin fixed a problem I had with it. There is an odd problem on a book’s individual library page, where the sidebar appears below the end of the book entry, but still in the sidebar.
There are some new features that I may show off soon as well.
EDIT: Internet Explorer seems to make the tag cloud on the side funky, it kind of pushes them together too much. However, it works fine with Firefox, which you should be using anyhow (unless you are using Opera, which is also okay… or Safari if you are a Mac OS X user, although I haven’t tested with those two… don’t have a Mac for the latter anyhow).

Comment Spam

While upgrading the site, I had to turn of Akismet for a few minutes, in that time 2 comment spams slipped through. In the short time it has been installed over all, it has caught 14,467 comment/trackback spams. I have to say, I am glad I am not doing the spam tracking myself, since it seems a ton come every day. I would hate to see how many comment/trackback spams a busier site than this one gets.

WordPress 2.0.5 302 Not Found Error

I recently upgraded to WordPress 2.0.5 but kept getting the following error:

302 Found
The document has moved here.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

That is the error in Firefox, apparently the error in IE shows up as:

Internet Explorer cannot display the webpage

Most likely causes:
– You are not connected to the Internet.
– The website is encountering problems.
– There might be a typing error in the address.

If you get this error, please be sure to email me (link should be on the right in the menu somewhere) and let me know what you were doing when you got the error, things seem okay here.
For those having the same problem with their upgrade or install of 2.0.5 go on below the break.
Continue reading WordPress 2.0.5 302 Not Found Error

Trying to Write My Own Widget

Calling all WordPress Widget experts, I am trying to write my own widget, but I am not having luck. I get it to show up in the plugins and activate it, but it doesn’t show on the widget list.
I know about Chris Johnson’s Tag Cloud Widget, but the cloud doesn’t show for one thing, and the other is that I don’t want it weighted, I want it shown in alphabetical order. It shows the title and nothing more using his… Okay, I got it to display by changing the display from 1 to 50, but that doesn’t do a display all like 0 was supposed to do… Okay, I also got it to display in alpa order so I guess the code below is moot. 🙂
The code appears below the break, with a few comments after the code.
Continue reading Trying to Write My Own Widget

More PHP Editing

I edited the PHP on the WP-Amazon Plugin for WordPress. I wanted to achieve two things. One, when adding an image, I wanted the text to follow it. Two, I wanted to have it display the name of the product in the title attribute of the link, that is, when one hovers over the link, I wanted the title to display, rather then the default of “View product details at Amazon”.

Here is the new improved code:
[php]function generateHTMLCode(format,prodname,url,imgurl) {
if (format==’link’) {
html = ‘‘+prodname+’‘;
} else {
html = ‘'+prodname+'

htmlCode = document.getElementById(“htmlcode”)
htmlCode.value = html;

Here is the old code so one can find it. It should be around line 190 or so (for version 1.3.2 anyhow)
[php]function generateHTMLCode(format,prodname,url,imgurl) {
if (format==’link’) {
html = ‘‘+prodname+’‘;
} else {
html = ‘'+prodname+'‘;
htmlCode = document.getElementById(“htmlcode”)
htmlCode.value = html;

I am still looking for a way to change the link to a more basic link, so Amazon’s new Product Preview will work properly. However, for some reason I can’t figure out where it is making the full link…

More on Tags

You will notice the tag cloud, just below the Flickr pictures in the sidebar. These replace the old categories that I used before. You will also notice that the more entries a tag has, the bigger it is. (Presently they are in order of number of posts, but they may move to alphabetical later on.)
Since few people visit this site regularly, most find it via Google searches and the like, it makes more sense to use a tag system than a traditional category/archive system that I was using. It all makes it easier for people to find what they want. I have kept archive (time) based navigation on, for those who want to use it, but tag browsing may be best for those just casually visiting.
I haven’t given up on categories all together, rather I have just added tags to the posts, and all categories are automatically turned into the tag of the same name.
For all of my tag handling needs I use Ultimate Tag Warrior. To make it work with Canvas, I used Stuart’s UTW Tag Cloud.

RE: Open Letter to WordPress Theme Designers

Open Letter to WordPress Theme Designers is an excellent, well, exactly what it says, open letter to theme designers. I would add to that, don’t hard code the date/time stamp into the theme. If you have a specific way you want it to be seen, make it the default in the theme’s option page, which as they note, should be included. The option page should allow the theme designer’s default, the one set in WordPress.
If making the theme Canvas compatible doesn’t break regular WordPress compatibility (I’ll have to ask the Canvas people), then I would also add, make it Canvas compatible.
Now, what I want is a Kiwi Version 3.0, where I have a sidebar on the left as well as the right… With the rest matching the above. 🙂 Actually, I really like Tarski, the theme I am using at the moment, though I sometimes like having 2 sidebars.

Title change from FW to RE since I didn’t include the full text of the original, so it isn’t really a forward…

Canvas Blocks

EDIT: The issue below will be fixed in Canvas.
Just a quick little thing I learned while making some blocks for Canvas today.
When putting in the description, if you use an apostrophe, you will need to escape it. That is, you will need to put a backslash in front of it.
For example, I made a block so I could use the Now Reading plugin without having to edit the sidebar.php file.:

Now Reading

Notice line 8 has the backslash apostrophe (‘) so the block will load and be available.
Thanks to Yas over at the Canvas forums for letting me know the apostrophe was the likely problem when the blocks wouldn’t load (in this thread).

More Canvas

Canvas, as I mentioned before, is a new plug-in for WordPress. It allows for the easy modification of specialized Canvas themes (as of this witting there are only 2 publicly available). What is basically does is takes the concept of sidebar widgets and takes it to the extreme and makes nearly everything on the page a widget, with many of those customizable from there.
Once theme authors make a few more Canvas themes, I think it will really take off. The power and flexibility offered by Canvas can’t be beat. Now if somebody would make my Sudoku Generator Plugin and make it available as a Canvas block all would be well.