LOADING ...
If your page takes more than a few seconds to load, you may want to add a loading indicator to inform the visitors that page loading is still in progress. The page loading indicator is usually in some form of animated GIF. This post shows some samples of GIF images that can be used as a loading indicator.
For Blogger users, here is how to add loading indicator to your blog …
Part 1 – Span
First, you need to decide which part you want to hide while the page is loading. Some may hide the entire page while loading, showing nothing but the loading indicator. I do not recommend this, as your readers might get bored looking at an (almost) empty page.
The trick is to show something for them to look at while waiting for the full contents to appear. So, instead of hiding the entire page, we shall just hide the contents of the posts.
What we need to do is to add 2 span tags around <p><data:post.body/></p>
, as follows:<!-- START: Loading Indicator: Top -->
<span expr:id='"loading-" + data:post.id' style='font-size:75%;'>
<img width='16' height='16' src='http://i74.photobucket.com/albums/i265/jennzhen/loading/CircleBall.gif' style='vertical-align:middle'/> LOADING ...
</span>
<span expr:id='"loaded-" + data:post.id' style='display:none'>
<!-- END: Loading Indicator: Top --><p><data:post.body/></p>
<!-- START: Loading Indicator: Bottom -->
</span>
<!-- END: Loading Indicator: Bottom -->
Part 2 – Script
The purpose of this part is to show the actual page contents after the page loading has been completed. It will also hide the loading indicator.
The script below should be placed after <div id='blog-posts'>
, immediately before </div>
, as follows:<div id='blog-posts'>
<b:loop values='data:posts' 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:if cond='data:post.allowComments'>
<b:include data='post' name='comments'/>
</b:if>
</b:if>
</b:loop><!-- START: Loading Indicator: Script -->
<script type='text/javascript'>
window.onload=function(){
<b:loop values='data:posts' var='post'>
document.getElementById("loading-<data:post.id/>").style.display='none';
document.getElementById("loaded-<data:post.id/>").style.display='inline';
</b:loop>
}
</script>
<!-- END: Loading Indicator: Script --></div>
[-] Hide Full Post
[-] Hide Full Post
[+] Show Full Post
[+] Show Full Post
Tuesday, 4 September 2007
Monday, 3 September 2007
Loading Indicator GIF
LOADING ...
Here is the some samples of GIF images that can be used as page loading indicator. The GIF images were generated based on the color schemes of this blog, so it may not be suitable for other blog with different color schemes.
If you want to use it for your blog or web page, you can download directly from the original source here. At this website, you can adjust the color schemes to your liking and then generate the GIF images.
For more information on how to add page loading indicator to your blog, please refer to this post.
3D Rotation
Arrows
Bar
Bar 2
Bar 3
Bar Circle
Big Circle Ball
Big Flower
Big Roller
Big Snake
Bouncing Ball
Circle Ball
Circle Thickbox
Circling Ball
Clock
Drip Circle
Expanding Circle
Flower
Hypnotize
Indicator
Indicator Big
Indicator Big 2
Indicator Lite
Kit
Pik
Pk
Radar
Refresh
Roller
Smallwait
Snake
Squares
Squares Circle
Wheel
Wheel Throbber
External References
[-] Hide Full Post
[-] Hide Full Post
[+] Show Full Post
[+] Show Full Post
Posted by Chen at 09:48 | Comments (5)
Labels: GIF, web design
Tuesday, 28 August 2007
Related Posts - Blogger
LOADING ...
Getting tired of adding related posts list manually all the time? For Blogger users, with a little bit of template modification, the related posts list can be added automatically based on the label assigned to the posts.
Interested? Just follow two steps procedure below to add it to your blog.
Step 1
Go to Template > Edit HTML, click the Expand Widget Template checkbox, and paste the following into the page header:<!-- START: Related Posts -->
<script type='text/javascript'>//<!--
var relTitle = new Array();
var relURL = new Array();
function resetRelatedPosts() {
relTitle = new Array();
relURL = new Array(); } //end function
function getRelatedPosts(json) {
var j = 0;
for (var i = 0; i < json.feed.entry.length; i++) {
var entry = json.feed.entry[i];
relTitle[j] = entry.title.$t;
for (var k = 0; k < entry.link.length; k++){
if (entry.link[k].rel == 'alternate'){
relURL[j] = entry.link[k].href;
j++;
break; } } } } //end function
function writeRelatedPosts() {
var uniqURL = new Array(0);
var uniqTitle = new Array(0);
for(var i = 0; i < relURL.length; i++){
if(!contains(uniqURL, relURL[i])){
uniqURL.length += 1;
uniqURL[uniqURL.length - 1] = relURL[i];
uniqTitle.length += 1;
uniqTitle[uniqTitle.length - 1] = relTitle[i]; } }
relURL = uniqURL;
relTitle = uniqTitle;
var flagBlank = true;
var content = '<br/><br/><b>Related Posts</b><ul>';
for(var j = 0; j < relTitle.length; j++){
if (relTitle[j] != currentTitle){
content += '<li><a href="' + relURL[j] + '">' + relTitle[j] + '</a></li>';
flagBlank = false; } }
content += '</ul>';
if (!flagBlank){
document.write( content ); } } //end function
function contains(a, e){
for(var k = 0; k < a.length; k++) if (a[k]==e) return true; return false; } //end function
//--></script>
<!-- END: Related Posts -->
Step 2
Scroll down to find the following:<data:post.body/>
Then add the following immediately after above tag:<!-- START: Related Posts -->
<script type='text/javascript'> resetRelatedPosts(); </script>
<b:loop values='data:post.labels' var='label'>
<script expr:src='"/feeds/posts/default/-/" + data:label.name + "?alt=json-in-script&callback=getRelatedPosts&max-results=10"' type='text/javascript'/>
</b:loop>
<script type='text/javascript'> var currentTitle = '<data:post.title/>'; writeRelatedPosts(); </script>
<!-- END: Related Posts -->
That's all. You just added "Related Posts" at the bottom of your posts.
Note that the current post is not added to the related posts list. You'll need at least two posts with the same label to make the related post appears.
Tweak
You may adjust how many related posts to display for each label. The default is 10 posts per label (see the part that says max-results=10), but you can increase or decrease this value or remove the restriction altogether (which will show all related posts for each label).
Requirement
This feature will only work if :
To activate the blog feed:
Settings > Site Feed, set Allow Blog Feed to Full.
[-] Hide Full Post
[-] Hide Full Post
[+] Show Full Post
[+] Show Full Post
Posted by Chen at 18:08 | Comments (4)
Labels: blog
Monday, 27 August 2007
How to Backup Blogger Blog
LOADING ...
You have spent a lot of time and effort to keep your blog running. Your ideas, your stories, and your thoughts are priceless. Wouldn't it be a disaster if one day all your blog entries are gone due to a hack attack or hardware failure? So, backup all your blogs regularly before it is too late.
If you are using Blogger to store your blogs, the following are a few simple ways to back up your Blogger blog ...
Backup Your Posts
This link will show all of your posts in one page:http://blogname.blogspot.com/search?max-results=1000
Don't forget to change the URL "blogname.blogspot.com" to the actual URL of your blog. You can also change the maximum result if you have more than 1000 posts. If you have a lot of posts, it may take a while to show the page.
You can add archive page element to your blog, at Template > Add page element > Blog Archive. You can set the archive frequency to monthly/weekly/daily depending on how often you update your blog. At the page element, you can view a group of posts by clicking the archive link, such as 2007, or August. I recommend you backup monthly, by selecting the link for the previous month so that your backup covers all posts made during the previous month. However, you are free to choose other backup frequency as you please, such as daily, weekly, or even annually.
Backup Template
This one is quite simple. You just need to go to Template > Edit HTML, and then click "Download Full Template". I recommend to backup your template before you make any changes to your template, so you always have a backup version in case you mess up your template.
Backup Comments
[-] Hide Full Post
Use the following link to get all the comments:http://blogname.blogspot.com/feeds/comments/default?max-results=1000
Don't forget to change the URL "blogname.blogspot.com" to the actual URL of your blog. You can also change the maximum result if you have more than 1000 comments. After you submitted the link, you may be asked to download the file (at least on Internet Explorer), so just give the file name with XML extension (such as comments.xml). This file will contain all of the comments submitted by your visitors.
You can set Blogger to send you an e-mail when someone leaves a comment on your blog. This option is available at Setting > Comments > Comment Notification Address. You can collect these e-mails as backup.
[-] Hide Full Post
[+] Show Full Post
[+] Show Full Post
Posted by Chen at 19:23 | Comments (0)
Tuesday, 21 August 2007
Digital Scrapbooking 101
LOADING ...
Scrapbooking is a method for preserving a legacy of written history in the form of photographs, printed media, and memorabilia contained in decorated albums, or scrapbooks. Old scrapbooks tended to have photos mounted with photomount corners and perhaps notations of who was in a photo or where and when it was taken. They often included bits of memorabilia like newspaper clippings, letters, etc. Modern scrapbooking has evolved into creating attractive displays of photos, text, journaling and memorabilia.
The advent of scanners, desktop publishing, page layout programs, and advanced printing options make it relatively easy to create professional-looking layouts in digital form. The internet allows scrapbookers to self-publish their work, even if it is just for a readership of one. Scrapbooks that exist completely in digital image form are referred to as "digital scrapbooks", or "computer scrapbooks."
While some people prefer the physicality of the actual artefacts they paste onto the pages of books, the digital scrapbooking hobby has grown in popularity in recent years. Some of the advantages include a greater diversity of materials, less environmental impact, cost savings, the ability to share finished pages more readily on the internet, and the use of image editing software to experiment with manipulating page elements in multiple ways without making permanent adjustments.
What you need to get started :
Several things to consider before starting a digital scrapbooks :
Paper Size
Several paper size to consider:
Traditional paper scrappers generally work in 12" x 12" size. For digital scrappers, this format is not preferable, mainly because printers capable of printing 12" x 12" usually significantly more expensive compared to the standard A4/Letter format printer. There are several wide format photo printers available on the market currently including ones by Epson, Canon and HP. For example, Epson Stylus Photo 1400, the cheapest Epson printers that can print 12" x 12", is priced at $400.
If you intend to print at photo lab, ask for 12R size (12" x 15").
As most printers support A4/Letter size paper, this format is more popular in digital scrapbooking, compared to 12" x 12". For comparison purpose, Epson Stylus Photo R380 that supports A4/Letter format is priced at $130.
If you intend to print at photo lab, ask for 10R size (10" x 12") or S8R (8" x 12").
Some scrappers prefer to work on square format, but with A4/Letter size printer. Hence the closest square format is 8" x 8".
If you intend to print at photo lab, ask for 8R size (8" x 10").
Some used this layout when making scrapbooks as a gift.
If you intend to print at photo lab, ask for 6R size (6" x 8").
If you have A4/Letter size printer, go for 8" x 8" and give it a try. Once you get the printed result, you may decide whether the size is just right, or you need bigger format (12" x 12"). You can try printing scrapbooks with 12" x 12" at photo lab first, and see if that's what you want. If you like it, then consider buying wide format printer.
PPI
Pixels per inch (PPI) or pixel density is a measurement of the resolution of a computer display, related to the size of the display in inches and the total number of pixels in the horizontal and vertical directions. This measurement is often referred to as dots per inch (DPI), though that measurement more accurately refers to the resolution of a computer printer. PPI may also be used to describe the resolution of an image scanner or digital camera.
Suppose you have a 100 x 100 pixel image. If you set the image to print at 10 PPI, then you'd have a 10" x 10" image. If you set the image to print at 100 PPI, you'd have a 1" x 1" image. Note that adjusting this value doesn't affect the number of pixels in the image at all, it just changes how big the print will be.
Note that DPI is not the same as PPI. DPI only refers to the printer. Every pixel output is made up of different coloured inks (usually 4 or 8 colours, depending on your printer). Because of the small number of colours, the printer needs to be able to mix these inks to make up all the colours of the image. So each pixel of the image is created by a series of tiny dots (you could think of them as sub-pixels). Generally, the higher the DPI, the better the tonality of the image, colours should look better and blends between colours should be smoother. You'll also use more ink and the print job will be slower. You might want to try setting your printer to a lower DPI to save ink and speed up the job, see if you notice any difference in quality. The lowest setting where you don't see any loss in quality should be the best one to use.
So a 1200 DPI printer uses 1200 dots of ink in every inch to make up the colours. If you were printing a 300 PPI image, then every pixel would be made up of 16 smaller ink dots (1200 DPI x 1200 DPI / 300 PPI x 300 PPI). A lower DPI would have fewer ink dots making up each pixel, which would make the colour look worse. A higher DPI would have more ink dots for each pixel and should give more accurate colour (especially under close examination).
For digital scrapbooks, what we need is PPI for photo printing, which is around 150-300 PPI. I recommend to compare higher and lower PPI, say 200 vs. 300 PPI, and print using your printer or at photo lab. If you can't tell the difference in quality, stick with the lower PPI as it will save computer resources (e.g., hard disk space, memory, etc.).
Resolution
Image size/resolution describes the detail an image holds. The term applies equally to digital images, film images, and other types of images. Higher resolution means more image detail. In digital imaging, the convention is to describe the pixel resolution with the set of two positive integer numbers, where the first number is the number of pixel columns (width) and the second is the number of pixel rows (height), for example as 640 by 480.
Digital scrapbooks image resolution depends on the selected paper size and PPI.
Image Resolution (width by height) = Paper Size (width by height) x PPI
For example, for paper size 12" x 12" with 200 PPI, the image resolution will be 2400 x 2400 pixels.
Information about image resolution is important because this is usually the first thing you need to provide when you create a new image using a graphics editing software.
Display
Digital scrapbooks can be printed on paper or displayed on computer screen. Many digital scrappers print their finished layouts to be stored in scrapbook albums. However, some may want to display their layout mainly on computer screen (or other digital display device such as TV or digital photo frame).
If you intend to print your scrapbooks, you may skip this section and proceed to the next section. If you intend to display your scrapbooks mainly on computer screen, please continue reading.
Computer screen usually have around 100 PPI, while printers require around 200 PPI, so you need to choose your primary display carefully before you proceed. Alternatively, you may create layouts with 200 PPI, then copy and resize to 100 PPI afterward. However, resizing a digital image will result in loss of quality.
If your primary display is computer screen, your scrapbook need to have the same PPI and resolution as your monitor. For example, 17" LCD monitor with 1280 x 1024 resolution has 96.4 PPI (learn more). So, to display on 17" LCD monitor, your scrapbook resolution should be 1280x1024 with 96.4 PPI.
There are some LCD monitors with 204 PPI available on the market, so it is also possible to stick with 200 PPI for both printer and monitor.
Rules/Guides
There are no hard and fast rules to scrapbooking as it is considered an art form. Some prefer pages where the photograph is the central element and embellishments are minimally applied, others include a variety of embellishments to add to the design.
Acid-free and lignin-free products are encouraged to prevent the pictures from turning brown, as follows:
With the popularity of scrapbooking growing daily, there are more and more resources available to the amateur and professional scrappers alike. Digital scrapbooking shows great promise as the medium of the future for scrapbooking enthusiasts. Scrapbooking can be very easy for anyone who wants to give it a try.
External References
[-] Hide Full Post
[-] Hide Full Post
[+] Show Full Post
[+] Show Full Post
Posted by Chen at 15:33 | Comments (0)
Labels: scrapbook