Friday, April 18, 2008

Firebug Series - Part 1: Getting it Installed

I've been using Firebug for some time now and most techie folks will already know about Firebug, so you fellow computer nerds may ignore this series. However, feel free to let me know if I have missed anything...

Firebug is quite possibly the best reason any web developer should abandon IE for Firefox. It's a small little extension that packs quite a big punch. I have found that after developing a site and getting it to look "good" in FF, it is usually OK in IE. As with anything I know there are exceptions, especially with IE6, but I am speaking in general terms.

First thing to do is get Firefox if for some bizarre reason you don't already have it. Then get Firebug by going to Tools, Add-ons, and then in the window that pops up, click on Get Extensions in the bottom right. Then search for Firebug (see below). There is also a wealth of info at Firebug's website, http://www.getfirebug.com. At that website there are links to groups, discussions, a blog, the documentation, and even the source code.




Click on the Add to Firefox button in the upper right and then follow the prompts to load it. Once loaded it will show a little gray circle in the bottom right of your Firefox status bar. Click on that Circle and then click Enable Firebug. One note, you may choose to enable Firebug on a case by case basis, because it can interfere with some sites, especially sites that are use JavaScript heavily. That being said, I leave mine on globally and never disable it and I haven't had any problems, but I felt I should give the warning.



Once you have the Firebug window open, you have the whole HTML document at your fingertips, or should I say pointer tip. Maybe the easiest tool to use is the Inspect button. As you mouse over the web page it points directly into the HTML to where the code is and also shows you the styles directly applied to that element as well as all the inherited styles.



Hopefully this is enough to get you to at least install Firebug. More will come next time as we look into the Inspect functionality a little deeper, and I promise it will come quicker than most posts around here.

<the todd />

Thursday, March 20, 2008

heredoc, heredoc, heredoc

For whatever reason I can't remember the PHP heredoc syntax. It's simple, I know. But my problem is I always do greater than (>>>) instead of less than (<<<). My reason behind this post is to hopefully ingrain it into my head.

In case you are unfamiliar, this is great for copying and pasting a bunch of pre-existing HTML with double quotes into PHP. The reason being is that you don't have to escape all the double-quotes.

More info over at PHP on the Strings page.

Once again, repeat after me. heredoc is <<<.

By the way, did I mention "Go Tigers"

<the todd />

Wednesday, March 19, 2008

March Madness Epiphany

As I was looking over my bracket, I noticed something that I hadn't realized for a few years now. I don't get to go crazy for my work.

Some quick notes:


  • I work in the higher education industry, and just in the past year have started paying closer attention to what other higher ed web persons are doing. So naturally many of them, especially those with teams in the tourney, are quite excited.

  • I work at a Health Science Center. The students here have long given up on their athletic dreams. Because let's face it, if they could really shoot a basketball, they wouldn't here.

  • UTHSC and UT (Knoxville) aren't the same. So don't suggest rooting for the Volunteers. My Mom and Dad raised me better than that.


Oh well, I can live vicariously through the tweets and blogs of my fellow higher ed web folks that work at institutions with athletics. And I also always have my alma mater, even more so during this time of year.

So... Go Tigers! and what a raw deal. 3 years in a row now we are stuck in a bracket playing a lower seeded team in their backyard. 2006 as a #1 seed and playing UCLA in Oakland. 2007 as a #2 seed playing A&M in San Antonio. And now 2008 as a #1 seed possibly playing Texas in Houston. Maybe the ole' ball coach is right with all this conspiracy talk:)

<the todd />

Wednesday, March 12, 2008

Ode to Collage

So the grapevine turns out true again. It seems as if Serena has decided to drop it's content management system, Collage. It just so happens we decided to buy the product just about a year or so ago.

That being said I really feel for the folks that I had the opportunity to meet at Xchange 2007 that are fully invested with the product. Not to mention doing some pretty cool things with Collage.

I believe its safe to say this has moved its way down my priority list, at least until it gets hashed out what will happen to the product. If it is just left to die, then there is no sense in continuing to implement it. If it is sold to someone, then it should retain its usefulness.

Anyway just gonna sit and wait on this one. It's not like I don't have plenty of other stuff to keep me busy.

<the todd />

Friday, February 8, 2008

My funnel cloud pictures



As I left work from downtown Memphis on February 5th, the nearly black sky was filled with intense rain and lightning. I was beginning to think that I had left work a little too late while the traffic was moving slower and slower and the rain was getting harder and harder. However, about halfway home (the 240/40 junction for those familiar with it) the rain just quit.

The time now was about 4:45 or so and I was elated the rain had stopped. Then I happened to look to the north from where I was (between the Sycamore View and Whitten exits heading east) and saw the funnel cloud that was reported that day in the Whitten and Yale area. The pictures are a little blurry as they where taken while driving (please spare me the safety lecture). Despite the picture quality the clouds are still quite ominous. My understanding is that this one that I pictured never touched down. My thoughts and prayers go out to the families that lost loved ones during this round of storms, and to all the people who had their possessions ripped out from around them.

<the todd />

Wednesday, January 23, 2008

keeping line feeds in textarea from HTML to RTF

Hope this helps someone not named Shawn.

I want to keep the formatting when a user hits the "enter" key inside a textarea on a form. My problem is further deepened by the fact that I don't just return the results straight back to a HTML page. My results get merged with a rtf file that then gets emailed to someone who can open the file using Word.

I found this site which gives the RTF v1.5 documentation, and from this gleaned that the \par denotes a new paragraph. Yea!

I then just did a string replace (using PHP) and searched through the user submitted textarea to replace all occurrences of chr(10) with "\par " - don't forget the space.

I now have line breaks in the final RTF. And a happy customer.

<the todd />