Blogger.com Template Tip: Render Previous Post Link At Bottom Of Main Page

More experienced bloggers using Blogger.com have been able to put “previous” links to lead visitors to the previous post of their blog. On the main page, there is a fixed number of posts that you can choose to display, usually 3. Some visitors may be reading your main page from top to bottom. Now, besides having to refer to the list of previous posts in the sidebar, how can you provide a link at the end of last post of this main page for the visitors to continue reading?

I have written a bit of JavaScript and Blogger.com code just for this. You just need to copy the following code in the right places of your template and it will render a link to the previous post after the fixed number of posts on the main page.

Copy this chunk to the <head> section, preferably after the bunch of <meta> tags. Replace the number “3” in the line that contains “nMaxPostsOnMainPage” to the fixed number of posts on your main page, if it is not 3.

<script type=”text/javascript”>
// This JavaScript code created by Teng-Yan Loke
// Date: 7 Nov 2006 1119hrs
// Website: http://glob.lokety.com
// E-mail: lokety-at-gmail.com
var nMaxPostsOnMainPage = 3;
var aPosts = new Array(nMaxPostsOnMainPage + 1);
var n = 0;
<BloggerPreviousItems>
if (n <= nMaxPostsOnMainPage)
{
aPosts[n] = “<$BlogItemPermalinkURL$>|<$BlogPreviousItemTitle$>”;
n = n + 1;
}
</BloggerPreviousItems>
function writePrevPostOnMainPage()
{
var sTmp;

sTmp = aPosts[nMaxPostsOnMainPage].split(“|”);
document.write(“<a href=\”” + sTmp[0] + “\”>” + sTmp[1] + “</a>”);
}
</script>

Place this line just after the </Blogger> tag near the line that has the HTML comment “End #main”. If you want to apply any CSS style to the line, specify it in the <div> tag.

<MainPage><div style=””>Previous post: <script type=”text/javascript”>writePrevPostOnMainPage();</script></div></MainPage>

Save the template and publish your site. It should work now.

Note: avoid using “|” in the title of your posts as it is used programmatically in my code.

I can probably expand this code to:

  • display a specified number of previous posts, instead of just one
  • display a dropdown list of previous posts to quickly jump to any post

If you find this Blogger.com template tip useful, please link back to me using this permalink. Thanks!

Update (December 13 2006): I’ve made some enhancements to this stuff. Click here to see the next post.

Technorati Tags: , , , , , , ,

Share

Identity Cards, Phone Calls and You

UK’s Prime Minister Tony Blair is defending for the nation’s plan to have identity (ID) cards for non-EU immigrants from year 2008. Similar ID cards will be compulsory for locals from 2010. Although not considered as a comprehensive solution to combat illegal immigration, welfare fraud, and terrorism, setting up the identity system, known as the National Identity Register, will improve protection and enable effective checks, Blair said.

This news ought to cause a few seat adjustments from the civil rights groups.

The Register may store about 49 types of information, see the link “What data will ID cards store?” below. The most accurate identification tokens that will be recorded will be fingerprints and other biometric information, which I believe will be at least the iris and facial photograph. Multiple-token recognition is statistically accurate, down to the one in hundreds of million odds.

Malaysia and Singapore have both adopted national ID cards for their citizens. The set of data that is contained in the card is similarly large. Fields such as addresses, race, religion, signature, physical attributes, and biometrics are stored; in the case of Malaysia, on a 32KB computer chip. Cards are issued for newborns, and it is an offence not to bear the ID card outside of the citizens’ homes (see links below).

The national ID card is meant for bringing products and services to the electronic form of identification for purposes of consumption or access privileges. It is supposed to combat identity forgery and enable effective security checks. At the same time, the card abolishes civil privacy and makes the citizens vulnerable to bribery, identity theft, and breaking laws that were created just for the card system.

Again in these two countries, mobile phone numbers and their interconnections are recorded in a main system that the mobile telcos have to route to. This is a regulation or law of their respective media or communications ministry, created to fight against crimes such as terrorism. Singapore is the first country to implement such a mobile phone call “brokering” system affectionately known as the mobile number portability system, Malaysia is in the pre-implementation stages. All calls that you have made using your mobile phone can be recalled from the system, including pre-paid numbers since these need to be pre-registered with your identity.

Big brother is watching you. Be a good lemming, mate, or don’t get caught! :)

Links:

BBC News – Blair defends identity card plan
<URL:http://news.bbc.co.uk/2/hi/uk_news/politics/6120220.stm>

BBC News – What data will ID cards store?
<URL:http://news.bbc.co.uk/2/hi/uk_news/politics/4630045.stm>

Wikipedia – British national identity card
<URL:http://en.wikipedia.org/wiki/British_national_identity_card>

Wikipedia – MyKad
<URL:http://en.wikipedia.org/wiki/MyKad>

The Star – NRD (National Registry Department) warns of RM20,000 fine or three years’ jail
<URL:http://thestar.com.my/news/story.asp?file=/2006/7/7/nation/14765105&sec=nation&focus=1>

Singapore Police Force – Information On Police Procedures
<URL:http://www.spf.gov.sg/epc/procedures/intro.htm>

Technorati Tags: , , , , , , , , , , , , , ,

Share

Cell Therapeutics To Suspend Enrollment for PIONEER Drug Trial

Cancer drug developer, Cell Therapeutics (CTIC, financial info), has announced on November 3 2006 that it has suspended further enrollment of test patients for its lung cancer trial, called PIONEER, to analyze the differences in early cycle deaths. The company will need to study the differences of deaths between patients who were administered the trial drug, XYOTAX, and those who were given standard paclitaxel. In addition, as recommended by the Data Safety Monitoring Board, CTIC will continue its treatment for existing patients as per protocol.

CTIC has decided to amend the primary efficacy endpoint of the study according to the recommendations from the Food and Drug Administration (FDA). The survival results of women with normal estrogen levels will be the target and this protocol change will be submitted to the FDA for approval. This will likely delay the interim analysis results of PIONEER by at least six months.

CTIC traded down 1 cent (0.6 percent) on moderate volume on Friday November 3 2006.

Update November 7 2006 1006hrs:

The stock plunged 13 cents or 7.93% at the end of Monday November 6 2006.

Related posts:

Cell Therapeutics Signs Deal With Norvatis
<URL:http://glob.lokety.com/2006/09/cell-therapeutics-signs-deal-with.html>

Cell Therapeutics Up After Positive Xyotax Phase 1 Results
<URL:http://glob.lokety.com/2006/08/cell-therapeutics-up-after-positive.html>

Cell Therapeutics Signs Financing Agreement
<URL:http://glob.lokety.com/2006/06/cell-therapeutics-signs-financing.html>

Technorati Tags: , , , , , , , ,

Share