Showing posts with label clock. Show all posts
Showing posts with label clock. Show all posts
Monday, February 18, 2008

Music and video for your blog

0 comments
No time to try out but hoping some of you will see if that is another easy way get get music on your blog and give feedback on result:

Share Booklet, Facebook application

Please note No time to try out.

Peter Chen's nice graphic signature
Continue reading →
Wednesday, January 2, 2008

Captions for images in blog posts

0 comments
It is always useful for visitors to a blog with images (photos especially) to have a caption and here I am going to describe how I do it for images uploaded via the photo upload icon in the Blogger post editor. There are 2 ways, and I hope to add notes of the advantages and disadvantages of both. Note that all these must be done in the EDIT HTML mode EDIT HTML/COMPOSE tabs in the Blogger post editor, not the COMPOSE (WYSIWYG) mode. Also, in this post, I will give scripts for you to study, and if you find it troublesome to do it on the post itself, you can highlight all the script in the scroll box, copy it, then paste it into a Notepad file to study at your leisure.

Also, each time you upload a photo, the script for the photo (in EDIT HTML mode) or the photo itself (in the COMPOSE mode) will be right at the top of the post, irrespective of where you place the mouse cursor. I prefer EDIT HTML mode rather than the COMPOSE as it gives me better control over how my post will display. Also, my habit is to leave the original script in its original place place at the top of the post, highlight it all, right-click, select "copy", scroll down the post editor window, paste it where I actually want the image. This means I will have 2 copies, the original at the top, and the copy at the spot where it will be eventually. This I feel is safer as if anything happened, you can still get the script from the original at the top, and only delete it when you have everything worked out fine.

For more details, refer to Uploading and manipulating images with Google Blogger (click BACK button to get back to this page).

Add caption direct into the Blogger script for the image>

This is the easiest method. When you upload an image via the photo upload icon in the Blogger post editor, this is how the script may look like:

<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifEMtITPAtyzjSi0_IKD6mdU2w_I6KHI1rgZs3VRhdvzqa1ihruiNqba36ewCWAEw-dCLghqjgZtaHQIWO8j3Zjy-2OvCU7InG2IKpk2CD2qYqGnbpkMnZdgrf2WgEvYU-513QYF1r3RAO/s1600-h/Paris+Eiffel+Tower+double+decker+bus+bratan.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifEMtITPAtyzjSi0_IKD6mdU2w_I6KHI1rgZs3VRhdvzqa1ihruiNqba36ewCWAEw-dCLghqjgZtaHQIWO8j3Zjy-2OvCU7InG2IKpk2CD2qYqGnbpkMnZdgrf2WgEvYU-513QYF1r3RAO/s400/Paris+Eiffel+Tower+double+decker+bus+bratan.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5150314784676399554" /></a>


This is what appear at the end of the script:

id="BLOGGER_PHOTO_ID_5150314784676399554" /></a>

Now what I am going to do is to cut out the beginning part of the above to make it shorter, then insert the text "CAPTION" into the script just before the last </a>:

399554" />CAPTION</a>

This CAPTION can be any test you want and will do a demonstration below:

Paris, Eiffel Tower, double decker busCAPTION

Note that I have chosen to upload the photo above as "center" as I only use option like "left" when it is a small photo and I want the text in the paragraph to wrap around the text. Note that while the photo in centered, the caption, is not, and also CAPTION is a link to the larger image on the web containing nothing else but the photo. I suspect this can be overcome by choosing the "left" option when uploading the image, but anticipate problems, unless you do not have any text in the same paragraph as the image. I do not know as I have never done it before, and don't have any need to do it. Leave a comment if you have experience with this and share.

The above does not look nice, so to center the caption, all I need to do is to add the HTML tag <span style="text-align;"> at the beginning of the script and <span style="text-align:center;"> and </span> at the end.

Note also that the above is not my photo, but is the property of David who have kindly given permission to use his photo in a post in another blog: Paris, most popular tourist destination in the world, etc. Note that it is also polite to attribute the source of the photo you use when it is not yours, and normally I acknowledge it by adding a link to whatever website the photo owner wants it. This is done by adding a HTML hyperlink tag <a> and I will put the script I used to display the photo by David at Paris, most popular tourist destination in the world, etc. The script is inside the scroll box below, and it is your job to study it if you want to do something similar, and ask for help if you get into any difficulties.

<div style="text-align:center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifEMtITPAtyzjSi0_IKD6mdU2w_I6KHI1rgZs3VRhdvzqa1ihruiNqba36ewCWAEw-dCLghqjgZtaHQIWO8j3Zjy-2OvCU7InG2IKpk2CD2qYqGnbpkMnZdgrf2WgEvYU-513QYF1r3RAO/s1600-h/Paris+Eiffel+Tower+double+decker+bus+bratan.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifEMtITPAtyzjSi0_IKD6mdU2w_I6KHI1rgZs3VRhdvzqa1ihruiNqba36ewCWAEw-dCLghqjgZtaHQIWO8j3Zjy-2OvCU7InG2IKpk2CD2qYqGnbpkMnZdgrf2WgEvYU-513QYF1r3RAO/s400/Paris+Eiffel+Tower+double+decker+bus+bratan.jpg" border="0" alt="Paris, Eiffel Tower, double decker bus"id="BLOGGER_PHOTO_ID_5150314784676399554" />Photo of Eiffel Tower and double Decker bus
<a href="http://www.flickr.com/photos/bratan/809334835/" target="_blank">by David</a></a></div>


This is not obvious, but there are actually 2 links in the caption, one to the enlarged photo on the web (the one above), and one to the source of the photo (the one below). You can try clicking on them if you want and observe what happen. This is done by typing the text "Photo of Eiffel Tower and double Decker red bus", then pressing the ENTER key to force a line break, then continue with the HTML hyperlink tag to link to the source of the photo (<a href=".....).

I have earlier done it a very slightly different way as you can see in the photos in the post Malaysian students in Paris. Note that except for the first photo, all the captions in all the photos is a single line, not in 2 different lines like above. There are again 2 links in a single line in the caption, one is at the beginning and one at the end. It is not obvious, but since the photo owner, didn't object, I will just leave it as a demonstration. To make the 2 links in separate lines, you must make a line break by pressing the ENTER key when typing out the caption. You can study the script for the above example to better understand. Hopefully, this is very clear as to what can be done.

<div style="text-align:center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR_uuNG2Zz0iIQPuOJQXPpJVjl1gzzaSpnFDtFprt2Nuulqh4wuHhfwg-5l8I7oEha-64NsvdI-3n-MSR9dN85sG-7x2ksVt59eKxceAVmcO-4EyC12M_oJDUxNswf3Omw31R6S9Ok4w5H/s1600-h/Arc+de+Triomphe+sbcar.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjR_uuNG2Zz0iIQPuOJQXPpJVjl1gzzaSpnFDtFprt2Nuulqh4wuHhfwg-5l8I7oEha-64NsvdI-3n-MSR9dN85sG-7x2ksVt59eKxceAVmcO-4EyC12M_oJDUxNswf3Omw31R6S9Ok4w5H/s400/Arc+de+Triomphe+sbcar.jpg" border="0" alt="Arc de Triomphe"id="BLOGGER_PHOTO_ID_5148734888299557858" />Arc de Triomphe by <a href="http://www.flickr.com/photos/stephencarlile/487336403/" target="_blank">Stephen Carlile</a></a></div>


Advantages and disadvantages of inserting stuff direct into image script to add caption

The advantage of this method is, it is relatively easy to implement as compared to what follows, which require a bit more of HTML. The disadvantage is that the caption will always be a link, and you cannot have plain text or add a title which is possible in the second method.

As to having the photo aligned to the left, I have never tried adding captions to such images, but anticipate problems, so don't want to try. But if you have done it before, and willing to share your experience, I hope you will leave a comment with a link to the post where you have done it.

Use HTML tags for table

Another way to add caption using the HTML table tag <table>. You can see an example of that in the post Malaysian married couple's honeymoon in Greece. In the first method, you cannot avoid captions as links. In this case, you can see the caption are plain text, not link. The way to do it is to upload your image via the photo upload icon in the Blogger post editor, select the "center" option, then upload. In the script for the image at the top of the post, add some descriptive text in the alt="" attribute in between the 2 quotation marks "" (highly recommended), highlight all the script, right-click, choose "copy" (or press ctrl+C), scroll down to where you want the image to be, right-click and choose "paste" (or press ctrl+V). This method will be a bit more complicated if you are not familiar with HTML, but let us press ahead and if you concentrate, you can do it and learn more HTML in the process. Note: it is important you do not press the ENTER key at any point while typing the HTML for the table or you will find large empty space above your photo. If you have difficulties in doing this, refer to Easy way to avoid large blank space above table when using the <table> HTML tag (click BACK button to get back to this page).

Type this at the beginning of the image script:

<table style="text-align:center;"><tr><td>

I will explain what all the gibberish is all about so you know what we are doing. <table is to tell the web browser we want to display a table. style="text-align:center;"> is to tell web browser we want things to be centered. <tr> is to indicate the beginning of a table row. <td> stand for table data. In this case, the table data is the script to display the image. Practically all HTML tags occurs in pairs, opening tags like those above, and closing tags. Now we need to add the closing tag at the end of the image script. At the end of the image script, type

</td></tr><tr><td>

</td> closes the table data tag, </tr> closes the table row tag, <tr> tells the web browser we are beginning a new table row and <td> tells the web browser we are starting a new table data, in this case, the caption. Just type the caption you want, then end it with
</td></tr></table>, the corresponding closing tags. For your better understanding, I will put the script to display one of the photos in the post Malaysian married couple's honeymoon in Greece below:

<table style="text-align:center;"><tr><td><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK0VevBeIftCGP1JcEVDlPhZnorA_DZszt8YdTqIxAJItXpBnk3bAB7RvAwzA6rbENaMAyE2OhphKy7ZxYGsh4RIKhUZahsh4Br08Npbpwvrb-mZTxrmzYSF-YEN8TE4jEHwFWn54P6CeL/s1600-h/C-G2+athens.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK0VevBeIftCGP1JcEVDlPhZnorA_DZszt8YdTqIxAJItXpBnk3bAB7RvAwzA6rbENaMAyE2OhphKy7ZxYGsh4RIKhUZahsh4Br08Npbpwvrb-mZTxrmzYSF-YEN8TE4jEHwFWn54P6CeL/s400/C-G2+athens.jpg" border="0" alt="Athens, Greece"id="BLOGGER_PHOTO_ID_5142985947882370546" /></a></td></tr><tr><td>Athens: Photo courtesy of Blogger Employee</td></tr></table>


Instead of just plain text, you can also include link, for example, link to the source of the photo you took from, or to the website the photo owner wants to be linked to. For an example, have a look at Kuala Lumpur Terry Fox run. Look at the second photo in the post, the one of the National Museum of Malaysia. It has both a title and a caption, and within the caption, there is a link to the source of the photo (actually, by now, I have my own photo which I can use, but didn't at that time). Note that the photo was used with permission of the owner.

To have both title, photo, caption, you must have a 3 rows table. This is a long post, and I am a bit tired by now and have other things to do, so just going to put the script to display the photo of the National Museum of Malaysia below in a scroll box for you to examine, analyse and learn:

<table style="text-align:center;"><tr><td>Muzium Negara Malaysia (National Museum of Malaysia)</td></tr><tr><td><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJNz6hCDG3wQmfVRn72aRp7M0SB8Oq9ZsrBUd59qbEhTLwSDi82KIgEB4zHE7dsvJNoZWuBI9nlxC4S7Zo5Am5iTbpL5c6Yy4yIrIjPY6IC0CayvHee8gh8ljdAH6VOJ2U7ksOZu0To91c/s1600-h/muzium+negara+superciliousness.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJNz6hCDG3wQmfVRn72aRp7M0SB8Oq9ZsrBUd59qbEhTLwSDi82KIgEB4zHE7dsvJNoZWuBI9nlxC4S7Zo5Am5iTbpL5c6Yy4yIrIjPY6IC0CayvHee8gh8ljdAH6VOJ2U7ksOZu0To91c/s400/muzium+negara+superciliousness.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5121489457128623986" /></a></td></tr><tr><td>Photo by <a href="http://www.flickr.com/photos/superciliousness/125144914/" target="_blank">superciliousness</a> under Creative Commons license</td></tr></table>


Acknowledgement: I got the idea of using <table> from Chuck or Nitecrutz of The real Blogger status but am now putting it in hopefully easily digestible form. I am going to add some HTML you can just copy-paste and then just edit to get what you want:

(later, got to finish something first)

You can also add a border to the table if you want. Just add an extra attribute border="1" to the HTML tag for table. If you want a thicker border, just increase the number from more than 1, the bigger the number, the thicker the border. I did this for one post, and found out that it caused problems. The table with the photo extend into the right sidebar, and in Internet Explorer 6, the right sidebar was pushed to the bottom of the post. I can't remember if I corrected the problem or left it as it is, but if I find it later, I will post a link. In the meantime, I need to finish this post and move on to other things.

Advantages of using table to add title and caption to photo

Advantages of using table is you can add both title and caption, the the capti0n can be just plain text or if you wish, a combination of text and link. Advantage is, it is slightly more complicated if you are not familiar with HTML and involves more work.

Update 30 January 2008: I have started using a different method and waiting for time to publish instructions. If interested, bookmark blog or subscribe in the email subscription box in the left sidebar.

Peter Chen's nice graphic signature
Continue reading →
Sunday, November 4, 2007

eSnip Music Player in sidebar

0 comments
I have previously published a post showing how to add an eSnip music player in a blog post at Add music to your blog another easy way using eSnip (click BACK button to get back to this page)
. The actual eSnip player was added to eSnip music player in a blog post.

A blogger ask how to fit the eSnip music player in a sidebar. I did a test and successfully fitted it into the bottom of the first left sidebar of Blogging Ideas.

You must first know the width of your sidebar. If you don't, you can get instruction in how to get them from How to find the width of your blog Header, main column (posts), sidebar (click BACK button to get back to this page).

Anyway this is a section from the template of Blogging Ideas:

.sidebar-wrapper {
margin-right: 14px;
width: 160px;
float: left;
background-color: $mainBgColor;
word-wrap: break-word; /* fix for long text breaking sidebar float in
IE */
overflow: hidden; /* fix for long non-text content breaking IE
sidebar float */
}

That tells me that the width of the sidebar is 160 pixels. The width of the eSnip music player must be 160 pixels or less. Now the script for a selected song from eSnip is:

<table bgcolor="#000000" cellpadding="0" cellspacing="0"><tr><td><embed quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#000" width="328" height="94" src="http://res0.esnips.com/escentral/images/widgets/flash/esnips_player.swf" flashvars="theTheme=blue&autoPlay=no&theFile=http://www.esnips.com//nsdoc/357ad475-5da9-44c1-864a-df7c17d61d69&theName=Carnivore&thePlayerURL=http://res0.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf"></embed></td></tr><tr><td><table cellpadding="2" style="font-family:Verdana, Arial, Helvetica, sans-serif; padding-left:2px; color:#FFFFFF; text-decoration:none ; ; font-size:10px; font-weight:bold"><tr><td><a style="color:#FFFFFF; text-decoration:none " href="http://www.esnips.com/CreateWidgetAction.ns?type=0&objectid=357ad475-5da9-44c1-864a-df7c17d61d69"> Get this widget </a></td><td style="font-size:7px; font-weight:normal;">|</td><td align="center"><a align="center" style="color:#FFFFFF; text-decoration:none " href="http://www.esnips.com/doc/357ad475-5da9-44c1-864a-df7c17d61d69/Carnivore/?widget=flash_player_esnips_blue"> Track details </a></td><td style="font-size:7px; font-weight:normal;">|</td><td><a align="center" style="color:#FF6600; text-decoration:none" href="http://www.esnips.com//adserver/?action=visit&cid=player_dna&url=/socialdna"> eSnips Social DNA </a></td></tr></table></td></tr></table>


The width of the eSnip player (highlighted in red) is 328 pixels, and this is much too wide for the sidebar. I thus changed the width to 160 pixels (it can also be less, but not more), but left the height as 94 pixels. You can change the height of the player as well, but I wouldn't advice it. The edited script ended up as:

<table bgcolor="#000000" cellpadding="0" cellspacing="0"><tr><td><embed quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" bgcolor="#000" width="160" height="94" src="http://res0.esnips.com/escentral/images/widgets/flash/esnips_player.swf" flashvars="theTheme=blue&autoPlay=no&theFile=http://www.esnips.com//nsdoc/357ad475-5da9-44c1-864a-df7c17d61d69&theName=Carnivore&thePlayerURL=http://res0.esnips.com/escentral/images/widgets/flash/mp3WidgetPlayer.swf"></embed></td></tr><tr><td><table cellpadding="2" style="font-family:Verdana, Arial, Helvetica, sans-serif; padding-left:2px; color:#FFFFFF; text-decoration:none ; ; font-size:10px; font-weight:bold"><tr><td><a style="color:#FFFFFF; text-decoration:none " href="http://www.esnips.com/CreateWidgetAction.ns?type=0&objectid=357ad475-5da9-44c1-864a-df7c17d61d69"> Get this widget </a></td><td style="font-size:7px; font-weight:normal;">|</td><td align="center"><a align="center" style="color:#FFFFFF; text-decoration:none " href="http://www.esnips.com/doc/357ad475-5da9-44c1-864a-df7c17d61d69/Carnivore/?widget=flash_player_esnips_blue"> Track details </a></td><td style="font-size:7px; font-weight:normal;">|</td><td><a align="center" style="color:#FF6600; text-decoration:none" href="http://www.esnips.com//adserver/?action=visit&cid=player_dna&url=/socialdna"> eSnips Social DNA </a></td></tr></table></td></tr></table>


I then sign into blogger.com (Dashboard) and click LAYOUT in the section for "Blogging Ideas", click "Add a Page Element" and chose HTML/Javascript. I pasted the edited eSnip script into the HTML/Javascript Page Element window and click "save changes". The Page Element for the eSnip music player appeared at the top of the first left sidebar of the LAYOUT. I hover the mouse over the new Page Element and the cursor changed to a cross. I dragged the new Page Element to the bottom of the first left sidebar in the LAYOUT, click SAVE at the top of the LAYOUT and you can see the result at Blogging Ideas (bottom of the first left sidebar at time of publishing).

The little test is successful in displaying the eSnip music player, but the PLAY button is very small. So if you don't mind that, then here you are. That is how to fit the eSnip music player into the sidebar. To see the difference, surf over to the two examples or go to eSnip music player in sidebar problem
Continue reading →
Wednesday, October 24, 2007

Free fonts for your blog

0 comments
Are you not satisfied with the fonts that is available for your blog? If so, you may want to check out
http://www.virtualhosting.com/blog/2007/100-legal-sources-for-free-as-in-beer-fonts
100 Legal Sources for Free (as in Beer) Fonts. I have not tried it as I am not a big fan of fancy fonts and is quite satisfied with what I have, so I cannot vouch for what is available in that site. But if you like fancy fonts, give that site a try.

As to how to use it, if you don't know, ask, perhaps I will answer with another post. That is for the future
Continue reading →
Friday, May 18, 2007

Adding a clock in your blog

0 comments
Someone asked how to add a clock to the blog, and I feel I should answer it in a post so that more will know about it. There may be more possibilities than this, but http://www.clocklink.com/ may be a good choice. Here is a screenshot of their gallery:

clock gallery

All you need to do is to chose the clock you want, click on "Get HTML". You will have to select your country/region timezone, and not all countries are listed. Mine wasn't , so what I did was to do a Google search for GMT Malaysia and found it is GMT + 8. So I selected that, highlighted the HTML, copy and paste into the HTML/Javascript Page Element, saved then drag it into the position I want. You can see an example of the clock in this demonstration blog Blogging Ideas. The clock is at the bottom of the left sidebar.
Continue reading →
Wednesday, April 25, 2007

Countdown clock for your blog

0 comments

Here is an example of a post which have a countdown clock with post title Countdown to Malaysia Vision 2020. I made it in response to a request from a member of the Google Blogger Help group. I thought I might as well make a post out of it so that more people will know about it.

You can generate the script for free from A free countdown clock for your Website. You choose the type of clock you want ("countdown to a date in the future" or "Time elapsed since date in the past"). You can set the year, month and day you want to countdown to. The default for hour, minute and second is set to 0,0,0, but you can set them to any figure you want. You choose the countdown mode (see Countdown clock help page. The is also a choice of 17 languages for the countdown clock. Choose the background color (HTML color code), text color and whether you want a border or not. For choosing a background color to match the colors of your site the following will be useful:
ColorPic and
Color Blender.

You are then ready to generate the script to paste into your post, or generate a link to the clock if you don't want the countdown clock on your site. You can also add it to the sidebar by pasting into a HTML/Javascript Page Element (click Add a Page Element in the LAYOUT). Page Element is now referred to as Gadget. You may have to do some adjustment to the dimensions of the countdown clock in this case. Later, I will probably do a demonstration and write more about it.
Continue reading →
Related Posts Plugin for WordPress, Blogger...