Archive for July, 2004

Google Hi-Lite fix

Sunday, July 4th, 2004

Peggy emailed me about a problem I was having on this site with the Google Hi-Lite plugin that’s included with 1.2. She did all the searching to find the fix the problem (which was posted on huddledmasses.org here ) (So all credit for finding this goes to her) Certain searches (I think ones that contain a backslash - you know how WP eats these for breakfast) ;-) will cause errors on the page.

Here’s what you need to do to fix it. Look for these lines (should be Orig lines 104, 105, 106, 107)

if (!preg_match(’/<.+>/’,$text)) {
$text = preg_replace(’/(b’.$term.’b)/i’,'<span
class=”hilite”>$1</span>’,$text);
} else {
$text = preg_replace(’/(?<=>)([^<]+)?(b’.$term.’b)/i’,'$1<span
class=”hilite”>$2</span>’,$text);

Change those lines to this:

if (!preg_match(’«<.+>«’,$text)) {
$text = preg_replace(’«(b’.$term.’b)«i’,'<span
class=”hilite”>$1</span>’,$text);
} else {
$text = preg_replace(’«(?<=>)([^<]+)?(b’.$term.’b)«i’,'$1<span
class=”hilite”>$2</span>’,$text);

Force Valid Email Addresses

Friday, July 2nd, 2004

In WordPress, you can enable an option that requires commenters to supply a name and an email address, but oddly enough, it doesn’t validate the email address submitted. This is simple enough to add, as WordPress already has a function for validating email addresses, and because it can be done via a REALLY simple plugin.
(more…)

WP Moblog hack

Friday, July 2nd, 2004

Got a new PC-Phone - this one comes with a camera. So I’ve been looking for a way to do moblogs with WP - and found this:

Space Monkey Mafia - Moblog Hack

(Haven’t tested it out yet - but probably will tonight) Works like a charm! :D One note if you try to use this script (a mistake I made, someone else might make the same…) in smm-getPop.php, there’s a line you’re supposed to edit for $tmp_folder - it doesn’t say this - but this is the server path to the temp folder… :)

Add a “remember me” checkbox to the login form

Thursday, July 1st, 2004

Neil had asked about adding a “remember me” checkbox to the login form. The idea here is that if you’re really forgetful (like me! Ack!) and you know you’re really forgetful - and you know you’re probably going to forget to “logout” before closing your browser - if you don’t click the “remember me” checkbox - then when you close your browser, you will be automatically logged out of WordPress. (This is good when you’re working on a shared computer)

It does require some core WP editing - minor tweaks to just the wp-login.php page - but wanted to warn you up front (I have to apologize for the core edits. I’m more than welcome to hear suggestions of how one can do this WITHOUT doing the core editing - but I just can’t come up with it)
(more…)