Archive for January, 2006

Use Dreamweaver Templates as PHP Objects

January 27th, 2006

Yesterday I finished up the first release of a PEAR package for using Macromedia Dreamweaver templates as PHP objects.

The package is named UNL_DWT (eventually may be renamed HTML_Template_DWT), and is now available on the UNL PEAR Channel server.

This package builds PHP classes for your .dwt files with member variables for editable regions.

This is a simple abstraction of page presentation and programmable content, but is useful in large organizations that use Dreamweaver templates for their page designs.

[Some of you may be asking, why another damn templating engine?]

The problem with other template engines is that they use unique syntax that can’t be sent to a browser without processing, and (without 3rd party plugins) aren’t integrated into major HTML Editing Applications.

Dreamweaver uses HTML comments to define editable content regions which ensures pages can be sent to a browser without any processing, while still allowing the templates to be used in other editors.

Designers can build a site design within Dreamweaver and use that design in static HTML files, pages editable with Macromedia Contribute, and now — programmer friendly PHP objects.

One set of templates can be used by users who understand any web publishing application, used as static (x)html pages, ASP pages, PHP pages, as well as PHP programmers who prefer to use the templates as objects.


[Where is this going?]

This package was a necessary foundation for creating a UNL PEAR channel package for the UNL Templates that can be easily adopted across all of the PHP servers at our University.

We currently distribute a zip file with the Dreamweaver templates to over 120 registered web developers on campus, who use the templates in every application imaginable. Dreamweaver templates suit our needs to use one design across such a wide variety of applications, but for those familiar with PHP it would be easier to distribute the UNL templates as a PEAR package and be able to use them as objects.

- That’s where this is going.

Get the package at http://pear.unl.edu/

Learn more about how the University of Nebraska-Lincoln (UNL) is organizing it’s web developers to create a consistent web design at the university.
http://www.unl.edu/webdevnet/

Don’t define a function within a switch() statement.

January 25th, 2006

Note to self… in PHP you might want to avoid defining a function within a case section of a switch statement, it can cause some crazy problems.
In PHP 5.0.4, this will NOT work:

<?php
$a = true;
switch($a) {
case true:
echo ‘In switch(true)<br />’;
function fun()
{
echo ‘In fun<br />’;
}
fun();
break;
}
?>
The End

This WILL Work:
<?php
function fun()
{
echo ‘In fun<br />’;
}
$a = true;
switch($a) {
case true:
echo ‘In switch(true)<br />’;
fun();
break;
}
?>
The End

And so will this:
<?php
switch(true) {
case true:
echo ‘In switch(true)<br />’;
function fun()
{
echo ‘In fun<br />’;
}
fun();
break;
}
?>
The End

Uhh crazy.

Wally helps out at Microsoft.

January 24th, 2006

From: brett.bieber@gmail.com
Sent: Monday, January 23, 2006 10:36:35 PM UTC
To: VIDEO.FREE.NA.US.EN.SYK.MNL.TS.T01.SPT.00.EM
Subject: MSN Video:I am having technical pro:launching MSN Video

Service:
MSN Video

What type of problem do you have?
I am having technical problems with….
launching MSN Video

Full Name:
Brett Bieber

What e-mail address would you like a response sent to?
brett.bieber@gmail.com

To ensure a quick resolution, provide as many details as possible, including the date and time the problem occurred, a description of what you were trying to do, the detailed steps you took that led up to the problem, and details on any error messages that you received.
Can’t play wmv content even though I have the codecs installed. See this page: http://www.microsoft.com/windows/windowsmedia/player/flip4mac.mspx

and quote “view Windows Media content on the Internet using a Web browser.”

Frequency of the issue:
Always present

Type of Internet connection:
T1 or faster, or company LAN

And Wally wrote me back.

Hello Brett,

Thank you for writing to MSN Entertainment Technical Support.

This is Wally and I understand that you are unable to play WMV files in your computer. Please accept my apologies for the inconvenience this has caused you.

For you to be provided with the best support for your concern, please allow me to direct you to Windows Media Player Support. They handle issues concerning the Windows Media Player software. You may refer to the information posted below for their available online help on your issues and concern.

For additional references, please allow me to direct you to Windows Media Player Support sites below:

Knowledge Center: http://www.microsoft.com/windows/windowsmedia/knowledgecenter/

Windows Media Player 9: http://www.microsoft.com/windows/windowsmedia/9series/player/faq.aspx

Windows Media Player 10: http://www.microsoft.com/windows/windowsmedia/mp10/faq.aspx

On the other hand, if you are using Windows Media Player (WMP) 10, we highly recommend you contact WMP 10 support services. Rest assured that they are in the best position to assist you in resolving your Windows Media Player related concerns. To go to their support, please go to this site:

https://support.microsoft.com/common/survey.aspx?scid=sw;en;1214&showpage=1&WS=mscom&url=http%3a%2f%2fwww.microsoft.com%2f

As one of our valued customers, your satisfaction is one of our primary concerns. Please feel free to write back if you have other questions or if we can be of assistance to you in any way.

Thank you for using MSN Entertainment.

Sincerely,

Wally
MSN Entertainment Technical Support

To be fair, I didn’t supply all the details they asked for…. but Wally didn’t check into everything I referenced in my email. FLIP4MAC allows WMV content to be played on my MAC, and is endorsed/distributed by Microsoft now, yet I can’t view MSN’s video content. I go to MSNBC and try to launch a video and it says “To use this product, you need to install free software” (all Windows of course).
wtf

Requested Recipes

January 15th, 2006

Here’s the two most requested recipes from the Star Wars party last night:

Italian Sausage Soup

2 & 3/4 cups chicken broth
1/4 cup heavy cream
1 medium russet potato
2 cups chopped Kale
1/2 lb Spicy Italian Sausage (find it with the bratwurst)
1/4 tsp salt
1/4 tsp crushed red pepper flakes

I usually saute the sausage in the pot I’m going to make the soup in, just enough to sear the outside then add the chicken broth and simmer to finish cooking the sausage.
Slice the potato into 1/4 inch slices and then quarter.
Remove the sausage and let cool before you cut! Add the cream to the warm chicken broth. Slice the sausage and add all the ingredients to the pot. Simmer for about an hour.

Serves 2, but doubles perfectly.

Standard Salsa

3-4 Roma Tomatoes chopped
1/4-1/2 of a medium onion chopped (sweet yellow is my fav)
3-4 slices of a sliced jalepeno (keep a glass jar of these on hand)
1 tsp chopped parsley
1/2 tsp minced garlic
1 T lemon juice
1/2 tsp salt
Pepper to taste

Mix. Adjust each ingredient to taste.

These are a few of my favorite things!, er drinks!

January 4th, 2006

These are a few of my favorite things drinks!

K-RIDE’S MAI TAI

Ingredients:
Rum (Parrot Bay w/ Mango tastes the best) 1.5oz
Triple Sec (cheap, plastic bottle is fine) 0.5oz
Vanilla Syrup (find it with the coffee) 0.5oz
Lime Juice 0.5oz
Orange Juice

Mix all but orange juice with ice in a shaker. Empty into glass, fill with orange juice and garnish with orange slice or cherry.

Makes: 1 happy K-Ride.

To remember the recipe “One and a half, half, half, half.”

CANDY CANE

Ingredients:

Creme De Cacao (white looks better in this drink but dark will work) 2oz
Peppermint Schnapps 2oz
Half & Half (OR Heavy Whipping Cream & Milk) 2oz
Vanilla Ice Cream 1 Cup
Ice 1 Highball

Mix in blender. Garnish with aerosol whipping cream, a candy cane, and grenadine.

Makes: 2 happy drinkers.

The Havana Wine Cabinet

January 2nd, 2006


After nearly 3 weeks of abusing the term carpentry, the Havana Wine Cabinet is finished.