January 3rd, 2009
Thought Wordpress nerds might find this useful, a function to retrieve a list of posts by passing in a custom filed key=>value pair, with an optional count parameter.
Just drop this in your “functions.php”:
function getPostsByMeta($key, $value, $count = -1)
{
global $wpdb;
$sql = "SELECT DISTINCT wp_posts.post_title,
wp_posts.ID FROM $wpdb->posts,
$wpdb->postmeta
WHERE $wpdb->posts.ID = $wpdb->postmeta.post_id
AND $wpdb->posts.post_status = 'publish'
AND $wpdb->postmeta.meta_key = '$key'
AND $wpdb->postmeta.meta_value = '$value'
ORDER BY post_date DESC";
$sql .= ($count != -1) ? " LIMIT ".$count : "" ;
return $wpdb->get_results($sql);
}
and then you can use it like this:
$news_home = getPostsByMeta('_tb_post_section', 'News', 3);
<?php foreach ($news_home as $news) : ?>
<!-- OUTPUT TEMPLATED HTML -->
<?php endforeach; ?>
Tags: code, custom fields, Dane Hesseldahl, Web Development, wordpress || || No Comments »
September 27th, 2008
Here are the files from my presentation today at Wordcamp Portland.
PDF of my Keynote
Email Update Plugin Files
…. trust me. I have a lot more to say about Wordcamp, but I’ll have to get to it tomorrow - I’m exhausted. That was a LONG day.
Tags: #wordcampdx, code, Web Development, wordpress || || 3 Comments »
September 23rd, 2008

URL: http://www.electroluxappliances.com/node58.aspx
AGENCY: Struck Creative / DDB-NY
LAUNCH: January 2008
ROLE: Lead Developer
I relied heavily upon Arthur Debert’s Bulk Loader to create this video and audio heavy media site. Media files load in the background and you view other content, to create as seemless an experience as possible.
Tags: Actionscript, code, Dane Hesseldahl, electrolux, flash, portfolio, projects, struck creative || || No Comments »
September 22nd, 2008

URL: http://www.usedcarambush.com/
AGENCY: STRUCK Creative
LAUNCH: July 2008
ROLE: Lead Developer / Technical Architect
This was the last project that I worked on at STRUCK before I left for NEMO. The site is built entirely in ActionScript3 and I personally built the Papervision 3D powered van interior, and the media queue and streaming system.
Tags: Actionscript, code, flash, portfolio, project, Struck, Web Development, work || || No Comments »
September 22nd, 2008

URL: http://www.hp.com/voodoodna/
AGENCY: NEMO
LAUNCH: June 2008
ROLE: Lead Developer / Technical Architect
Tags: Actionscript, code, Dane Hesseldahl, flash, HP, portfolio, projects, Web Development, work || || No Comments »
September 21st, 2008

URL: http://thewilife.urbandaddy.com/
AGENCY: Left Fields Labs
LAUNCH: August 2008
ROLE: Lead Developer
TECHNOLOGIES: Flash
Flash based site for UrbanDaddy and Sony to help travelers locate Wi-Fi hot-spots in San Francisco and New York. ActionScript 3 that integrates with the flash-based Yahoo Maps API.
Tags: Actionscript, API, code, flash, portfolio, projects, Yahoo Maps || || No Comments »
September 21st, 2008

URL: http://utah.travel/
AGENCY: Struck Creative
LAUNCH: March 2008
ROLE: Lead Developer
TECHNOLOGIES: Flash, Python + Django
Flash based site I did while at Struck for the Utah Office of Tourism. The data is all dynamic and is pulled from a Django based CMS that allow the client to update the content at any time.
Tags: code, Dane Hesseldahl, django, flash, portfolio, projects, Python, Struck, Web Development || || No Comments »
September 21st, 2008

I am speaking this Saturday September 27th @ WordCamp Portland.
I’ll be talking about extending the functionality of Wordpress by writing custom plug-ins, and creating your own administration menus & functionality.
Registration is still open but they’re capping attendence at 150, and I hear that they’re pretty close - so if you wanna go register now.
Tags: code, PHP, portland, Web Development, wordcamp portland, wordpress || || 1 Comment »
September 21st, 2008
Djangonaut Simon Willison has published a simple Python-based S3 backup script.
“One simple strategy for backing up a server to S3: a single backup_to_s3 function which takes your S3 authentication details plus three (optional) dictionaries specifying directories, files and commands to be backed up.”
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| backup_to_s3(
access_key = 'your-access-key',
secret_access_key = 'your-secret-access-key',
bucket = 'your-backup-bucket',
directories = {
'svnroot': '/var/svnroot',
'www': '/var/www',
},
commands = {
'test.sql': 'mysqldump -u root test',
},
files = {
'passwd': '/etc/passwd',
}
) |
Tags: code, django, Python, S3, Simon Willision || || No Comments »