Wordpress

Call for Translations: Pending Release of Countdown Timer v2.2

The release of Countdown Timer v2.2 is just around the corner (May 15th at 18:00 GMT). In preparation, I released the PO files for translation last night and sent out an email to all the wonderful participants who’ve translated in the past. Here’s the basic jist of what’s going on:

I’ve updated the PO files and uploaded them to my website. All you should need to do is find the language that’d you like to translate and click on the link below. The page will load with the existing data filled in that has not changed. The blank fields represent data that has changed and needs to be updated.

Also, there are a couple of special fields you should be aware of: “translator_name” is for your name as you’d like it to appear in the credits within the plugin (if you want it displayed). “translator_url” is for the URL link that will be associated with you name (again, if you would like it included).

There are a handful of fields that go something like: %d years,
The %d is a place holder for an integer (such as 5 days,) and can be moved around if needed depending on the localization requirements.

Similarly, there is a %s ago and in %s. Where %s represents a string (in this case, the countdown). This allows the translation of “in” and “ago” to be put in its proper place depending on the localization.

I really hope all that makes sense. If it doesn’t, I’d be more then happy to answer any questions you have. If you’re unsure of the context of certain strings, you can also download the trunk version version at http://downloads.wordpress.org/plugin/countdown-timer.zip

Languages already (mostly) completed:

  • Czech (cs_CS)
  • German (de_DE)
  • Spanish (es_ES)
  • French (fr_FR)
  • Dutch/Holland (nl_NL)
  • Portuguese/Brazil (pt_BR)
  • Swedish/Sweden (sv_SE)
  • Turkish (tr_TR)

As always, if you’d like to add a new translation, you can start here: http://fergcorp.com/project/phPo/phPo.php?poFileName=afdn_countdownTimer.po

And stay tuned for the pending release on Thursday!

0

Blogging: WordPress vs. Blogger

  • Answers

A good friend from college asks:

I’m thinking of starting a blog. (Not sure how good of an idea this is but whatever, it’s an idea.) I was shopping around the different platforms and was wondering what your take is on them. You obviously use WordPress, why? What about Blogger? Any insight would be great as they both look to be about the same to me, having not used either.

Blogging, for me, is a great place to offload stuff from my mind and I find that’s it’s particularly helpful for the ADHD in me.

As for different platforms, a quick overview:

  • There is WordPress, which, as you pointed out, is what I use. You can host WordPress yourself of have them host it for you for free (WordPress.com)
  • The main competitor to WordPress is actually MovableType, which is free to download and host yourself, but you have to pay $5/mo to have them host it for you (Typepad.com)
  • Blogger is the lite weight version of blogging. It’s backed by Google and does pretty well. You can’t host it yourself, but it is free to use.

From this point on, the differences are more or less semantic. I like WordPress because it’s completely open source, they have a great community of developers that are constantly evolving the platform and making it better. The hosted (free) version of WordPress is very full featured, but not overwhelming. I particularly like that the URLs are date/title formatted. For example: http://example.wordpress.com/2008/04/22/the-world-is-just-awesome/, would have been posted on April 22,d 2008 with the title “The World is Just Awesome.” I also like the commenting system much better in WordPress compared to Blogger.

I don’t know much about Blogger because I haven’t investigated for a while now, however I do know that hosted (free) WordPress has lots and lots of themes that you can choose from.

Going down the features list now:

  • WordPress has a pretty spiffy tagging system (in addition to the traditional catagories) that I think are a superior form of content labeling.
  • This shouldn’t be a huge deal for you, but WordPress has (in my opinion) the best comment spam protection system.
  • You can have pages in addition to posts. Pages are basically the same as posts, execpt that they live outside of the normal hierarchy.
  • No advertisments.
  • Statistics. It’s nice knowing who your readers are and how many of them. WordPress stats are pretty full featured and very helpful.

I think you also get something like 5GB (yes, that’s gigabytes) of space to upload content. And of course, I use it. Which not only means that WordPress is the best ;), but that I can also help you out more if you ever need it.

Hope that helps.

0

phPo Translator – Online PO Translator

One of the great things about being a programmer is that when I have a problem, it’s pretty easy to solve it myself1.

I recently began to seriously support i18n (internationalization) in the Countdown Timer. It’s actually a pretty slick system. Everywhere I have some text that’s output in the plugin, I wrap it in a WordPress defined function that handles the translation. Then I generate a PO file using poEdit and make a MO (which is just a binary/machine object file of the PO file, which is human readable).

The issue is, if someone wanted to translate the PO file, they’d have to download poEdit, figure out how to use it, grab the PO file, translate it, make the MO file, and then send the MO file to me. This works pretty well if the users is a computer guru. But that’s not often the case.

I was hoping there would be an online PO translator, but I couldn’t find one. So I decided to make my own. Thus I present, in the form of clever titles that mash two words together, phPo Translator (or just phPo for short).

I basically wrote the code over lunch today and then decided that I should version control it. So I threw it up on Google Code, which I knew about but had never, up until this point, actually used.

Google Code is simply amazing. It took less then a minute to register and it uses SVN, which I already have installed on my computer. So I upload the code, create the tag, and away we go!

In any event, you can:

See it in action: Translate afdn_countdownTimer.po
Download phPo Translator v0.1.1
View phPo Translator Google Code page

0
  1. Granted, most of my problems are probably caused because I am a programmer 

Told You So: Blogging is Good for You

This is kind of interesting news:

From www.techcrunch.com:

A new study has found Bloggers are better adjusted and live healthier, happier social lives.

The research, from Swinburne University of Technology found that “people felt they had better social support and friendship networks than those who did not blog” after a two month blogging period when compared to people who do not blog.

If any one is interested in blogging, I recommend using WordPress.com. It’s an open-source, “state-of-the-art1 semantic personal publishing platform with a focus on aesthetics, web standards, and usability.”2. It’s a great system and I would use and recommend nothing else.

0
  1. What does that mean any way: state-of-the art? 

  2. http://www.wordpress.org 

Countdown Timer v2.1.1

After dilly dallying around for a couple months, I finally got serious about pushing the 2.1 version out the door. A couple of reasons for this actually.

First, the WordPress 2.5 is coming out end of March/beginning of April and I wanted to get out one more release (this one) before the next version of WordPress hits the streets.

Second, it’s fits with my development flow; releasing every few months when I can.

Here are the list of updates in Countdown Timer v2.1.1:

  • Fixed i18n translation issues where mo file would sometimes not be loaded
  • Updated UI (note: Based on UI code from Google XML Sitemaps)
  • Removed code dealing with recurring events (which has not been included for a few versions now)
  • Added js countdown ability to admin example (which doesn’t have wp_footer hook?)
  • Updated the link to the JS file to make it dynamic in case a folder gets renamed
  • Fixed a bug in the JS file that caused dates to be calculated incorrectly
  • Append a letter to the beginning of the unique id (as per XHTML requirement)…who knew?
  • Added two language files: Swedish (thanks to Mattias Tengblad) and Spanish (thanks to Google Translator)

The biggest change user will notice is the new UI. It’s based off the code from Google XML Sitemaps which I’m assuming is based off the code from WordPress itself. The great thing about the new design is that you can collapse, expand and move around the boxes to fit your work flow.

All the other changes are ‘under the hood’ and deal with code changes to make things work better in a larger variety of situations.

The Countdown Timer plugin is about three months shy of its third anniversary of public release! I’ve basically been maintaining it since the end of freshman year in college, which is when I switched to WordPress.

The first public version was v0.6. It had about 50 lines of code and used a text file to store the data. There was also no UI at all.

Version 2.1 is about 950 lines of code. Storing data in a text file is gone, instead using the WPDB. There are also several support files, including the javascript port of the countdown mechanism which is another 150 LoC.

Since the beginning of last March, there have been over 8700 downloads, which would almost pay for a semester of college if everyone gave a $1 (wink wink)!

Read more or download version 2.1.1!

Update: Had to increment the plugin to version 2.1.1 because of the way that WordPress does version numbers. In short, v2.01 is the same as v2.1. So I had to release this as 2.1.1.

0

Countdown Timer v2.0, Now with v2.01 goodness!

Update: There was a bug in the initial 2.0 version that required the plugin to have PHP5 or greater. This has now been fixed and it works with PHP4 and PHP5. Thanks to Jim Lynch for bug report.

Well, I finally managed to push Countdown Timer v2.0 out the door. It’s a bit later then I wanted, but it’s out and that’s all that matters for now. The biggest update for v2.0 is the ability to have the time automatically update using some Javascript. The idea for this has actually been around for a while and credit for it goes to Tobias (see: Ultimate Countdown Timer; 1-Up’d by a 14 Year Old). I was hoping I could use a lot of Tobias’ code, however I had changed a lot between then and now.

During the development phase, I wrote some code that basically took a look at what value the timer was at and then subtracted one second from that. Unfortunately, it quickly became clear that this method would not work. Because there are a variety of options in what units of time are displayed, screen scraping and then recalculating would have been pretty cumbersome. It also meant that I had two ways of calculating the time (the first way was the PHP-based fuzzyDate function I wrote, the second would have been this monstrosity). So I did what any code programmer does and copied myself. I converted the PHP-based fuzzyDate function into Javascript and then passed the needed values to the JS function. Voila!

In any event, here’s the changelog:

  • Updated plugin description line
  • Rearranged text in the installation notes to emphasize using the widget rather then the code
  • Fixed a bug that crashed the plugin if no dates were present (a PHP 5 problem??)
  • Implemented the ‘register_activation_hook’ function rather then the old way
  • Changed the way DB updates are handeled. Instead of having a specific update regimine for each version, the plugin will only update an option field if it doesn’t exist (if it exists, but is blank, it will NOT update…as it shouldn’t).
  • Updated fergcorp_countdownTimer_fuzzyDate with another variable so that the real target date is always known.
  • Removed code dealing with updates since WP 2.3 now does this automatically
  • Bug fix. Widget title isn’t saveable due to a programming error. Thanks to Michael Small for the catch.
  • Renamed some functions from afdn to fergcorp
  • Added JavaScript function for JS countdown
  • Tabbed $afdnOptions array to make it more readable
  • Fixed strtotime typo
  • Brought time display inline with current WordPress practice. This fixes the dreaded timezone glitch.
  • Strip non-sig zeros option added
  • Fixed bug where “No dates present” would _not_ show if the data was returned instead of echo’d
  • Renamed to $getOptions to $fergcorp_countdownTimer_getOptions to avoid clashing

Read more or download version 2.01!

Note: Comments moved and closed. Please leave future comments, questions, pleads for help, etc on the Countdown Timer page.

0

Countdown Timer v1.97 Technical Preview 2

It’s been many moons since I released the last technical preview of Countdown Timer 2.0. Honestly, things were stalled for a bit because I was busy with school and trying to figure out how I wanted to do what I wanted to do with the program.

The semester is over and I got it all figured out. So welcome to Countdown Timer version 1.97, better known as version 2.0 technical preview 2.

The Javascript that handles the updating of the countdown has been completely rewritten. I ended up scrapping what I had and then taking the PHP code I was already using and converted it to Javascript. This is the “elegant solution” I mentioned I was looking for earlier.

In terms of stability, everything seems fine; I am currently using this Technical Preview on AFdN. There are a couple known bugs that deal with stripping non significant digits and I haven’t fully tested the upgrade process. Other then that, everything is complete. I’m hoping to have 2.0 shipped before the New Year.

Go download it!

0

Google Chart API

I typically don’t blog about new Google stuff, especially APIs (application programming interfaces). However, this one is particularly cool because it allowed me to easily finish up a project that I had shelved for several months (maybe years? I’ll just call it ‘a while back’).

A while back, I had this idea to chart monthly blog frequency. I had found some code that did a pretty bang up job of making graphs using just PHP. However, it wasn’t the sleek looking graph I was hoping for. I had bookmarked a few sites that had Macromedia Flash applications that you could just drop the data into, but I never got around to playing with them.

Finally, Google introduced the Google Chart API. In a nut shell, I can easily create graphs such as:

Blog posts for Nov. 2007

This chart shows my blogging frequency for the month of November. The code I’m using on the back end is pretty crappy (I literally just patched some code I already had) and it can only handle a single month at a time.

Technical details to follow…
Read More »Google Chart API

0

Countdown Timer v1.91

Technically, this is a step back because I already released 1.95 as a Technical Preview. However, I wanted to fix a bug without having to release the incomplete features included in the 1.95 Technical Release. So this is a special release. This release fixes a bug where the widget wouldn’t save data. Baring any catastrophic bug discovery, this will be the last release before version 2.0 (which I hope to release over Christmas Break).

Read more or download it!

0