theme multi-line profile fields
Handling multi-line profile fields
Task · theme multi-line profile fields · theme user profiles · Themers · Drupal 4.5.x or older · Drupal 4.6.x · Drupal 4.7.x · Drupal 5.x
Last modified: September 6, 2009 - 10:45
PLEASE NOTE! These snippets are user submitted. It is impossible to check them all, so please use at your own risk! For users who have setup drupal using an alternate database to the default (MYSQL), please note that the snippets may contain some database queries specific to MYSQL.
Description
This php snippet displays multi-line textfields. If the user has not specified anything, it displays nothing
Dependencies: profile.module
Usage
- Using a text editor like NOTEPAD.EXE or an equivalent, copy and paste the code into your user_profile.tpl.php file
- Change the custom profile field name from
profile_biographyused in the example below. (Tip: In Drupal 4.x go to administer -->> settings -->> profile and in the second column it will give you the field name. In Drupal 5.x the profiles settings page can be found at administer -->> user management -->> profiles) - Tested and works with Drupal 4.5, 4.6, 4.7.x and 5.x
- Make sure you us the snippet variation of the snippet that matches the version of Drupal you are using.
- Change the div class names or the prefix text to suit.
works with Drupal 4.5.x and Drupal 4.6.x
<?php
if($account->profile_biography):
?>
