August 2006

Hide Administrator Email in phpBB

phpBB has a CAPTCHA image verification system on its registration page for preventing spam to your board, which is nice. To accomodate the blind and disabled who can’t read the image though, it says, “If you are visually impaired or cannot otherwise read this code please contact the Administrator for help.” But the administrator link is a plaintext mailto link to your email! Boo.

You know that if you put your email in plaintext on a website, or put a mailto link to your email on a website (or both), that spam bots will pick up your email and never let go, forever spamming you for the rest of your life, right?

Tools such as this online email obfuscator or this email cloaker apple widget turn your email into a HEX code, ASCII code, or javascript code to prevent spammers from getting your email. I’ve been using them for years and they work great.

Anyway, so how do you do this in phpBB?

I did a grep in the phpBB directory for mailto links with the following command:

grep -R “mailto” *

The culprit is the file usercp_register.php. Open this up and find this line:

‘L_CONFIRM_CODE_IMPAIRED’ => sprintf($lang[‘Confirm_code_impaired’], ‘<a href=”mailto:’ .
$board_config[‘board_email’] . ‘”>’, ‘</a>’),
Copy the whole line and paste it onto a second line. Then comment out the first line (add // at the beginning) to deactivate it. Then change the second one: Change

‘$board_config[‘board_email’]’
to your obfuscated email, the hex/ascii code that the email obfuscator gave you.

So your code should look like this:

//’L_CONFIRM_CODE_IMPAIRED’ => sprintf($lang[‘Confirm_code_impaired’], ‘<a href=”mailto:’ .
$board_config[‘board_email’] . ‘”>’, ‘</a>’),
‘L_CONFIRM_CODE_IMPAIRED’ => sprintf($lang[‘Confirm_code_impaired’], ‘<a href=”mailto:’ .
‘[your obfuscated email address]’ . ‘”>’, ‘</a>’),
(where [your obfuscated email address] is the code the email obfuscator gave you.) Save and quit and you’re done!

remove broken song links in iTunes

So someone asks you to play some music, and you click on the perfect itunes songs and iTunes says it can’t find the file. It helpfully puts a little exclamation point next to the mp3 and tells you it can’t find the file, but then doesn’t let you do anything else with it. Do you want to search for it? No. You want it to play music. You don’t want to ‘consolidate library’ because you like where your mp3s are and you don’t want apple managing everything you do. You can’t click on the exclamation point column to sort by ghost links, and you can’t find them all and delete them. What do you do?

For mac, you use Super Find Dead Tracks. It’s an applescript that gets rid of those exclamation point files. You put it in home > library > iTunes > Scripts . If Scripts doesn’t exist you create it. Then it appears as a menu item in a new script icon folder:

Super Remove Dead Tracks Menu Item

Then you wait a little bit and it gives you a dialog when it’s finished. Then you give the guy money or link to him on your blog (thanks dude).

If you’re on PC, you use Itunes Library Updater 2.0.

How I found this / Realized it was a Problem
First I talked to Maeve (my g/f) if she knew the best way to do this. She thought about it and would consolidate her library manually by searching for mp3s, dragging them to the itunes folder, deleting the library and rebuilding it from scratch. This is not a bad idea, it’s taking control of your library and not leaving it up to apple to organize your music. That way you know what you have and if you’ve missed any mp3s. I just wondered if this was a slower way to do it; looking online later people have said having apple reimport all your music can take hours.

On a side note, I think Maeve is less lazy than I am–I would have a computer clean my room and navigate me around if it could. She is generally better at organizing files, and rates her music, meaning iTunes is going to reward her for the manual effort she puts into her library. I on the other hand think about iTune’s lack of functionality, and think “this is stupid” and “there has to be a way to do this.” Generally speaking with computers, if you think these things, chances are you’re right, lots of people think this and have come up with ways of fixing it. It’s a competitive market, so if there’s something the program is really lacking, chances are the competing software does what you’re thinking of and you may be using the wrong program.
Anyway, first I googled “itunes consolidate library not found” (without quotes), which are two literal phrases from itunes error messages. I didn’t know what to call this concept (broken links? ghost files? empty references?) so I tried using language found in the errors and features itunes gives you: the menu item “Advanced > Consolidate Library”, and “The Original Song File Could Not Be Found.” My attempt was to tell google I’m looking for an advanced feature of iTunes relating to organizing my library (like “consolidate library”) but that I’m having a problem “not found”. With this phrase, I found a document called “iTunes Problems (Quarter Life Crisis).” This article wasn’t too helpful and neither were my search engine results pages, but on that page I did find someone who referred to these items in my problem as “lost links”. I tried a new google search for “itunes broken links” thinking I’d get better results. I did, the first link was a digg article that linked to a PC app that addressed the problem.

Being on a mac, I wasn’t done yet, though I have a PC so that app will be helpful in the future. The digg comments and the article mention apple scripts that can do the same thing, but don’t link to it. So on the mac I know there’s an apple script out there that will fix this. Going back to the same search engine results page (SERP) I click on the second link which describes my problem. This person calls the broken files “ghosts”. Addendum–for some reason experts exchange now is hiding the solution from me and trying to charge me to view it–but when I went to this page before, I saw the solution and found two scripts pages that both had very helpful looking itunes scripts, one of which had the super find dead tracks app I needed.
Why am I explaining what I googled? While lots of people have already figured this out, and it doesn’t take a genius to know how to use google, I do see people not knowing how to use google well. They’ll ask me computer questions that they could easily google the answer for. This is an explanation of how to do it in a more general sense. I’m also interested in the problem solving process and what it can teach us about solving other problems. I think if we had more people writing about their problems, describing how they thought about them, posting the solutions, and tagging their solution with other keywords people could use to find them, we could evolve and learn faster as a group than we can by ourselves with the whole ‘figure it out for yourself’ mentality. Anyone want to comment or join in? If you have a problem you’d like to write about solving please email me at jordan at designtion.com.