How make user name linkable ?

1 reply [Last post]
sm
sm's picture
User offline. Last seen 28 weeks 2 hours ago. Offline
Joined: 12/06/2009

Hi, how to make user name linkable at their own post ? example: by XXX on Friday, 29 May, 2009 - 22:36 - how to make XXX link to user profile ?

Jason
Jason's picture
User offline. Last seen 18 hours 55 min ago. Offline
Joined: 01/03/2008
Modify your node.tpl file

Hi,
You need to add the proper print variable within the node.tpl file. Please see this post for all variables used within the node.tpl for Drupal 6:

http://api.drupal.org/api/drupal/modules--node--node.tpl.php

and;

http://api.drupal.org/api/function/theme_username/6

More on the theme_username - "A string containing an HTML link to the user's page if the passed object suggests that this is a site user"

Your theme.inc file may need to be adjusted accordingly if the code provided in the link above isn't in your theme.inc file to begin with.

As always, make backups before changing code on a live site.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Each email address will be obfuscated in a human readable fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.

More information about formatting options

Mollom CAPTCHA (play audio CAPTCHA)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.