Archive for June, 2004

Some important plugin updates:

Wednesday, June 23rd, 2004

I put that list of recently updated posts in the sidebar - but wanted to make sure these got noticed since they’re more important. In some cases the changes were only minor - but in others the changes were much bigger. Either way, if you use these scripts, get the latest version:

Today in weeks/months/years past

Show Hide “more” with WordPress
WP Subscribe To Comments

Better Comment Moderation

Wednesday, June 23rd, 2004

For sometime now, I’ve been saying a better way to have comment moderation would be allow comments from “regular visitors” come through right away, and everything else get moderated. This way - it takes the burden of moderating ALL comments off the blog author, and takes away any kind of “hoop jumping” your would-be commenters have to do - especially with the ones that comment regularly. Most spam preventions “punish” these people the most.

Of course, I’m too lazy busy to write the script - but I’m so glad that someone else did! :)

Kitten’s Friendly Comments

I’ve actually had very good luck thus far with the simple spam words in WP - but as soon as that starts to fail more seriously - I will definitely implement something like that.

Show recently edited/updated posts

Tuesday, June 22nd, 2004

I’ve been going back in and modifying some existing posts - and I thought it would be useful to see a list of posts that were recently edited.

This function would go in your my-hacks.php file. I created it quickly for my own uses - wanted to keep it here for “code storage” - but you will probably want to customize the code so that it does what you want it to.
(more…)

Comment Highlighting (based on author)

Monday, June 21st, 2004

Monty asked about comment highlighting based on author.

Even though this isn’t a plugin, I thought this could work similar to the way I was doing comment highlighting
(more…)

Display all posts grouped by date

Monday, June 21st, 2004

This function will list all posts, and group them by day. If you want to use it - add it to your my-hacks.php file. (See more information on how to use my-hacks.php here - link via Carthik)

Again - I made this function specifically for a personal use - so there’s not a lot of ‘easy customization’ without specifically editing the code, so I apologize for the lack of ease-of-use - but I wanted to post this for my own “code storage”.
(more…)

Separating Comments and Trackbacks

Monday, June 21st, 2004

Some habits are hard to break. In the MT world - comments and trackbacks are different animals. Maybe just because I’m used to it that way - but that’s the way I prefer it. A trackback/pingback isn’t a complete thought. Comments (usually) are. When reading the comments section, I find it disrupting to see a trackback in the middle of the discussion. When I’m ready to leave the site and read another opinion, I will.

Ok, I’ll get off the soapbox now. Greg asked me how I separated the comments and trackbacks on this site. Here’s how:
(more…)

Today in weeks/months/years past

Sunday, June 20th, 2004

The idea of this plugin was to create a version of this for WordPress. I am aware that there is another similar script - but I didn’t want the actual posts pulled in - just the link to go see the posts for that day in the past. As well - I wanted to use it outside the WP Loop.

Current Version: v 2.0
Last updated: 11/17/04 10:37pm

So here’s the plugin - installation and use are pretty simple:
(more…)

Import MT bug fix

Friday, June 18th, 2004

A HUGE HUGE thank you to Carthik who made a fix to the current import-mt for me because of some issues I had when I imported my MT entries. (I’ve since deleted all the imported entries - and used his new version to re-import them and now everything is beautiful again!) :D

The only drawback is that any “new” comments/trackbacks on those old posts have been lost. I apologize for the inconvenience of that. I don’t think there were all that many. It was either that or have two years worth of scripts be very messed up.

Until the fix is included in a specific release - here is the fixed import-mt.php that Carthik sent me.

PHP: working with multiple databases

Tuesday, June 15th, 2004

I’m in the process of moving a few other blogs over to use WP - one of which makes calls to a seperate database unrelated to WP. This proved to cause a conflict. After many hours of trying to figure out where the specific conflict was - I narrowed it down to my mysql_select_db line. Apparently selecting your database this way - even if you close your mysql connection - and then select a different database later on - it can cause you headaches (and make you stay up later than you had intended to) LOL! =Yawn=

The remedy was specifying the databasename when referencing the table and avoiding using the mysql_select_db line altogether.

So instead of code that looked like this:
$databaseConnection = mysql_connect($databaseServer, $databseUsername, $databasePassword) or
die ('I can't connect to the database.');
mysql_select_db($databaseName,$databaseConnection);
$query = "SELECT * from tablename;";
$result = mysql_query($query);

I changed it to this and it seemed to work:
$databaseConnection = mysql_connect($databaseServer, $databseUsername, $databasePassword) or
die ('I can't connect to the database.');
$query = "SELECT * from " . $databaseName . ".tablename;";
$result = mysql_query($query,$databaseConnection);

Removing “curly” quotes

Monday, June 14th, 2004

I’m not a big fan of the “curly” quotes. Wordpress does them automatically - but this can really mess you up if you’re copying and pasting code from a post. So I’ve turned them off…

As seen on this thread on the WP support forum - I’ve commented out all the lines at the end of vars.php (found in your includes folder) that look like this:

add_filter(’the_SOMETHING‘, ‘wptexturize‘);