Obvious Ideas

From the desk of a Software Developer

Archive for the ‘Tutorial’ tag

Handling RSS Feeds with PHP using Zend_Feed

View Comments

Zend Framework is becoming a very comprehensive set of widely needed components for PHP development. As other frameworks offer similar components, one of Zend’s Framework greatest strengthens is the fact that you can use its components as stand alone components and not only as part of the MVC structure. In this post I will show how you can easily use it’s Zend_Feed component to merge feeds.

Recently I though of making one combines RSS feed of both of my blogs and my twitter updates. There are some RSS merging services out there, and there’s also Yahoo pipes which seems that it’s most useful ability is to do various RSS tweaking tasks. As part of my playing around with the Zend Framework, I’ve decided to make this merged RSS feed using the Zend_Feed component. Actually at the end I’ve realized that this merged feed idea is quite useless, but at least this post came out of it :-)

Most of the basic actions, like importing an RSS feed, creating an RSS feed and more are covered in the Zend Framework manual. In this post I will elaborate more on the more advanced topics, like sorting and merging RSS feeds but I will also go briefly over the more basic stuff as well.

So let’s begin.

Read the rest of this entry »

Written by Arik

February 25th, 2008 at 9:58 pm

Make your blog printer friendly!

View Comments

On November I saw on digg a link to Dave Child’s mod_rewrite cheat sheet. While visiting his blog I found out a comprehnsive collection of cheat sheet and a blog post about making printer friendly pages using CSS. I was amazed to find out that CSS allows authors to create media-specific styles for a single document. This with the display:none CSS declaration made things easy to implement a printer friendly version of your blog (or website, of course).

I searched the web for a generic printer friendly CSS for Wordpress or something similar, but found nothing. I did find some helpful resources like:

  1. Codex: Styling for Print – explanations, samples and links
  2. Aleeya.Net: CSS Printer Friendly for Wordpress – a sample CSS (didn’t work on Cutline theme) an some tips on how to make your own CSS.
  3. A List Apart: Going to Print – article by A List Apart on how to make a CSS for printer-friendly page version.

After reading this , I understood that there’re no shortcuts – I will have to make a CSS suitable for my theme by myself. I decided to make a printer-friendly CSS for the Cutline Theme (see it working on Opher Brayer’s Blog). Although I’m not a CSS expert it wasn’t that hard, and didn’t took more than 1 hour.

The process of making the new CSS are as following:

Read the rest of this entry »

Written by Arik

December 6th, 2006 at 12:47 am