I used the Profile module to add a multi-line field called "Interests," and a URL field called "My Web Site or Biography Link." There are also fields for first and last names, city, state, and zip codes. This page also includes the user's picture if they loaded one.
I create a simple table with the class="even"<
and class="odd"<
to separate the rows. The user's web site link is a bit smaller than normal text, but includes target="_blank"<
so your users stay on your site.
<p>This page is intended to give you an introduction to the members of xxxxx. The information is filled in by the members themselves in their "My Account" page. In order to appear on this list you must have logged in at least once.</p>
<?php
print('<table width="100%"><caption><b>XXXXX Member Biographies</b></caption>'."\n");
$header = array(
array('data' => t('Username'), 'field' => 'u.name', 'sort' => 'asc'),
array('data' => t('Photo')),
array('data' => t('Name')),
array('data' => t('Location')),
array('data' => t('Member since')),
array('data' => t('Interests/Bio'))
);
$sql = "SELECT u.uid, u.name FROM {users} u";
$sql .= tablesort_sql($header);
$result = pager_query($sql, 50);
$oddrow = 1;
while ($account = db_fetch_object($result)) {
$account = user_load(array('uid' => $account->uid));
if ($account->uid > 1) {
if ($account->picture){$account->picture = '<img src="/'.$account->picture.'" height="100" width="100" border="0" alt="'.$account->name.'">';}
else {$account->picture = '<img src="/files/pictures/KB/bodYou.gif" height="100" width="100" border="0" alt="no picture found">';}
$fullname = $account->profile_firstname . " " . $account->profile_lastname;
if ($account->profile_interests) {$interests = $account->profile_interests;}
else {$interests = "No biography provided";}
if ($account->profile_biolink) {$interests .= '<br><small><a href="' . $account->profile_biolink
. '" target="_blank">' . $fullname . "'s web site</a></small>";}
if ($account->profile_city) {$location = $account->profile_city . ", "
. $account->profile_state . " " . $account->profile_zip;}
else {$location = "No location provided";}
if ($oddrow == 1) {print ('<tr class="odd">'); $oddrow = 0;}
else {print ('<tr class="even">'); $oddrow = 1;}
print ('<td align="center">' . $fullname . "<br>" . $account->picture . "<br>" . "</td> \n"
. '<td align="center"><small>' . $location . "</small></td> \n"
. "<td>Member since " . date('F Y', mktime(0, 0, 0, $account->profile_date_joined['month'],
$account->profile_date_joined['day'],
$account->profile_date_joined['year']))
. ". " . $interests . "</td></tr> \n");
print ($row);
}
}
print ("</table>\n");
?><
Comments
Member Profile and Interests
Nancy,
WOW. This is beginning to look like it might work.
We also have a need for interests checkboxes and maillists.
1. Interest checkboxes - these could also be for joining a maillist for example,
Committee Discussion - mailist - all authenticated members can post
Committee Notices - maillist - Committee leaders can post
Dinner Dance
Weekend cruises
Kayaking
2. I have set some of these maillists up on my server (I have root access and am using something called Webmin and Virtualmin.) but I have to get a genuine certificate because the module uses https but I have not done it yet as I am looking at alternatives first.
I don't know if drupal has a maillist function yet and need to find out, but it does have this neat discussion feature. Maybe we use that somehow, but the email notices would still be needed I think.
3. We have user - member profile information we need to setup. There is one table that I would like to set up for user's - members to complete for registering for cruises which has boat information and contact info. I would like to have this all secured with the member entering the information, similar to the Event Signups.
Is this possible? How hard to do?
Thanks so much
Rick
PS: Then of course, just like Ralph, I'd like to have a calendar page that shows the Committee "Events", but that is all just too much, isn't it?
I have been thinking of all of this for just my committee: Cruise Committee, but of course there are other committees that might want a similar setup, so then we get into more complicated security and id stuff I guess.
Content Profile
You might want to check out the Content Profile module. That module allows one or more CCK content types to be used instead of the core Profile module. That also means that you could use the Field Permissions module on top of that. Plus, being CCK, everything is available to Views for generating (filtered) lists, and access to those lists can be controlled.
Which file should i modify
Hi Nancy i dont know which file should modify?
New page
You put this code into a PHP formatted page. There is no file to modify.