Posts Tagged ‘template’

PHP PEAR HTML_Template_IT Eats Dollar Signs

Wednesday, December 29th, 2010

Sigh.  We discovered a bug in our recently reworked tools.perceptus.ca (“PWT”) site.

We have a simple, custom, partial MVC system that runs a few of our smaller websites.  That system uses the PEAR HTML_Template_IT package to do the final template rendering. We ported PWT to our MVC to make future site changes much easier.

A week after going live with the changes, we found a baffling bug.  The tools were eating the dollar sign and dollar amounts (but not the decimals) from the input text. E.g. “$103.00” would get returned as “.00”.  Not good.

Apparently, HTML_Template_IT defaults to processing all text with regex.  Not cool.

There might be a historical reason for this, but for new users, this has got to be confusing. Plus, this is NOT mentioned in the intro documentation: http://pear.php.net/manual/en/package.html.html-template-it.intro.php

We’re not the only ones caught by this: http://pear.php.net/bugs/bug.php?id=50.

The fix is to initialize and set the use_preg option, like this:

$tpl = new HTML_Template_IT(‘./’,array(‘use_preg’=>true));

I have glanced at the package pages, and while this behavior is  documented it is buried quite deeply in the documentation.

This also explains a typo we had years ago on a static page that had the text like $5 in it.  That time, we just changed the copy to read 5 dollars and got on with life.

 

Finally, the Perceptus Back Story Blog Gets a Personality

Wednesday, September 22nd, 2010

Look above!  The default WordPress blue Kubrick header graphic is gone.

It was finally time to make this blog a little personalized, a little bit custom.  We actually get a couple hundred hits a day on our corporate blog – much to our disbelief.

The new header graphic?  That cute little inukshuk was one of hundreds of impromptu inukshuks built during the best Olympics ever along the south shore of False Creek in Vancouver earlier this year.

Some technical notes:

  • We’re using a child theme of WordPress’s default theme, this way, we should have minimal problems updating the WordPress software in the future. This page was useful: http://op111.net/53
  • For some reason the image size was wonky – our image is 760×200 pixels, but websites gave different specifications – maybe it depends on the version of WP?
  • We stole the curved border from the Kubrick header image, then knocked out the middle “blue”, and saved it as a PNG with a transparent middle hole.
  • The inukshuk photo was flipped, cropped, darkened, fuzzed, and generally mishandled using the GIMP image editor.
  • The images were all combined in Inkscape.

If the blog traffic continues to grow, maybe we’ll do some real customizations next year.

Remembrance Day (or Veterans Day) Bingo Card Template

Wednesday, November 4th, 2009

We’ve just added a new template word list at print-bingo.com.  Follow this link to quickly create free Remembrance Day (or Veterans Day) themed Bingo Cards.  We hope this will prove useful to the hundreds of teachers that use our site.

As always, basic use of print-bingo.com is free. An upgrade to get Premium access is only $10.

Halloween 2009 Bingo Card Template

Wednesday, October 14th, 2009

Here’s a treat for kids from Perceptus Solutions Inc., and our website, print-bingo.com. Teachers, and parents are invited to create free Halloween themed bingo cards using our template word list for All Hallows’ Eve.

Just like every other word list at print-bingo.com, you are in control.  You can customize your bingo cards to your heart’s delight.

Plus, for a small

upgrade cost of $10, you can get even more features.  But even our free service is great for most users.

Well, we forgot to create and post about using Print-Bingo.com to create custom Canada’s Thanksgiving Day and American Columbus Day bingo cards.

Oh well.  At least we remembered that Halloween is right around the corner, so here is our annual reminder that print-bingo.com is great for creating themed bingo cards to celebrate the day of tricks and treats. Teachers and parents are invited to create free customizable Halloween bingo cards using our template word list for All Hallows’ Eve.

Just like every other word list at print-bingo.com, you are in control.  You can customize your bingo cards to your heart’s delight.

Plus, for a small upgrade cost of $10, you can get even more features.  But even our free service is great for most users.

Canadian Provinces and their Capitals Bingo template

Saturday, August 15th, 2009

It’s sad.

We’re a Canadian company, yet our first template word list for print-bingo.com was the American State Names. It’s just a fact of life, we always knew that the vast majority of our customers would be from the USA.

Anyway, it’s taken us three or four years to finally put together a template word list to easily create a bingo game with Canadian Provinces and Territories, and their Capitals.

As ever, basic use of print-bingo.com is free; however, you get more features if you upgrade for $10.