Although I'd been pretty quiet work wise for the past few weeks, it's not picked up. Next Wednesday we go live with a new site.
Luckily the site is really only one page. That's not _exactly_ true, but sort of. It's for the classic (1980's-1990's) American Gladiators. Cool stuff.. cept nothing to do programming wise.
I have created a DB table for the video's, game's, downloads and cast. Aside from that there's no other data!
Took about 20 mins to create the admin site, and about 20 more to customize it. Waiting on the front end to start integration.
I just can't think of anything else moderately interesting to post. Tonight I'll be working on my side project, to try and get it out the door faster.
Cheers
Tuesday, April 29, 2008
Thursday, April 17, 2008
Front end fun - LiveValidation & mooSwitch
Being a back end developer means that most of the time I don't get to do anything fun on the front end (well.. that's relative since I don't really like doing front end stuff). Recently I've been spending a lot more time using AJAX for pages that I don't want to reload. Initially I wasn't liking it one little bit, but now I've come to not mind it so much. Especially since I really don't have to write much in the way of Javascript, except to use it to capture a click and send the data to PHP.
I found two very neat new add ons to use in my forms. One of the I was completely blown away by how simple it is to implement: Live Validation
Their website is very straight forward, and using the functions is incredibly easy. All the examples work, and show you specifically what to add to your forms to use. Right now I'm using the email validation, and the password matching validation. I will continue to do server side form validation, but this is going to make my forms so much more user friendly!
The other is called mooSwitch. In a new form design, the designer wanted the radio buttons to appear as a small toggle/slider. I googled what I was looking for, and this one came up. Within a few minutes, I had my radio buttons being sliders. It does require mootools, but the front end developer is using that already, so no worries.
I've been doing a ton of development recently, but I'll break up my posts over a few days to spread the topics.
Cheers!
I found two very neat new add ons to use in my forms. One of the I was completely blown away by how simple it is to implement: Live Validation
Their website is very straight forward, and using the functions is incredibly easy. All the examples work, and show you specifically what to add to your forms to use. Right now I'm using the email validation, and the password matching validation. I will continue to do server side form validation, but this is going to make my forms so much more user friendly!
The other is called mooSwitch. In a new form design, the designer wanted the radio buttons to appear as a small toggle/slider. I googled what I was looking for, and this one came up. Within a few minutes, I had my radio buttons being sliders. It does require mootools, but the front end developer is using that already, so no worries.
I've been doing a ton of development recently, but I'll break up my posts over a few days to spread the topics.
Cheers!
Tuesday, April 15, 2008
RSS feed links as error messages
Things have been pretty quiet here of late work wise, so I decided that I was bored with writing error messages for our internal tools. The person who uses the tools 99% of the time had expressed the opinion that error messages such as: There was an error, try again later; are boring, and she prefers the ones I write when I'm mad: It didn't work. BUMMER!.
With this in mind, and knowing her love for a certain blog that talks about celebrities in an unflattering light.. I thought wouldn't it be fun to incorporate links to the blog, with headlines, in the messages. This will aid me in two ways. Firstly she will have something to do while I fix the error. Secondly it will make her like me more, thereby improving communication between our parts of the sites. OK.. maybe the second one isn't the real reason..
I searched for a while trying to find a super simple way of grabbing what I needed. Honestly I don't remember it being this hard last time, but I settled on an example, and some tools from Bobulous.
I'm using the xml regex functions from Bobulous, as well as the make_safe function (good idea, and similar to one I already have).
The resultant code looks like this:
$xml = file_get_contents('http://dlisted.com/rss.xml');
$news_items = element_set('item', $xml);
foreach($news_items as $item) {
$title = value_in('title', $item);
$url = value_in('link', $item);
$item_array[] = array(
'title' => $title,
'url' => $url);
}
if (sizeof($item_array) > 0) {
$count = 0;
$html="";
foreach ($item_array as $item) {
//I removed the link from the next line.. blogger was not pleased
$html .=make_safe($item['title']);
$html .= ', ';
// Limit the output to three news items.
if (++$count == 3) {
break;
}
}
$html .= '<br>';
$funniest_error=$html;
}
Now wherever I want to leave a nice lil title/link for the users, I'll include this page, and put $funniest_error wherever I want the list of 3 links to appear!
Fun!
With this in mind, and knowing her love for a certain blog that talks about celebrities in an unflattering light.. I thought wouldn't it be fun to incorporate links to the blog, with headlines, in the messages. This will aid me in two ways. Firstly she will have something to do while I fix the error. Secondly it will make her like me more, thereby improving communication between our parts of the sites. OK.. maybe the second one isn't the real reason..
I searched for a while trying to find a super simple way of grabbing what I needed. Honestly I don't remember it being this hard last time, but I settled on an example, and some tools from Bobulous.
I'm using the xml regex functions from Bobulous, as well as the make_safe function (good idea, and similar to one I already have).
The resultant code looks like this:
$xml = file_get_contents('http://dlisted.com/rss.xml');
$news_items = element_set('item', $xml);
foreach($news_items as $item) {
$title = value_in('title', $item);
$url = value_in('link', $item);
$item_array[] = array(
'title' => $title,
'url' => $url);
}
if (sizeof($item_array) > 0) {
$count = 0;
$html="";
foreach ($item_array as $item) {
//I removed the link from the next line.. blogger was not pleased
$html .=make_safe($item['title']);
$html .= ', ';
// Limit the output to three news items.
if (++$count == 3) {
break;
}
}
$html .= '<br>';
$funniest_error=$html;
}
Now wherever I want to leave a nice lil title/link for the users, I'll include this page, and put $funniest_error wherever I want the list of 3 links to appear!
Fun!
Thursday, April 10, 2008
Writing a throw away content managed page
The title of this post is a touch confusing, since the page itself is not exactly throw away, but it going to be completely different in the next few months, or whenever we get go ahead for the redesign.
Custom throw away content management is pretty much my specialty now anyhow! Nothing else to code, might as well get on with it.
I'll be using the same includes as the regular tools, and attach the admin page to the nav in the existing tools. It has a sub nav for each section of the page that needs to be managed.
Sub nav as follows:
Main
Secondary
More Movies
Bottom Left
Bottom Middle
Bottom Right
Since the three boxes along the bottom of the page can have any title at all, it's hard to name them except to describe their location.
The main section is going to be a bit tricky (actually secondary will be tricky too).
It consists of a large image, and some javascript to embed some quicktime links with a link to the official site.
Basically just going to create a table for each section, and a main table which links all the pieces together. Not sure yet how to structure that all in an easy to use page for our site content manager.
FUN!
(Will post code snips once I actually write some)
Cheers!
Custom throw away content management is pretty much my specialty now anyhow! Nothing else to code, might as well get on with it.
I'll be using the same includes as the regular tools, and attach the admin page to the nav in the existing tools. It has a sub nav for each section of the page that needs to be managed.
Sub nav as follows:
Main
Secondary
More Movies
Bottom Left
Bottom Middle
Bottom Right
Since the three boxes along the bottom of the page can have any title at all, it's hard to name them except to describe their location.
The main section is going to be a bit tricky (actually secondary will be tricky too).
It consists of a large image, and some javascript to embed some quicktime links with a link to the official site.
Basically just going to create a table for each section, and a main table which links all the pieces together. Not sure yet how to structure that all in an easy to use page for our site content manager.
FUN!
(Will post code snips once I actually write some)
Cheers!
Wednesday, April 9, 2008
Programming instructions.. for my cat feeder..
Yeah seriously.. someone posted this cheat sheet on amazon, and I need to put it here so I don't lose it, and when the batteries die I can reprogram the damn thing.
snip------------>
Cheat Sheet for Programming Le bistro Portion Control Feeder
Press and hold program button, press and hold + button let go of both at the same time. Unit should go to meal time.
Press + and unit moves to meal size
Press + and unit moves to current time.
Press set.
AM will be flashing, if you need PM press + then press set
First number will be flashing
Pressing program moves to the next number
+ changes the number
When the time is correct press set
Unit will go to meal time, press set
Breakfast will be flashing, press program unit will move to the first number
To change the number press +
To move to the next number press program
Do this until the time is set, Press program one more time and the number in the right upper corner will be flashing
1 means yes I want to feed this meal
0 means no I do not want to feed this meal
Select 1 or 0 and press set
Unit will go to meal time press set
Unit will go to Breakfast, press + and it will move to lunch
***to set 12:00 you will need to set 00:00 unit will NOT set 12***
Press program and the first number will start to flash--set the time in the same manner you set Breakfast
Set 1 or 0 to feed or not to feed then press set
Unit will go back to meal time, press set
Unit will go to breakfast, press + will go to lunch press + again and unit will move to dinner
Press program and first number will start to flash, set time in the same manner you set breakfast and lunch.
Set 1 or 0 to feed or not to feed then press set
Unit will go back to meal time, press +
Unit will go to meal size
Press set
1 in the right upper corner will start to flash
1=1/4 cup
2=1/2 cup
3=3/4 cup...etc
Select amount you want to feed.
**** Unit will feed the same amount for each meal***
Press set and unit will go back to meal time
Press and hold program button, press and hold set button let go of both at the same time.
Unit should have the correct time, the amount you selected to feed in the upper right hand corner and the meals you select on the left side.
***00 in the bottom right corner is the number of meals fed***
***To manual feed press set and hold, press + and hold, let go of both buttons at the same time. Unit will feed until you press set and + again
------------>
Woot!
snip------------>
Cheat Sheet for Programming Le bistro Portion Control Feeder
Press and hold program button, press and hold + button let go of both at the same time. Unit should go to meal time.
Press + and unit moves to meal size
Press + and unit moves to current time.
Press set.
AM will be flashing, if you need PM press + then press set
First number will be flashing
Pressing program moves to the next number
+ changes the number
When the time is correct press set
Unit will go to meal time, press set
Breakfast will be flashing, press program unit will move to the first number
To change the number press +
To move to the next number press program
Do this until the time is set, Press program one more time and the number in the right upper corner will be flashing
1 means yes I want to feed this meal
0 means no I do not want to feed this meal
Select 1 or 0 and press set
Unit will go to meal time press set
Unit will go to Breakfast, press + and it will move to lunch
***to set 12:00 you will need to set 00:00 unit will NOT set 12***
Press program and the first number will start to flash--set the time in the same manner you set Breakfast
Set 1 or 0 to feed or not to feed then press set
Unit will go back to meal time, press set
Unit will go to breakfast, press + will go to lunch press + again and unit will move to dinner
Press program and first number will start to flash, set time in the same manner you set breakfast and lunch.
Set 1 or 0 to feed or not to feed then press set
Unit will go back to meal time, press +
Unit will go to meal size
Press set
1 in the right upper corner will start to flash
1=1/4 cup
2=1/2 cup
3=3/4 cup...etc
Select amount you want to feed.
**** Unit will feed the same amount for each meal***
Press set and unit will go back to meal time
Press and hold program button, press and hold set button let go of both at the same time.
Unit should have the correct time, the amount you selected to feed in the upper right hand corner and the meals you select on the left side.
***00 in the bottom right corner is the number of meals fed***
***To manual feed press set and hold, press + and hold, let go of both buttons at the same time. Unit will feed until you press set and + again
------------>
Woot!
Friday, April 4, 2008
Massive Virtual Hosts file
That would sum up my week.. sorting through a massive and horribly disorganized virtual hosts file. Trying to determine what url's are actually still live, which ones even point to the servers still, and which one's I can redirect or simply delete.
There are over 5000 lines in the file.. Yep! That's a whole heap. I've chopped it into many sub files, so I can work on them piecemeal, and then put them back together and push live.
JOY!
<virtualhost 80="">
ServerName pretendurl.com
ServerAlias www.pretendurl.com
Redirect / http://www.otherurl.com/
</virtualhost>
There are over 5000 lines in the file.. Yep! That's a whole heap. I've chopped it into many sub files, so I can work on them piecemeal, and then put them back together and push live.
JOY!
<virtualhost 80="">
ServerName pretendurl.com
ServerAlias www.pretendurl.com
Redirect / http://www.otherurl.com/
</virtualhost>
Subscribe to:
Posts (Atom)