Pages

Thursday, December 27, 2012

Thing of the day : PHP.INI short_open_tag

Working on some Web Development in Wordpress / PHP, I made the following experience today: A file was being parsed and executed correctly on one server, but showed a parse error (unexpected T_ELSE, but this could have been anything related to placement of conditional and loop markers "}"). What do you do? You double check if the file is indeed the same file. Is there a problem with FTP, encoding, etc.? And then? You noticed that you were using <? instead of <?php Then you look in PHP.INI and you find this: short_open_tag. The default is "On" and most web hosts use this, and I was so used to using it everywhere in my code, that I really...

Wednesday, December 26, 2012

Translating Wordpress: Poedit

I had a hard time during the last couple of days trying to get gettext translation work in a Wordpress installation. Eventually it turned out to be a bug (read: a missing slash) that went undetected and made me search for hours and hours. Not very cool with Christmas, but at least it's warm inside. And I learned a lot about translating in Wordpress. If you google it, you'll probably find plugins like transposh, qtranslate (both free) or WPML (free for non-profits). There are also lots of tutorials about using gettext with Wordpress. You need a little program called poedit, that requires some configuration. The best tutorial I found (I read about six) is: http://wp.smashingmagazine.com/2011/12/29/internationalizing-localizing-wordpress-theme/ Note that some other tutorials miss some of the...

Tuesday, December 18, 2012

Creativity and Computers?

Yesterday, I wrote about the creative juices that allegedly flow wildly when programming a computer, or generally working with digital devices. This is partly true, when you have to move swiftly between files and folders, tabs and temporary clipboards,when you have to program in various languages and just challenge your brain constantly to be precise enough. Every geek with a little bit of experience knows what I'm talking about here. I once studied computer science because I thought it'd be the most creative thing in the world. Unfortunately, that turned out to be an illusion. Of course, there are the events like I described yesterday, and...

Sunday, December 16, 2012

Programming for the Brain

Brains ought to jump. Photo seen at Google.com Do geeks have an obsession with brains or braininess? Perhaps. I just wanted to share a simple but authentic thought with you: Programming a computer is good for the flexibility of your brain. That statement isn't true. It should be refined, since many programming tasks are boring and don't challenge our gray matter. Think surrepetitiously programming an old VCR. So what about Performing certain non-trivial tasks on your computer is good for your brain. What kind of tasks? Programming at CERN or hacking into NASA (which might not qualify here given the age of the individual who actually did...

Geeky Christmas: Snow

In the Christmas season, website owners are looking for Santa and snow. Moving images of Santa abound on the Internet, and we're not going into that. I have looked for a snow plugin for a website I work on, amaidi.org, and integrated the best I could find. Flakes are highly configurable, there are several modes and the coolest thing is that the snow can collect on a <DIV>. It is really easy to integrate this plugin by simply adding this line to the <HEAD> of your file to load the latest Jquery and the plugin file: <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"> And then, just before...
Page 1 of 1412345Next

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Lady Gaga, Salman Khan