Major web update for Slipstream Longboards!

Uncategorized No Comments »

A brand new Slipstream Longboards web site has been launched, check it out!

Screenshot: Slipstream web site #3 - First page Screenshot: Slipstream web site #3 - Footage Screenshot: Slipstream web site #3 - Products Screenshot: Slipstream web site #3 - Contact

Sambassadeur - Todays pop song!

Uncategorized 1 Comment »

Sambassadeur -Between the lines is todays pop song! Download it from the media part from their web site.

Using WordPress as news column

Uncategorized No Comments »

When building my latest web site (Slipstream Longboards) I figured that I should use some existing tools for the news column. Since I had some knowledge about WordPress I decided to go with that. What I wanted was to use the nice WYSIWG editor WordPress and also to have a nice way to generate the RSS Feeds.

I started reading on the WordPress web site and found that there is a nice API for this type of sites (See the Codex pages).

Basically, this is what I did:

  1. Installed WordPress
  2. Moved and transformed the old data
  3. Outputed the data from WordPress to a non WordPress page
  4. Outputed the data from WordPress to a RSS Feed

I will describe how I did step two, tree and four below. For more information about installing WordPress see the WordPress web site.

Move and transform the old data

Since the old data was a limited amount of data (about 10 news posts) I figured that I should just output the data and then do some text manipulation which made it compliant to the MovableType format and then import it into WordPress. This turned out to work well and I had the data inserted into WordPress in less than an hour.

Output the data to a page outside of WordPress

To get the data from WordPress I used the WordPress loop which is a way to query the database and output the data. It is realy easy to use.

First you include a file from WordPress using:

define('WP_USE_THEMES', false);
require('./news/wp-blog-header.php');

Then you can use the WordPress Loop.

if ( have_posts() ) : while ( have_posts() ) : the_post();
// Output your data here
endwhile;

To output for example the title and the body for your posts you use:

if ( have_posts() ) : while ( have_posts() ) : the_post();
the_title();
the_content();
endwhile;

It is possible to restrict the data to only output for example posts with a different author or to only output posts in a specific category. See the Codex page for more information about this.

Output the data from WordPress to a RSS Feed

To customize the RSS Feed for this web site I simply copied the wp-rss2.php from WordPress and changed;

  1. the URL to the web site to point to the first page for the web site instead of the first page for the blog
  2. the URLs to each item to be displayed on the web site instead of the blog
  3. I also had to include the wp-blog-header.php file (all as done above) and remove the include for the wp-config.php and delete the the call to the wp(feed=rss2)

And that produced a nice feed.

Mike Skinner interview at Great Albums

Uncategorized No Comments »

The interview with Mike Skinner at the Great Albums podcast was interesting. If you like him, look it up!

Gamlestan skateboard footage!

Uncategorized 3 Comments »

Some footage from todays skateboarding! Enjoy! The images can be found at my Picasa Web Album as well.

Ollie sequence thumb
Jerry Svensson

Ollie Thumb
Erik Olsson

Erik 5050 thumb
Erik, again

Senap NG
“Senap”

See About page for credits.
Entries RSS Comments RSS Log in