Blogger: Filter posts by label on your main page

January 30th, 2010

I spent quit a while phishing around google trying to figure out how to prevent posts with a certain label from appearing on my main page over at blogger/blogspot. Eventually, I used an adaptation of this method (also detailed here).

To applay this method, edit your blogger sites XML template (be sure to back it up first!), and click “Expand Widget Templates”. Now look for the line:

<b:loop values=’data:posts’ var=’post’>

And find the matching </b:loop> tag.

Replace them and everything between them with the following code:

<b:loop values=’data:posts’ var=’post’>
<b:if cond=’data:blog.url == data:blog.homepageUrl’>
<b:if cond=’data:post.labels’>
<b:loop values=’data:post.labels’ var=’label’>
<b:if cond=’data:label.isLast == &quot;true&quot;’>
<b:if cond=’data:label.name != “Label_To_Filter“>
<b:include data=’post’ name=’printPosts’/>
</b:if>
</b:if>
</b:loop>
</b:if>
<b:else/>
<b:include data=’post’ name=’printPosts’/>
</b:if>
</b:loop>

Now look for the last </b:includable> tag you can find, and paste this code directly after it:

<b:includable id=’printPosts’ var=’post’>
<b:if cond=’data:post.dateHeader’>
<h2 class=’date-header’>
<data:post.dateHeader/>
</h2>
</b:if>
<b:include data=’post’ name=’post’/>
<b:if cond=’data:blog.pageType == “item”‘>
<b:include data=’post’ name=’comments’/>
</b:if>
</b:includable>

Note that this code has a few bugs:

  1. Posts with no label will not be displayed on the main page.
  2. The filtered label must be the last label of a filtered post.
  3. If all your recent stories belong to the filtered category, your blog may appear empty.

I consider these “Features” as they suit my need over at www.luxphile.com – preventing any of my Texture labeled posts from showing up on the main page, and also hiding unlabeled “Blog this” posts from Flickr.

Herbicide

July 14th, 2008

IMG_7600_crop_sat_dark_400_sharp.JPG

On Flickr, on DeviantArt.
Hand-held and snooted 430EX from camera top left.

The text on the barrel reads “Herbicide”
The brand name translates to something on the lines of “duo-exterminate” or “double-exterminate”

Sharing the Xerox 6125 N With Linux clients

July 5th, 2008

In this post I will describe how to share a Xerox 6125 or 6125N printer with a Linux machine through a windows host.

The Xerox 6125 (or 6125N) is an amazing deal – a 300$ network-enabled color laser printer.
Unfortunately, this great price tag comes with one major downside – absolutely no linux compatibility WHATSOEVER.
The Xerox 6125 uses a Host Based PDL and as opposed to most Xerox machines – does not support Postscript or PCL printing languages. Xerox has not released any proprietary drivers for it, and for this reason the Open printing database has categorized it as a paperweight.

There is, however, a way around this – if you have at least one windows machine on your network. By creating a virtual postscript printer, and routing its output to the Xerox 6125 through the windows driver – you can share the printer with any machine capable of printing postscript – namely any major Linux distribution (and mac-os X of course!).

Henrik Schmiediche has written a great guide to setting up a virtual gostscript printer on your windows machine – wich can be found here or mirrored in PDF format here.
Once you have set up your virtual postscript printer, and shared it over the network – set up your linux clients to print to it – either using the same driver as the virtual printer, or the generic “Raw Queue” driver (The HP Color Laserjet 4550 PS suggested in the article works great – make sure you use the postscript version of the driver!).

Galina

May 26th, 2008

galina_side_400.jpg

An old Latvian fishing boat, modified to serve as an example of the rickety boats Jewish immigrants used to travel to Israel during the British mandate.
A ship of this size could have carried as much as 350 immigrants.

30 Second exposure, natural lighting.

On Flickr, on Deviantart.