Remove the new adminbar in WP 3.1

Don’t like the new adminbar which is enabled by default in WordPress 3.1? If so, add the following snippet to your themes function.php file:

// remove the ADMIN BAR from the front-end (introduced in WP 3.1)
show_admin_bar(false);

iPhoto 11 not recognizing iPhone photos.

A lot of people seem to have problems with iPhoto suddenly being unable to read JPG files. A lot of suggestions floating around, from checking sRGB declaration and permissions and corrupted iPhoto or disk and whatnot.

Here, the culprit is the iPhone. Doing a HARD RESET fixes the problem (in many cases).

To do so: push and hold the HOME + ON/OFF button continuedly. You will see the off slider show, continue holding until the device reboots and the Apple logo shows.

After this, iPhoto ’11 should recognize the files on the iPhone again.

Happy importing!

Lost Page Template Dropdown in WordPress

While working on my latest theme I suddenly noticed that the PAGE TEMPLATE selection dropdown menu had disappeared on me. This in WordPress 3.0.4 – first time this happens you’ll scratch your head wondering if you went daft. But no.

The solution: activate another theme (for example the default one), go into a page and most likely you will see the dropdown back where it should be. Now go back and select again the theme you’re working on. Back into a page and tada, it’s all working again.

Hope the remedy is just as easy for you as it was for me.

Proper commenting in PHP

Do NOT comment in PHP with a // double slash if you are using the closing tag on the same line, instead use the /**/ type of commenting. I am amazed of how many people do that, forgetting that anything after the // will be considered part of the comment and thus nullifying the closing PHP bracket.

<?php // this is wrong ?>
<?php /* this will work properly */ ?>

The geek in me.

Remember the times as a child when the game on long travels was to either call the state plate of a car correctly or it’s make and model? I feel just the same while following the Tuts+ screen cast tutorial on jQueryMobile:

“Look at all these icons at the bottom of the screen in his dock! … Aha! That’s that and that, and that is that and yep, got that, got that, got that too, …oh, I wonder what THAT is? … got that too, and that is that and… haha he is also still liking and using THL (The Hit List) and boy, he has just about every coding app (Coda, Espresso, TextWrangler etc.) of which I have most too, oh, and that one I have too, but by golly, I would like to know what THAT one is… geez, I might really miss out on it by not having it in MY toolbox…”

[...Trying to roll over the icon to see the tooltip popup and revealing the name and then scolding myself for this - it's a screen cast, not a browser! - and thinking I really should get out a bit more often...].

Geek? Ever happen the same to you?