Saturday, December 19, 2009

Why sometimes AdSense unit missing and how to fix them

Bloggers who have Google AdSense units set to display in their blogs often complained about missing AdSense units. I will use this blog to explain.

I have set the following AdSense units to display in this blog with the number of AdSense units in bracket):
  1. wide skyscraper unit in the left column (1 unit)
  2. leaderboard unit in the footer (1 unit)
  3. large rectangle in between posts (6 in the main page but only 1 in the individual post page)
Note: There should be 6 ad units in the main page or homepage) because I have set the number of posts to display in the main page to be 7 (the default).

Now in you count the total number of ad units, you will get a total of 8 ad units (1+1+6) in the main page but only 3 in the individual post page (permalink).

Google AdSense only allows a total of 3 AdSense ad units in any page and so in the main page, the extra 5 ad units get suppressed and you only see 1 wide skyscraper unit in the left column, 1 between the first and second post and 1 between the second and third post giving a total of three.

However, in the individual post page (permalink), there is only 1 ad unit immediately after the only post, 1 in the left sidebar and 1 in the footer giving a total of 3 (allowed) units with none suppressed.

Now if you have set AdSense units to display between posts and you don't want any ad units to be suppressed and you have similar settings for the AdSense units, all you need to do is to set the number of posts to display in the main page to 1 and only 1.

Sunday, December 13, 2009

Resizing Youtube video to fit main column or sidebar using calculation

Update: For embedding Youtube video, you can do the resizing at Youtube.com itself by either ticking one of the 4 size option (560x340 640x835 835x505 1280x745) or by clicking CUSTOM and typing in your choice of width while letting Youtube automatically fill in the value for the height to keep the aspect ration constant (see screenshot below). However the method described in this post will still be useful if you want to resize other video embed codes or similar:



Method of resizing video embed codes while keeping aspect ration constant


Two previous posts Embed video in blog post and Embed video in sidebar described how to use Irfanview photo editor and resizing image to help resize Youtube to fit the width of the main column or the sidebar of the post. I have been told that Irfanview may not work on a MAC.

In this case, we will have to resort to mathematics, using proportion (ratio) to keep the resized video undistorted. I will do this using example. Below is the code for embedding a video:

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/qBro4dANNGU"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/qBro4dANNGU" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>


Let's say we want to fit the video post (main column) into a blog using the standard Blogger 2 column Son of Moto template which main column has a width of 400 pixels (refer to How to find the width of the blog Header, main column and sidebar). Note from the code above that the the width and height of the video is 425 and 350 respectively, so the video is too wide for the main column and we have to resize it down to, say 395 pixels wide. In order that the video be undistorted, the height will also have to be resized down, say to h pixels.

Thus we have

original width = new width
original height   new height

Thus

425 = 395
350     h

Transposing, we have

h  = 395 x 350 = 325
       425

Thus the resized video will be 395 pixels wide and 325 pixels high, and the code for embedding the video should be changed to

<object width="395" height="325"><param name="movie" value="http://www.youtube.com/v/qBro4dANNGU"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/qBro4dANNGU" type="application/x-shockwave-flash" wmode="transparent" width="395" height="325"></embed></object>


Resizing video to fit sidebar

Taking the same example blog (Son of Moto 2 column) which has sidebar width of 226 pixels, let's say we want to resize the video width to 220 pixels. Using the same calculation like above, we have

425 = 220
350     h

Transposing, we have

h  = 220 x 350 = 181
       425

Thus the resized video will be 220 pixels wide and 181 pixels high, and the code for embedding the video should be changed to

<object width="220" height="181"><param name="movie" value="http://www.youtube.com/v/qBro4dANNGU"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/qBro4dANNGU" type="application/x-shockwave-flash" wmode="transparent" width="220" height="181"></embed></object>

Blogger Dashboard (Create Posts Settings Layouts etc)


"..I am having trouble with finding the settings everyone is talking..."

Today's post is pretty basic but is important because it is the starting point for all your blogging tasks. I am referring to the Blogger Dashboard which essentially is the main launching pad to whatever you want to do with your Blogger blog. Many instructions will first ask you to log into Dashboard (from blogger.com). Once you log in, you will see something like the screen shot below:

screen shot of Blogger Dashboard

In the Dashboard you will see the link for SETTINGS which the blogger who asked the question above is looking for, among other tabs including "create" NEW POST, EDIT POSTS, LAYOUT, MONETIZE and STATS (visitor counter using Google Analytics). Clicking on SETTINGS will take you to another window with many sub-tabs (see screen shot below):

screen shot of Blogger SETTINGS

and initially you will be in the BASIC sub-tabs, and right at the bottom, you will see the GLOBAL SETTINGS (applicable to all blogs in the same Blogger account) where you can toggle between the Updated post editor and the old post editor.

Reblog this post [with Zemanta]

Saturday, December 12, 2009

Make blog into a website


The title of this post could just as well be How to remove the time stamp, etc or Configure blog post. Let me explain.

This post is inspired by a blogger's question - how to remove the time stamp. I don't know his motivation for wanting to remove the time stamp, but I suspect that it is likely to be that he wants it to look more like a website than a blog. Which takes us to the question, what is the difference between a website and a blog?

Let me just quickly state what to me are some characteristics of a blog without going into controversies and then described how to remove those characteristics of a blog such as "time stamps", "posted by ....", comments, etc. so that they look more like a "website". Update: to those characteristics, perhaps I should also add Hide navbar.

Blogger with the "drag and drop" LAYOUT (New Blogger xml template) has made this very easy. All you need to do is to sign into Blogger (Dashboard), click on LAYOUT, then click EDIT in the BLOG POST section (see screen shot below):

screen shot showing Blogger LAYOUT and BLOG POST section with EDIT

Clicking on EDIT will then give you a window to CONFIGURE BLOG POSTS where you can just simply remove the ticks against those elements which you do not want to appear in your blog (see screen shot below):



The above screen shot showed all the elements (Day and Date, Posted by, time stamp, comments, trackbacks {links to this posts}, labels, quick edit icon) characteristic of a blog post removed (unticked). You can see an example of how such a blog will appear at Computer and Internet. I have left the other "give away's" like blog archive intact. The things you would notice missing are Day and Date accompanying the post title and the time stamps, "posted by", comments, labels, etc. at the bottom of the posts. This leave just the title and the post body.

Perhaps later I will elaborate more on the difference between a blog and a website and an illustration of what I mean.

Find help, info, instructions, tips, tricks

Tip: Use search box below or this box, labels in the first right sidebar, archive, ctrl+F for this page or sitemap to find topics