Archive for the ‘dagensskiva’ Category

Browsing record-covers: Coverflow

Wednesday, May 14th, 2008

Undeniably inspired by the iPod Touch, I put together a WordPress plugin that displays covers in the ‘Coverflow’ fashion. The actual animated browser comes from Weber Design Labs (open source and brilliant), but I hacked it slightly, adding parameters specifying what posts to get using query arguments sent to dymanically generated xml file. I also changed the colours, reflection, and changed the slider from being images to being vectors (so that we can change the colours and scale it).

This is currently being used for the advanced search.

Here’s what it looks like.

Pretty!

On the format and media of record releases

Saturday, March 22nd, 2008

We’ve had a confusing way of specifying the medium (physical, or virtual) and format (i.e. length) of a record release at dagensskiva.com. We have now restructured how this is represented, into two main components:

Formats:

  • album
  • single
  • ep
  • song
  • box
  • playlist

Media:

  • cd
  • 7”
  • 10”
  • 12”
  • mp3
  • aac
  • wma
  • myspace

In addition to this, we specify how mauy of the specified media constitutes the release, so that an album can be specified as, e.g. album (2×cd), song (mp3), box (10×12″), etc…

Did we miss anything?

Setting the template for individual posts

Thursday, March 20th, 2008

I hashed together a plugin that enables authors to specify a specific template file to be used for a post (this functionality is already built in for pages, but not for posts).

<?php
/*
Plugin Name: Template for posts
Plugin URI: http://labs.dagensskiva.com
Description: Set the template file for a post by setting the Custom Field 'dsc_template' to the filename of the template
Version: 0.1
Author: Henrik
*/
?>

function dsc_post_template() {
  global $post, $wp_query;

  if (count($wp_query->posts) == 1) {
    $id = $wp_query->posts[0]->ID;
    if ($temp = get_post_meta($id, 'dsc_template', true)) {
      include( TEMPLATEPATH . '/' .$temp );
      exit(0);
    }
  }
}
add_filter('template_redirect', 'dsc_post_template', 9);

Usage: a Custom Field called ‘dsc_template’ is set to equal the basename of the file, e.g. ‘interview.php’, placed inside your theme folder. Simple as that. It only applies the template file if $wp_query contains only one post, i.e. where the template file ’single.php’ would normally be applied.

Post to MySpace

Wednesday, March 19th, 2008

Added functionality to post content to MySpace. Altered the function to allow for Javascript being turned off.

<a href="http://www.myspace.com/Modules/PostTo/Pages/?t=<?php the_title(); ?> | dagensskiva.com&u=<?php the_permalink(); ?>&c=dagensskiva.com&l=3" onclick="GetThis('<?php the_title(); ?< | dagensskiva.com', '<?php echo wptexturize(dsc_generate_excerpt(get_the_content(), 20, 20)); ?>', '<?php the_permalink(); ?>', 1); return false;" class="myspace">Myspace</a>

Post to MySpace

Put dagensskiva.com on your iPod Touch

Thursday, January 31st, 2008

You can add dagenskiva.com as a webclip on your iPod Touch or iPhone, with a pretty icon, for one click access.

The icon that the iPod looks for is the apple-touch-icon.png file, located in the sites root directory.

Record of the year Easter Egg

Friday, January 11th, 2008

Now that the votes have been counted for the selection of the Record of the Year 2007, I’ll post the image that was shown if a visitor tried to vote more than once. Kal made it on http://mine.icanhascheezburger.com and it cracks me up every time.

Men du har ju redan rostat!

dagensskiva.com 4.1

Monday, November 12th, 2007

Back in early November we sat down and upgraded dagensskiva.com to version 4.1. Features in this release include:

  • Upgrade to Wordpress 2.3.1
  • Upgrade to BBPress 0.8.3
  • Migration to WP internal tag handling (and leaving Ultimate Tag Warrior behind).
  • For the ‘Relaterat’ field we now use a modified version of WP 2.3 Related Posts , which matches posts based on tags. The changes made formats the title to include information stored in custom fields.
  • JQuery feature in BBPress that shows who tagged what (and how many times).
  • The last.fm radio based on tracks submitted to the dagensskiva group.