Moved Forums

ThemeSnap.com Forums have Moved! Please note that our forums have moved here: New ThemeSnap.com Forums. You will still be able to read forum threads in the forum categories or threads below. However, you will not be able to post new forum topics or replies to existing threads. Please post any new forum posts in our new forum section by registering a new account.

How make user name linkable ?

1 reply [Last post]
sm
sm's picture
Offline
Joined: 12/06/2009
Points: 0

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
Offline
Joined: 01/03/2008
Points: 8
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 associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <strong> <code>
  • 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

Type the characters you see in this picture. (verify using audio)
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.