Random Musings of Brian A. Thomas. Love for Ari and Sidd.
WordPress
Site Upgraded
May 22nd
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
May 21st
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.
Probably Going Silent Soon
Aug 25th
We likely will loose our Internet connection for a while until we can get caught up on all our other bills. So I probably won’t be able to make any posts for a while or approve comments (or watch for ones that got marked as Spam on accident). I should still be able to check my email once in a while at work.
Odd Firefox 3 Bug on This Site
Jul 6th
If you are using Firefox 3, such as we are, some parts of this site are may not rendering properly. None of the videos are showing up. They show up with Internet Explorer or if you use IE Tab on Firefox. Hopefully a fix will be found… Not sure if it is a WordPress issue or a Firefox issue, or a plugin issue yet.
Intense Debate Off for the Moment
Dec 29th
I turned off Intense Debate for the moment.
It will return.
Meanwhile, in unrelated news, it seems over half the Internet isn’t available to us at the moment. Road Runner must be having big DNS issues. I can guarantee if I called about it they would say they weren’t having any issues.
Intense Debate
Nov 11th
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
Oct 12th
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:
-
<small>Category: <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?> <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?><br />Tags: <?php if ( (function_exists('UTW_ShowTagsForCurrentPost')) ) { ?>
-
-
<?php UTW_ShowTagsForCurrentPost("commalist") ?>><?php }?></small>
This was fixed in my new version to look like this:
-
<small>Category: <?php the_category(', ') ?> <strong>|</strong> <?php edit_post_link('Edit','','<strong>|</strong>'); ?> <?php comments_popup_link('Leave a Comment', '1 Comment', '% Comments'); ?><br />
-
<?php if(function_exists('the_tags')) {$my_tags = get_the_tags();if ( $my_tags != "" ){ the_tags('Tags: ', ', ', '<br />'); } else {echo "Tags: None";} }?>
-
<?php if(function_exists('UTW_ShowTagsForCurrentPost')) { echo 'Tags: ';UTW_ShowTagsForCurrentPost("commalist");echo '<br />'; } ?></small>
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
-
-
if ( is_single() or is_page() ) {
-
-
-
$relatedposts = cattag_related_posts();
-
-
if ($relatedposts === false) {
-
-
// echo '<p>No related posts</p>';
-
-
} else {
-
-
echo '<div class="related-posts">
-
<h2>Related posts:</h2><ul>' . $relatedposts . '</ul>
-
</div> <!-- [related-posts] -->';
-
-
}
-
-
}
-
-
}
-
-
?>
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.
Tag Suggest Thing
Oct 12th
With WordPress 2.3 doing away with Ultimate Tag Warrior and having tags built in, it lost the ability to do suggest tags for you. Christine From The Internet, the author of UTW, now presents Tag Suggest Thing, which brings the tag suggestions back to WordPress 2.3.
Scripturizer is Out There
Feb 3rd
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:
-
<h2><?php _e('Scripturizer 1.5a', 'Scripturizer'); ?></h2>
Needs changed to say:
-
<h2><?php _e('Scripturizer 1.6 Dev', 'Scripturizer'); ?></h2>
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:
-
//***** Begin WSC hack
-
if ($book == ('WSC' || 'Westminster Shorter Catechism') ) {
-
$bible = 'WSC' && $translation = 'WSC';
-
}
-
//***** End WSC hack
This needs commented out, otherwise it will come out as the Westminster Shorter Catechism regardless of what you chose as the default.
-
// //***** Begin WSC hack
-
// if ($book == ('WSC' || 'Westminster Shorter Catechism') ) {
-
// $bible = 'WSC' && $translation = 'WSC';
-
// }
-
// //***** End WSC hack
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:
-
//***** Begin WSC hack
-
if ($book == ('WSC')) { // || 'Westminster Shorter Catechism') ) {
-
$bible = 'WSC' && $translation = 'WSC';
-
}
-
//***** End WSC hack
Back Online
Jan 28th
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
Dec 27th
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
Dec 27th
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.
More >
Trying to Write My Own Widget
Dec 24th
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.
More >
More PHP Editing
Aug 2nd
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:
-
function generateHTMLCode(format,prodname,url,imgurl) {
-
if (format=='link') {
-
html = '<a href="'+url+'" title="Amazon.com - '+prodname+'">'+prodname+'</a>';
-
} else {
-
html = '<a href="'+url+'" title="Amazon.com - '+prodname+'"><img src="'+imgurl+'" alt="'+prodname+'" /></a><br />'
-
+'<a href="'+url+'" title="Amazon.com - '+prodname+'">'+prodname+'</a>';
-
}
-
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)
-
function generateHTMLCode(format,prodname,url,imgurl) {
-
if (format=='link') {
-
html = '<a href="'+url+'" title="View product details at Amazon">'+prodname+'</a>';
-
} else {
-
html = '<a href="'+url+'" title="View product details at Amazon"><img src="'+imgurl+'" alt="'+prodname+'" /></a>';
-
}
-
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
Jun 12th
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
Jun 5th
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
Jun 4th
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.:
-
<?php
-
-
/*
-
Block Name: Now Reading
-
Version: 1.0
-
Block URI: http://robm.me.uk/projects/plugins/wordpress/now-reading/
-
Author: Rob Miller
-
Description: Uses Rob Miller's Now Reading Plugin
-
Group: Wordpres
-
*/
-
-
?>
-
<div class="Now_Reading">
-
<h3>Now Reading</h3>
-
<?php nr_display(); ?>
-
</div>
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
Jun 4th
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.







If Your Comment Wasn’t Approved
Aug 23rd
Posted by Brian A. Thomas in WordPress
No comments
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.