Digital Base – Blog » blog

Pimpin our Blog

Posted by Gijs Nelissen in All, graphics

We decided to take some time to “pimp” this blog. We still have a long “todo” list, this is just the start…

A quick before & after :)

Before

Old Blog

New & Improved

screenshot13

A quick list of what we did:

  • integrated search box on top
  • recent posts & comments on top
  • added links to search bar
  • updated general layout & cleaned out some of the css

Do you link the pink ?

Wordpress Coltrane – Upgraded to 2.7

Posted by Gijs Nelissen in General

A new version of wordpress is out, codenamed “Coltrane”. So what’s new ?

  • XMLRPC Comments API : nice api to manage comments through xmlrpc
  • Keyboard shortcuts for comment moderation : use keyboard shortcuts to manage the comments
  • Sticky Posts : ability to “stick” a post to homepage
  • Theme update api, like we do for plugins : new admin theme
  • Dashboard and write box rearranging : ability to decide what you want on homepage
  • One-click plugin installs : better plugin handling, easily install plugins through the web interface
  • Reply to comments from withing dashboard
  • Core updating : auto update feature
  • Batch and inline editing
  • ….

Good work wordpress team ! I decided to upgrade my wordpress at once. Check out the difference !

Previously (Wordpress 2.6)

Old Wordpress admin layout (2.6)

New layout (Wordpress 2.7)

screenshot16

Keep up the good work !

Wordpress : Seperate RSS feed for Category / Author / Tag

Posted by Gijs Nelissen in Programming

As you may have read we migrated this blog to a wordpress one. Yeahyeah, we are not officially wordpressified.

My impression of the core

The default wordpress core holds alot of use’eable functions, but it took me a while to figure out how the thing worked. You need to know that wordpress is not really written very object oriented, so basically its a collection of functions although some “under the hood” core functionality is object oriented.

If i was not convinced wordpress is a serious project with a great future, i wouldn’t have chosen it, so let’s not start the “code quality” discussion.

The problem

Something i was missing after the default drupal installation was an easy way to retrieve the related rss feed based on the page the visitor was accessing. If a visitor was on the “all posts by author X” page, the linked rss feed should only hold those posts. Same for category pages and tag pages.

Getting the information of a tag, author of category is very easy. There are some built in functions like get_category, and get_category_feed_link that will give you this information. The downside is, this information is basically only available inside “the loop“.

The solution

To get the information about the selected category, author or tag i had to jump a few hoops. It’s a combination of core functions and some minor custom code where i had to retrieve the current tag from the queried variables.

Then I created a custom method that returns the most related feed based on the page request. The method will check what type of page the visitor is accessing (category, tag, author or main page) and return the appropriate rss feed.

/**
 * This method will give you the most related rss feed based on the current page request
 *
 * @param $type
 * @return string (feed url)
 */
function get_feed_url($type = "rss2_url") {
 
  if (is_category()) {
    $current = get_the_category();
    $current = $current[0]->cat_ID;
    return $url_rss = get_category_feed_link($current,$type);
  }
 
  if (is_author()) {
    $current = get_query_var('author_name');
    $current = get_userdatabylogin($current);
    $current = $current->ID;
 
    return get_author_feed_link($current,$type);
  }
 
  if (is_tag()) {
    $current = get_query_var('tag');
 
    $formaturl = "/feed/";
    switch ($type) {
      case "rss_url":
        $formaturl = "/rss/";
      break;
      case "atom_url":
        $formaturl = "/atom/";
      break;
 
    }
    return get_bloginfo("url") . "/tag/" . $current . $formaturl;
  }
 
  return get_bloginfo($type);
}

Examples

get_feed_url("rss2_url"); // on page /blog/
 
//returns : http://www.digitalbase.eu/blog/feed/
 
get_feed_url("atom_url"); // on page /blog/category/digitalbase/
 
//returns : http://www.digitalbase.eu/blog/category/digitalbase/feed/atom_url/
 
get_feed_url("rss_url"); // on page /blog/tag/symfony
 
//returns : http://www.digitalbase.eu/blog/tag/symfony/rss/

Enjoy

Blog : Moved to Wordpress

Posted by Gijs Nelissen in General

I hate reinventing the wheel. That’s why i decided to migrate this blog to wordpress. It takes alot of effort to write your own symfony plugin that holds the functionality of a full stack blogging platform (like wordpress, typepad, blogger …).

The Symfony Story

Initially we started by using the simpleBlogPlugin and modifying it to our needs. Some of the things we added :

  • multilanguage support : different posts in english / dutch
  • tag cloud : although they did add this in the new version
  • author information : links to digg/linkedin profile
  • tag / category pages
  • some SEO basics (different descriptions/keywords per post/page)
  • seperate rss feeds (for tag/description/author pages)
  • summary/excerpt support

Then why change to wordpress ?

To keep this all updated with the changing symfony framework takes some time. Adding common features popular blogging platforms offer (comment, askimet integration, image editing, …) is a huge job. Thats why i decided to “migrate” this blog to wordpress.

I did a little hacking here & there to have it support multiple languages, created a custom theme (holding the old digitalbase theme layout) and added some clearly missing core functions.

I’ll do a followup post with the things i changed and some code.