Showing posts with label General. Show all posts
Showing posts with label General. Show all posts

Blogger: Filter posts by label on your main page

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.

Getting Gmail java app on Motorola i760

gmail on i760My i760 came without a proper web-browser - so I could not download the Gmail java app through the phone, or access m.gmail.com to check my mail.

The solution to this problem is downloading the Gmail java application files from the google servers here:
gm-Generic-Advanced_MIDP2.jad
gmail-g.jar
Then upload them to your phone using a data cable, and a J2ME media loader application like myJal. Depending on the software you use, you may have to rename the above files so that they have identical filenames (i.e. rename "gm-Generic-Advanced_MIDP2.jad" to "gmail-g.jad" - do not change the extensions!)

Once you load the files up to your phone "gmail" should appear in you Java applications folder. Clicking "gmail" will preform a short installation process, after which you will be prompted for your Gmail user-name and password. Once you enter your information, you'll be logged on to your Gmail account and able to read and write mail!

Migrating to wordpress

As of today, BoazArad.com has migrated to Wordpress.
The previous site engine was a homegrown, and very high maintenance PHP engine. Since posting and editing in my old engine were too time consuming - the site barely got any updates. Wordpress should help fix that problem.

Obviously, there will be some growing pains, and as you can see, most of the previous site content is offline. Old articles will be added retroactively, and I'm hoping to get the image and computer mod galleries back up soon.

The old site is still available here.

Thanks for your patience.