Dealing with comment spam on Gallery 2

Finally! I found a query that effectively deletes the comment spam from the Gallery 2 database. These can be run through phpMyAdmin, but my next task is to turn this into a php script that can be run as a cron job.

To delete comments posted by an IP, or a few IPs, run this SQL statement:

delete ce, e, co from g2_ChildEntity ce, g2_Entity e, g2_Comment co where ce.g_id=e.g_id and e.g_id=co.g_id and e.g_entityType='GalleryComment' and (co.g_host='67.104.112.176' or co.g_host='209.31.123.128')

To delete comments based on the comment itself, run this SQL statement:

delete ce, e, co from g2_ChildEntity ce, g2_Entity e, g2_Comment co where ce.g_id=e.g_id and e.g_id=co.g_id and e.g_entityType='GalleryComment' and (co.g_comment like '%[url=http://%')
Continue reading

iPhone gets very hot when on wireless and battery drains

The other day I pulled my iphone out and nearly dropped it! It was burning hot and there was a big red low battery indicator in the middle of the screen! I had charged it only a couple of hours earlier so it was not likely that normal use had caused this condition.

I was in a wireless area, and had been checking my gmail earlier. The little activity indicator at top left was twirling.

A search through Apple support and discussions led me to this article. It seems that the iphone can get stuck in a checking-mail loop, particularly on certain IMAP accounts like gMail.

An Apple support article also says that a flaw in the Mail application in v. 1.1.3 causes it to persistently generate server activity even when it is not checking mail per user settings. Persistent mail checking can quickly drain the battery.

Continue reading

Drupal admin: Changing the default Open or Collapsed state of filters and fieldsets in Node editing screens

As you add modules to Drupal, the “Edit” screen of each node can start piling up a lot of optional filters and settings that you can apply to the node. These include comment settings, input filters, image pickers and browsers, authoring settings, etc. The general term for all these added features on the node edit screen is “fieldsets.”

Most of them are collapsed when you first open the screen, which makes it easy to scroll down to the “submit” button or the lower fieldsets. However some modules set themselves to be open by default. This can be a problem if you have to edit a lot of nodes – it causes a lot of extra scrolling and is visually confusing.

Continue reading

Maximizing the Captivate window automatically

We found that some of our users did not know how to maximize windows (or even that it was possible!), and so never saw the navigation bar and buttons on the bottom of a Captivate-based course they had to take.

The customer who designed the course asked that we add instructions on maximizing the window, but I thought that it would make more sense just to make the window maximize itself.

It’s been a while since I used window sizing functions, so I went hunting for a script that works across all browsers.

After trying several, I found that some “auto-maximize window” scripts don’t even work every time on ANY browser. The one that worked best on every browser I tested it on is available free from Dynamic Drive, here.

Continue reading

Mail error: “The server response was: From: address not verified;”

I have about 5 email accounts, and use Mail.app to manage them. Recently I started seeing this obnoxious and cryptic message when trying to send from anything but my att.yahoo. account.

The server response was: From: address not verified; see http://help.yahoo.com/l/us/yahoo/mail/original/manage/sendfrom-07.html

Use the pop-up menu below to try a different outgoing mail server. All messages will use this server until you quit Mail or change your network settings


Continue reading

“Certificate couldn’t be read” errors in Mail.app

Corporate mail servers often used SSL certificates, and sometimes these certificates expire. At that point you may start getting “Certificate couldn’t be read” errors in Apple’s Mail.app.

According to Apple, permanently accepting a self-signed SSL certificate may fix the problem.

  1. Click the Show Certificate button in the error message.
  2. Hold down the option key and drag the certificate icon out of the error window to your desktop.
  3. Double-click the certificate icon on the desktop, and choose X.509 Anchors from the pop-up menu. Click Add. You must have permission to administer the computer for this procedure to work.
Continue reading