Link author names to profiles on your team blog?

| More


Many blogs are administered by two or more person.For example I and my wife do blogging on this blog but the profile created on my blog is of mine.Whenever my wife creates a post the author name comes of mine instead of her because my name is linked to the blog profile .So, If you have several people posting to a blog, you might want that each person’s name at the end of their posts links to their profile so that their name should get reflected. You must have noticed that comments work this way automatically. Here’s a solution to get it.


Step 1 : Get the profile addresses for each person who will be posting to the blog. Make sure that each one looks something like this: http://www.blogger.com/profile/XXXXXXX where “XXXXXXX” is a particular ID number. Make a note of that number for each person.

Step 2 : Add the following code to your template, between the HTML <head> tags:

<script type=”text/javascript”>
var team = new Array();
team["First Member"]=”XXXXXXX”;
team["Second Member"]=”YYYYYYY”;
team["Third Member"]=”ZZZZZZZ”;

function makeprofilelink (authorname) {
var pid = team[authorname];
document.write(“<a href=\”http://www.blogger.com/profile/”
+ pid + “\”>” + authorname + “</a>”);
}
</script>

Step 3 : Replace “First Member” with the name that appears on the first member’s posts, and replace “XXXXXXX” with the ID number corresponding to that person’s profile. Do the same for the second member and so on, adding as many more members as you need for your blog. But you will need to update the list of members and their ID numbers whenever you add new people, or any time they change their display names.Also make sure that each member will need to have a unique display name, so they will be linked to the correct profile.

Step 4 : Search for <$BlogItemAuthorNickname$> or <data:post.author/> tag, depending on what kind of template you have (Classic or Blogger Beta Layouts). This prints out each persons display name. Replace that tag with the following:

(for classic templates)

<script type=”text/javascript”> makeprofilelink(“<$BlogItemAuthorNickname$>”); </script>

(for layouts)

<script type=”text/javascript”> makeprofilelink(“<data:post.author/>”); </script>

Now you’re almost done, you need to preview it to make sure it works, then save the changes and republish. The result will be something like this at the end of each post, with the appropriate profile link for the name:

… the end of my post.
Posted by Manoj Gupta at 1/31/2008

Please share your views about this hack if you find it useful. Is there any other way to do it?


Blog Widget by LinkWithin

Related posts:

  1. Free link Exchange to promote your website or blog
  2. Create, Backup, Restore and Manage Google Chrome/Chromium Profiles
  3. How to Move a Blog Between Accounts ?
  4. Separate full names into different columns
  5. Create and publish your blog posts from MS Word directly.
  6. Think before you blog!
  7. Update your Blog Directly from Facebook.
  8. How to secure your blog content and images ?
  9. Add Blogroll to your blog
  10. Post and Receive Voice Messages in your Blog

Get Freeware updates just like this one in your email inbox every day - for free! Just enter your email address below:

 

Comments on this entry are closed.

Binary Head | About us |  Copyright Policy |  Privacy Policy |  Disclaimer |  Subscribe us |  Advertise |  Contact us |  RSS Feed |  Sitemap