moeffju.net

Plus is valid in e-mail addresses, dammit!

I hate sites that have absolutely broken validation of fields. Whether they require you to enter your credit card number without spaces (because stripping spaces is SO HARD!), expect dates in the brokenest format ever (MM/DD/YYYY, cue the angry Amurricans) without telling you, or disallow special characters in the password(!)… but my favorite would have to be those sites that throw an unfriendly “Your e-mail address is invalid” at you when you enter an address containing a + sign.

Dear site admins, validator programmers, and whatnot: In most cases, I don’t even want to register for your site in the first place, so if you’re going to force me, at least don’t make it harder than necessary! Read the damn RfC! If you block plus signs in e-mail addresses, that means that instead of just using one mailbox and any number of plussed aliased, I have to log in to my server, edit the virtusertable, rebuild it, and reload sendmail.

Unless your page is really valuable for me, chances are that I won’t bother.

Not so ultimate WordPress 2.2 tags

**Update:** I forgot to mention that you must hack a core file and adapt your theme, too. See the end of the article.

Upgrading to WordPress 2.2 bleeding edge is an adventure, always. Not necessarily because they introduce new bugs—it’s the new features that are sometimes worrying. When one svn up changed all the feeds from somewhat-valid RSS to invalid Atom, I didn’t complain because, hey, it’s the bleeding edge, and Atom is so much better anyway. I just fixed the bug, and it was good. (In retrospect, I should have sent a patch. I forgot.)

Having tagging functionality in the WordPress core is a good idea, too. In general. Basically. However, if there already exists a widely-deployed tagging plugin—and for WordPress, one very much does exist—it may be a good idea to look at the functionality and semantics of the existing plugin before reinventing the wheel, badly.

UTW has a function named is_tag(). WordPress 2.2 adds a function of the same name. Ergo, things break. Renaming the plugin dir helps, but your tags are gone. Re-activating the plugin shows you the shiny new plugin sandboxing (which, btw, Habari started in January), but doesn’t bring you back your tags.

Some searching might point you to the UTW tags importer (Options > Import > UTW). After a funny message about deleting unwanted tags from the UTW management page (hey, no plugin, no options page, okay?), the import kinda works. The “Did we say 5 steps? We meant 4. Ha ha ha.” joke is getting pretty old pretty fast, though. Then, instead of the UTW_ShowTagsForCurrentPost() function, you use the_tags() in your template. Of course, the semantics of the_tags() are slightly different from those of the_category(), and completely unlike the old UTW functions semantics.

So I decided to get UTW back. Despite claims to the opposite, the changes required are actually pretty simple: open ultimate-tag-warrior.php and search for occurrences of is_tag(. Replace all occurrences with UTW_is_tag(. Activate the plug-in.

Update: Do the same in your theme - where you use is_tag() now, change it to UTW_is_tag(). Then, open wp-includes/rewrite.php, search for the function get_tag_permastruct, and add return false; directly after the opening brace. (This unbreaks /tag/ pages.)

Done.

Are WordPress Quicklinks unclean?

In Changeset 4349, WordPress 2.1 lost the “jump to preview” / “jump to post” links. Aside from being damn useful, that changeset also broke the Kill Preview plugin.

Funny enough, the changeset log message was “Some UI cleanups, changes, and various miscellany.” So useful quicklinks that save a lot of scrolling are now ‘clutter’?

*reverts the changeset and complains*

Snap Preview Everywhere!

Are Snap.com actually paying people a lot of money, or why would wordpress.com think it’s a good idea to enable Snap Preview Anywhere on all wordpress.com blogs?

WP Add Meta Tags 0.6 patch

The add-meta-tags WordPress plugin broke my WordPress 2.1 alpha site in more ways than one.

Update: Version 0.7 is out with fixes.

Anyway, here’s a (quick and dirty) patch against 0.6 to fix things.

--- add-meta-tags.php.old       2007-01-10 13:14:40.000000000 +0100
+++ add-meta-tags.php   2007-01-11 04:03:26.466994857 +0100
@@ -148,6 +148,7 @@

 function amt_clean_desc($desc) {
        // This is a filter for the description metatag text
+       $desc = stripslashes($desc);
        $desc = strip_tags($desc);
        $desc = htmlspecialchars($desc);
        $desc = preg_replace('/(\n+)/', ' ', $desc);
@@ -218,10 +219,9 @@
                if ( empty($site_keywords) ) {
                        // If $site_keywords is empty, then all the blog's categories are added as keywords
                        $my_metatags .= "\n<meta name=\"keywords\" content=\"";
-                       $all_cats = strip_tags(list_cats(FALSE, '', 'name', 'asc', '', FALSE, FALSE, FALSE, TRUE, FALSE,
 TRUE, '', '', TRUE, '', '', ''));
-                       $all_cats_arr = explode("\n", $all_cats);
+                       $all_cats_arr = get_categories();
                        foreach ($all_cats_arr as $cat) {
-                               $my_metatags .= strtolower(trim($cat)) . ', ';
+                               $my_metatags .= strtolower(trim($cat->category_nicename)) . ', ';
                        }
                        $my_metatags = rtrim($my_metatags, " ,\n") . "\" />\n";
                } else {

If you don’t have patch available, here’s the changed file (rename to .php).

I’m not quite sure whether the stripslashes is good there of if the bug comes from the admin panel, but frankly, I don’t care. I have other things to do.

Disable Snap Previews

Recently, Snap Previews Anywhere (by Snap.com) have been proliferating wildly. Some people only experimented with them for a short time, then disabled them again; others are still using them.

I personally find them annoying as hell. They:

  • break the user flow, since they just pop up right in the middle and they can’t be anticipated (unlike e.g. intellitxt, where the huge green border is a good hint);
  • get in the way, if you accidentally hovered over a link and the bubble pops up over text you were reading;
  • block clicks, sometimes even on the very link they triggered on (this doesn’t happen consistenly, but often enough to be annoying);
  • don’t add value, or am I just not seeing how previews of the site behind a link somehow improve my browsing experience? (Of course, this is highly subjective.)

Luckily, you can disable Snap Previews Anywhere rather easily - if you know where to look. You can either click the question mark button and search through the FAQ, or just follow this link to disable Snap Previews Anywhere, anywhere. You must accept and keep cookies for that page to work.

Now, I don’t want to be only complaining. A very simple way of making Snap Previews behave would be to a) add a little marker to snappified links, maybe a smaller version of the bubble graphic; and b) only trigger when the user hovers over the marker, maybe even add a small delay. This way, it doesn’t disturb people who just coincidentally hover over a link, it’s visible, and still easily accessible.

Long titles for Firefox

Mozillan browsers (SeaMonkey, Firefox, Flock, …) cut off tooltips after 80 chars, including tooltips from HTML TITLE attributes: bug 45375, bug 218223.

After the bug has been open for six and a half years (opened 2000-07-13), it has finally been resolved - on the Seamonkey trunk, which means the change will not make it into the popular browser before version 3.0.

Long Titles (amo, home page) is an extension for Mozilla, Firefox and Netscape that fixes this annoying behaviour. It prevents tooltips from being cut off, and also enables line breaks within TITLE attributes.

Another little step on making Firefox more useful…

StudiVZ: I'm off

“Dein Account wurde gelöscht. Vielen Dank dass du das Studiverzeichnis benutzt hast.”

Nochmal zur Erinnerung:

Die Stalker-Gruppe (“*****”):

Nachricht von Tobias W. 2006-07-25 11:45:17
Von: Tobias W.
An: Christian W.
Betreff: Deine Gruppe
Nachricht: Moin Christian,

[…]

Zuerst, okay ich bin ein Mann - also erster Eindruck… Ne, ernsthaft: die Inhalt in deiner Gruppe sind absolut okay […]

Kannst du die Beschreibung bitte in diese Richtung des Fotocontests abäñdern und diese - naja, sagen wir “pornographischen Elemente” - entfernen? […]

P.S.: Einer der Gründer (Michael B.) hätte übrigens gerne ne Einladung für die Gruppe… - ich würd mich dann da auch anschließen;-)

Die öffentlichen Bilder, die schlechten IDs, die Super-Suche, private öffentliche Pinnwände (mit unlöschbaren Nachrichten), immer öffentliche Freundesliste, etc.

Und jetzt noch der XSS-Wurm (und es war nicht die letzte XSS-Lücke).

Viel Spaß noch.

Update: schuehsch auch. 700 notgeile Stalker sind überzeugend, ne?

Der Wunschpunisher

Wer sich über Incoming Links von einer Domain, die nicht verlinkt werden möchte, gewundert hat:

Domain:      punish-punisher.de

[Holder]
Type:         ORG
Name:         Solutions-World LTD.
Address:      Suite C4 1st Floor, New City Chambers, 36 Wood Street, Wakefield
Pcode:        WF1 2HB
City:         West Yorkshire
Country:      GB
Changed:      2006-09-12T10:28:54+02:00

[Admin-C]
Type:         PERSON
Name:         Mario Dolzer

… der hat spätestens an dieser Stelle keine Fragen mehr. Ja, das ist der “Domain-Engel” mit der k.exe, dem “Dialer-Parasit”-Urteil, usw. usf. Jetzt also ein Fakeblog. *gähn* Da fühlt sich aber jemand sehr als armes, unschuldiges Opfer. Ich jedenfalls fühle mich in der “moralisch bedenklichen” Gesellschaft recht wohl.

Interessanterweise gibt es sogar ein Impressum (in dem natürlich “Allice Brown” aufgeführt ist) … impressum.jpg (6000x6000px) …

Update: Die Abmahnungen fliegen.

Windows updates want to destroy your work

Windows Update does this annoying “you absolutely must restart now, or later, by which I mean that I’ll keep nagging you every 5 minutes” thing. It’s a pain in the ass since the popup usually occurs only after you have just settled in to work - once all your programs are open and the windows arranged, WU pops up in the middle of your screen with a default button of “Restart now”, which is also mapped to “N” (like “No”). I can see what Microsoft are hoping to do, but honestly? I think this behaviour is completely unacceptable.

Luckily, there are several ways to fix it. The simplest solution to stop the nagging for the remainder of your login session is to just stop the Windows Update Automatic Updates Service, either per GUI or just by running

net stop wuauserv

You can also use a registry setting to disable automatic rebooting when there is a user logged on, plus set a high ‘respawn timer’ for the nag screen:

Run regedit
Open HKEYLOCALMACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
Create a DWORD value named ‘NoAutoRebootWithLoggedOnUsers’ and set it to 1
Create a DWORD value named ‘RebootRelaunchTimeoutEnabled’ and set it to 1
Create a DWORD value named ‘RebootRelaunchTimeout’ and set it to 600

If you’re on Windows XP Professional or any Server OS, you can also use the Group Policy Editor to do the same thing:

Run gpedit.msc
Navigate to Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Windows Update
Activate No auto-restart for schedule Automatic Updates installations, AND
Set Re-prompt for restart with scheduled installations to a high number.