Friday, March 16, 2012

How to Display a Drupal Username





1. Log into your website's FTP client and navigate to the directory containing the page in which you would like to have usernames displayed. If you would like them displayed in your index page for example, this will be located in your root or public directory.
2. Download a copy of the page to your local hard drive.

3. Open the page using a text editor, such as Notepad or WordPad for instance. Enter the following PHP code somewhere at the top of the page (first two lines preferably):

4. Enter the following PHP code in the exact position you wish for the username to be displayed:
name?>Save the file.
5. Log back into your website's FTP account and navigate again to the directory containing the page in which you would like to display usernames. Upload the file you just edited, replacing the original one. Navigate to that page using a Web browser. You should now see the logged-in username displayed on the page.

adsense tips Copyright © 2011 | Template created by O Pregador | Powered by Blogger