Friday, 2 May 2014

Display Blogger Posts in Grid View with Thumbnails

Grid View with Thumbnails is a script for self-hosted Blogger blogs which will display blog posts as a thumbnail grid of images in homepage and archive pages. Instead of sending your blog visitors to a page that displays all the posts in full length with a large image which takes up too much space and requires too much scrolling, now we can have a clean page that displays a gallery grid, with thumbnails and post titles, linking back to the source post for that thumbnail.

Let's take a look at how it will look like in this demo blog.

grid view on blogger posts

If you have a wallpaper or photo blog that would benefit from displaying a thumbnail grid style layout, look no further. Here's how you can add Grid (gallery) View to Blogger posts.

Adding Grid (Gallery) View to Blogger Posts

Step 1. Log into your Blogger account and go to "Template", then click on the "Edit HTML" button

blogger template html

Step 2. Click anywhere inside the code area and press the CTRL + F keys to open the search box


Step 3. Type </head> inside the search box and hit Enter to find it.

Step 4. Just above the </head> tag, add the following script and CSS codes:
<script src='http://code.jquery.com/jquery-1.9.1.js'/>
<b:if cond='data:blog.pageType != &quot;item&quot;'><b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<script type='text/javascript'>//<![CDATA[
function hideLightbox(){for(var a=document.getElementsByTagName("img"),b=0;b<a.length;++b)a[b].onmouseover=function(){var a=this.parentNode.innerHTML;this.parentNode.innerHTML=a,this.onmouseover=null}}$(document).ready(function(){var a=200,b=170,c="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCl3h7fZIAWly9xCrrsGgOFTXyDJ0tKPHbUiMZOe0N7m0qleiVhjQ2p_pRzrsnEoZMYoyLCoJbYaOyzOo7nn-vJ-B2iE_2NjJj3-3eWIdulb_uKmw8phcTCXx1yO92hn2EupnFl2vinz0/w500-c-h330/no-thumb.png",d=1;$(".post-body").each(function(e,f){var f=$(f),g=$(f).find("img").first(),h=f.parent().find("h3 a"),i=h.attr("href"),j=h.text();if($(h).remove(),f.empty(),g.attr("src")){var k=g.attr("height"),l=g.attr("width"),m=$(g).parent();if(f.append(m),d)g.attr({src:g.attr("src").replace(/s\B\d{3,4}/,"w500-h330-c")}),g.removeAttr("width").removeAttr("height");else{g.attr({src:g.attr("src").replace(/s\B\d{3,4}/,"s"+a)}),g.removeAttr("width");var n=(k/l*a).toFixed(0);g.attr("height",n)}}else var g=$("<img>").attr("src",c),m=$("<a>").append(g).appendTo(f);m.attr("href",i).css("clear","none").css("margin-left","0").css("margin-right","0").addClass("postThumbnail");var o=$("<div>").prepend(j).css("opacity","0.9").css("filter","alpha(opacity=0.9)").appendTo(m);o.height();o.css("margin-top","-28px"),f.css("height",b).css("overflow","hidden")}),$("#blog-pager").css("clear","both")}),window.addEventListener?window.addEventListener("load",hideLightbox,void 0):window.attachEvent("onload",hideLightbox);
//]]>
</script>
<style type='text/css'>
.post {
width:31.3%;
float:left;
display:inline-block;
border-bottom: medium none;
margin: 0 1% 2%;
padding-bottom: 0;
}
h2.date-header,.post-footer {
display: none;
}
h3.post-title, .comments h4,.post-header{margin:0;}
.postThumbnail:hover {text-decoration:none;}
a.postThumbnail div {
text-decoration: none;
color: #fff;
padding:0 5px;
height:24px;
font:bold 12px/25px &quot;Trebuchet MS&quot;,Trebuchet,Verdana,sans-serif;
text-transform: capitalize;
background: rgb(125,126,125);
background: -moz-linear-gradient(top,  rgba(125,126,125,1) 0%, rgba(14,14,14,1) 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(125,126,125,1)), color-stop(100%,rgba(14,14,14,1)));
background: -webkit-linear-gradient(top,  rgba(125,126,125,1) 0%,rgba(14,14,14,1) 100%);
background: -o-linear-gradient(top,  rgba(125,126,125,1) 0%,rgba(14,14,14,1) 100%);
background: -ms-linear-gradient(top,  rgba(125,126,125,1) 0%,rgba(14,14,14,1) 100%);
background: linear-gradient(to bottom,  rgba(125,126,125,1) 0%,rgba(14,14,14,1) 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=&#39;#7d7e7d&#39;,endColorstr=&#39;#0e0e0e&#39;,GradientType=0 );
}
.postThumbnail{width:100%;}
.postThumbnail:hover div {
display: block;
}
.postThumbnail img {
width:100%;
background-color: transparent;
border: medium none;
padding: 0px;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
transition: opacity .25s ease-in-out;
-moz-transition: opacity .25s ease-in-out;
-webkit-transition: opacity .25s ease-in-out;
}
.postThumbnail img:hover {
-ms-filter: &quot;progid: DXImageTransform.Microsoft.Alpha(Opacity=70)&quot;;
filter: alpha(opacity=70);
-moz-opacity: 0.7;
-khtml-opacity: 0.7;
opacity: 0.7;
}
</style>
</b:if></b:if>
Note: If there's too much space below the posts, modify the 170 height value.

Step 5. Click on the "Save template" button to save the changes and View your blog. Now you should have a nice grid view on your Blogger posts. Enjoy!

Wednesday, 30 April 2014

Freeablo is that Diablo engine remake we've been wishing for, is currenly looking for contributors (and general ravings about Diablo. In fact, mostly that)

Freeablo engine in its early stages
Who doesn't love the original Diablo? When it was first released in 1996, this game set a notable landmark for making the RPG genre more accessible to a broader audience, while still keeping many gameplay aspects of classic Rogue-derived RPGs, that kept the game fresh and unique even after being completed several times. This bridge between classic and modern aspects combined with an incredible attention to detail, a uniquely crafted atmosphere that still gives me the creeps, and a gameplay pacing and length that is just the right balance between level progression and grinding, has helped making Diablo one of my all time favourite games. Well, that and Battlenet, of course, we can never forget how Diablo was one of the first to make it so easy to just go dungeon crawling with a couple of friends online.

There is, however, one thing that I don't like about Diablo. One thing that annoyed me all over these years of repeated runs and occasional multiplayer meetups. And that is how Blizzard itself decided to neglect its maintenance and compatibility completely and practically drop all active support for it, despite keeping the Battlenet servers online. Yes, you will have a tough time trying to buy a fresh copy of this game nowadays, because Blizzard cares so much about their legacy games they don't even sell 'em anymore in their official store. But even if there still are plenty of used copies available online for cheap, running the game on modern systems can be a whole a new quest, given that the last patch is dated from 2000, which means no performance maintenance, no improved graphics compatibility, in fact, not even additional screen resolutions, and certainly no stability updates whatsoever. 

The first Cathedral levels loaded and randomly generated in Freeablo
As a matter of fact, Blizzard has a whole tradition of being disrespectful to legacy fans. They refuse to let resellers touch their games (physical Diablo II and Starcraft copies still go by $25 nowadays, with no Steam or GOG versions in sight), they frequently discourage and hamper any type of mod support or mod attempts, other than whatever's produced under their little walled garden editor-type programs and, obviously, they never ever released the source code of any of their games, just to make sure us, the plebeian fans, would never touch their precious abandoned heritage with our filthy paws.

Luckily, this might just be about to change, with the coming of a bold, new engine remake project most aptly named Freeablo. This project aims to rebuild and expand upon the original Diablo engine, keeping it fully portable and compatible with modern systems, as well as making it adaptable and moddable for anyone willing to modify the game. All of this while still paying due respect to Blizzard and requiring the original game files in order to run the game. Now isn't this nice? 

As of the current 0.1 release, there is still much to be done, which is why the project is open to contributors of all sorts. Hopefully, with enough time and effort, we can all free Diablo one day from the clutches of proprietary software and greedy corporate execs who are still stuck in a 90s mentality on how to commercialize and support video games.

Code License: GPLv3

Assets License: Relies on original proprietary data files

Official Website
Source Code (Github)

Forex Bank Prediction resources

Whether you are a long term trader or a scalper you will always be curious about and would like to know what are the big players in the Forex market doing. What are their positions? Fortunately, certain websites do provide that kind of information. To be more precise I am talking about the positions that are held by the big banks and big hedge funds. 

The best websites with bank positions, or in my opinion, the most useful ones are:

1. eFXnews - it is Boston based financial media agency covering global FX markets. It provides the positions held my the biggest players in the market. Highly recommendable one.

2. PLTfx - it is FX trading advisory and Funds Management. Another great resource that provides bank Forex positions. It requires login.

3. Forex Quebec - it is global Forex trading portal that provides the bank positions under its bank forecasts section. It is a good resource though it is not providing the forecasts on daily basis.

4. Dukascopy TV - a Forex broker that is providing the information in video format on part-time basis.

5. Forex Street - another global Forex trading portal. It provides many positrons of a slightly less relevant players in the market. 

In short, it is always useful to know what are the biggest players in the market predicting before you enter your position. 

Saturday, 26 April 2014

Help visitors who arrive at your blog via a link to a deleted post

If you sometimes delete posts from your blog, then it's a good idea to provide some help to people who who arrive at your blog via links to those posts.

(Even if you don't have any links to those posts, it's likely that a search-engine somewhere will have some - and other people may have bookmarked or shared them, too.)

There are two options for doing this:



Post-specific redirects

Use these if you want to re-direct visitors who come to a particular previous post:

Go into Settings > Search Preferences, click Edit beside Custom Redirects.


Click New Redirect, to create instructions for what to do if a visitor tries to navigate to a specific post.

Put the address of the post that you want to make a re-direct for into the From field.

Put the address of the post that you want to visitors to be taken to into the To field.
For both addresses, the part you need to enter is the URL of the post from the first backslash on.  
Do not put in your blog-address
Do include the date-part of the URL and the backslash.
eg
for    http://blogger-hints-and-tips.blogspot.com/2013/01/changing-a-label-value-for-all-posts.html
use   /2013/01/changing-a-label-value-for-all-posts.html

Tick the Permanent check-box.

Click Save.

Click Save Changes.   (Yes, you need to do both Saves)


A generic page-not-found message

Use this if you do not want to set up post-specific re-directs, or if you cannot remember the URL of your deleted posts.

Go into Settings > Search Preferences, and edit the Custom Page Not Found option.

Put in some text welcoming the visitor, explaining that the page they were looking for is no longer available, and suggesting other places that they could try.

 This text can include links to other posts, so long as you hand-code them. (You might like to get code for this using the post editor).

Adding an RSS feed icon to your blog, using Feedburner

Feedburner's chicklets are used to add the standard "orange radar" button to your blog.  This lets readers to subscribe the RSS feed of your choice.   The information is targeted to Blogger users, but most of it applies to anyone who uses Feedburner.


What is a Chicklet, and why you need one:

Previously I've explained how to remove the (ugly and confusing) "Subscribe to Posts (atom)" link from your blog, and why RSS / Subscribe to Posts is important to your blog and how to create a Feedburner feed for it.

But an RSS feed is useless unless people subscribe to it.  So as well as making the feed, you also need to put something in your blog that lets your readers sign up for it.

A standard option for this is the orange square with "radar" markings on it, which many people call a "chicklet" (since it lets your viewer - the chicken? - have access to the feed you are providing).

Feedburner also has options for:
  • Using a custom icon from popular web aggregators
    I'm not sure that this is a great idea, because you don't know what feed-reader software your readers actually use, and the whole point of a feed is that you don't dictate how people see your blog.
  • Using an icon that promotes Feedburner.  This cute, but I've never seen anyone use it.

How to add a chicklet to your blog:


Log in to Feedburner, using the Google account that owns the feed.

Click on the name of the feed you want to provide a subscription tool for.

Choose the Publicize tab.

Choose the Chicklet Chooser option, from the left navigation bar.

Choose one of the options shown:  the default one is the standard-size RSS-radar-button.

Scroll to the bottom of the screen and either
  • Copy the HTML that is shown, and add it to your blog in the same way that you would add any other 3rd party HTML,

    OR  (note:  there have been some reports that the option below doesn't work any longer, as Blogger has changed but tools like Feedburner have not help up)
  • Choose Blogger from the drop down list beside "use as a widget in", and click Go

    This takes you to a Blogger screen where you can choose which blog you want to add the gadget to (if your current login has more than one), and what title to use for it. 

    When this is done, click Add Widget

    This takes you to the Design > Layout tab, where you can drag-and-drop the widget to wherever you want it.  
    (When I tried it just now, instead of the layout screen I got a "bad request" message.  However pressing Save and then View Blog brought up the blog with the gadget showing, and I was able to go back and edit the layout later on).


What your readers see:

Your readers will see an item, wherever you put it, that looks like this:

or something similar, depending on what option you chose from the Chicklet Chooser screen.

When someone clicks on one of these items, they are taken to either a screen where they choose which feed-reader software to add your site to (if you've used the first option), or to the specific feed-reader software.


Customising the widget code:

If you use the generic RSS button, then you may want to customise the widget code slightly:  It looks ugly not to have a space between the picture and the word "Subscribe" - and it's good to have the phrase "RSS" on the screen because that'ss what RSS-savvy people search for when they're looking at a website and want to find the subscribe option.  I also prefer if the subscribe action opens in a new tab/window, rather than taking the reader away from my blog.

This is quite easy to do, if you put a few line breaks in so you can see that
  • the code is actually two separate link statements
  • the first one has an image (the orange "radar bars" that it takes from Feedburner)
  • the second is a text link
  • both of them link to the RSS feed address

So it's quite easy to add a couple of extra spaces (shown as &nbsp; ), change the text as I've done below, and add   target="_blank"   to both of the links
<a href="http://feeds.feedburner.com/Blogger-hints-and-tips" rel="alternate" type="application/rss+xml" target="_blank">
<img src="http://www.feedburner.com/fb/images/pub/feed-icon32x32.png" alt="" style="vertical-align:middle;border:0"/>
</a>

&nbsp; &nbsp; &nbsp;

<a href="http://feeds.feedburner.com/Blogger-hints-and-tips" rel="alternate" type="application/rss+xml" target="_blank">

Subscribe via RSS

</a>

I generally also put the option to subscribe to my blog by email and the Feedburner FeedCount item (which shows the number of subscribers) in the same area, to give people options, and to encourage them to subscribe.



Related Articles:

Using Feedburner to give your blog a Subscribe by Email option

Adding 3rd party HTML to your blog

Why RSS / Subscribe to Posts is important to your blog

How to create a Feedburner feed for your blog