1 of 2
1
Customized member list page
Posted: 15 June 2005 02:53 PM   [ Ignore ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  344
Joined  05-15-2004

I’m trying to create a customized member list page by making use of the existing member information in the control panel.

Is there a tag I can use to list all the members, and only certain fields?

<username>, <fullname>, <email>, <age>

Something like that.

Not having much luck using this:

{exp:member:manager}
{assign_variable
:master_weblog_name="weblog1"}

{content}

{
/exp:member:manager}

Thanks in advance.

Profile
 
 
Posted: 15 June 2005 03:00 PM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12395
Joined  04-29-2002

Halogen, you’re better off using the query module to do this. Then you have better control of formatting etc.

You’ll have to do a join with the exp_member_table as well as use the exp_members table.

Or are you wanting to have this be in the control panel?

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 15 June 2005 03:18 PM   [ Ignore ]   [ # 2 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32895
Joined  05-14-2004

You can, instead, just edit the templates in Admin -> Membership Profile Templates.  I believe it’s Member List Page - remove the columns you don’t want.  You’ll need to do the same in Member List Rows.

I suggest you back up system/member_skins/default.php first. =)

 Signature 
Profile
MSG
 
 
Posted: 15 June 2005 03:35 PM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12395
Joined  04-29-2002

You can, instead, just edit the templates in Admin -> Membership Profile Templates.  I believe it’s Member List Page - remove the columns you don’t want.  You’ll need to do the same in Member List Rows.

I suggest you back up system/member_skins/default.php first. =)

That’s true, you can, but it’s a royal pain. It’s the *adding* of custom fields that doesn’t work.

Image Attachments
tags.jpg
Click thumbnail to see full-size image
 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 15 June 2005 03:39 PM   [ Ignore ]   [ # 4 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32895
Joined  05-14-2004

Huh? I have custom tags in my memberlist, without any problems, notably picture and signature (both about to be un-needed soon, but whatever *winks*)

<td class='{member_css}' width="50">
{exp:member:custom_profile_data member_id="{member_id}"}{if member_avatar != ""}<img src="{member_avatar}" alt="" width="30" height="30" />{&#47;if}{&#47;exp:member:custom_profile_data}
</td>

 Signature 
Profile
MSG
 
 
Posted: 15 June 2005 04:05 PM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  344
Joined  05-15-2004

I could just use the member control panel, but I’d like to use just a few fields, and have it embeded in a ‘normal’ page.

Any idea what the query tag(s) would look like?

Profile
 
 
Posted: 15 June 2005 04:12 PM   [ Ignore ]   [ # 6 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32895
Joined  05-14-2004

Did you want a separate memberlist? Otherwise you can modify member/index (the wrapper for thees templates) to look like your site, and just edit the actual membership list.  That’s the easiest way, anyway. =)

 Signature 
Profile
MSG
 
 
Posted: 15 June 2005 05:42 PM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12395
Joined  04-29-2002

Huh? I have custom tags in my memberlist, without any problems, notably picture and signature (both about to be un-needed soon, but whatever *winks*)

<td class='{member_css}' width="50">
{exp:member:custom_profile_data member_id="{member_id}"}{if member_avatar != ""}<img src="{member_avatar}" alt="" width="30" height="30" />{/if}{/exp:member:custom_profile_data}
</td>

Ah ha! I didn’t put in the custom_profile_data stuff.

Should that be wiki’d?

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 15 June 2005 05:47 PM   [ Ignore ]   [ # 8 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  344
Joined  05-15-2004

LisaJill,

How can I modify the member/index to, lets say, leave out half the colums that it normally displays though?

Profile
 
 
Posted: 15 June 2005 07:29 PM   [ Ignore ]   [ # 9 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32895
Joined  05-14-2004

Sue, probably - I learned that before the wiki. I’ll do it tonight. It’s important to note NOT to forget the encoding in my original code paste.  That HAS to be there for it work, that is the encoding of the last { in the if and /exp: thing.

To change the columns shown you would modify member list page and member list rows.  To change the overall look (header, footer, etc) you’d change member/index =)

 Signature 
Profile
MSG
 
 
Posted: 15 June 2005 08:55 PM   [ Ignore ]   [ # 10 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  344
Joined  05-15-2004

Right.  But looking at the code for that page, I don’t see where I’d change that.  I just see “content”.

{exp:member:manager}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
>
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang}">
<
head>
<
title>Post Reply</title>

<
meta http-equiv='content-type' content='text/html; charset={charset}' />

{stylesheet}

</head>
<
body>

<
div id="content">
<
div class='header'><h1>{heading}</h1></div>

{breadcrumb}
{content}
{copyright}

</div>

</
body>
</
html>
{/exp:member:manager}

Profile
 
 
Posted: 15 June 2005 09:06 PM   [ Ignore ]   [ # 11 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32895
Joined  05-14-2004

You can, instead, just edit the templates in Admin -> Membership Profile Templates.  I believe it’s Member List Page - remove the columns you don’t want.  You’ll need to do the same in Member List Rows.

I suggest you back up system/member_skins/default.php first. =)

it gets {content} from those membership profile templates. =)

 Signature 
Profile
MSG
 
 
Posted: 16 June 2005 04:27 AM   [ Ignore ]   [ # 12 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  344
Joined  05-15-2004

Hrm…

Not sure I want to permanently alter the core list of available information.  Just looking to present a small subset of the available data.

I’m thinking the query idea is looking to be the best.

Do you know the query syntax?

Profile
 
 
Posted: 16 June 2005 05:54 AM   [ Ignore ]   [ # 13 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12395
Joined  04-29-2002
Halogen - 16 June 2005 04:27 AM

Hrm…

Not sure I want to permanently alter the core list of available information.  Just looking to present a small subset of the available data.

I’m thinking the query idea is looking to be the best.

Do you know the query syntax?

Here’s an example:

select exp_members.member_id, exp_members.username, exp_members.screen_name,
exp_member_data.m_field_id_2 as city
from exp_members
, exp_member_data
where exp_members
.member_id = exp_member_data.member_id
and exp_member_data.m_field_id_2 > '' order by exp_members.member_id asc

This will return the member_id, username, screen_name, and a field called city (which is my m_field_id_2) where there is a value for that field, ordering it by member_id in ascending order.

The key is to set the value of m_field_x to something that you’ll remember. smile

Basic Memberlist

This example doesn’t have a lot of formatting done to it, but you’ll see what I’ve done. If you want to return more info, you add it to the select statement.

Edit: Changed code to use single quotes instead of double quotes - Sue Wednesday, October 11, 2006 07:28AM

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 16 June 2005 08:43 AM   [ Ignore ]   [ # 14 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  344
Joined  05-15-2004

Thanks.  Got it working.  Thanks so much.

Profile
 
 
Posted: 04 July 2005 06:34 PM   [ Ignore ]   [ # 15 ]  
Moderator
Avatar
RankRankRankRankRankRankRankRank
Total Posts:  32895
Joined  05-14-2004

wiki’d.

 Signature 
Profile
MSG
 
 
Posted: 04 July 2005 09:43 PM   [ Ignore ]   [ # 16 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  344
Joined  05-15-2004

Excellent!

Thanks.

Profile
 
 
Posted: 07 March 2006 03:13 AM   [ Ignore ]   [ # 17 ]  
Grad Student
Rank
Total Posts:  58
Joined  04-19-2004

I’ve been trying to create my own customized member list following your models/advice but I also wanted each members’ Member group title to appear by his/her name and I can’t seem to do this.

Can anyone suggest how I might succeed?

I’ve tried using this code - but I am improvising as I have no real knowledge of MY SQL syntax (clearly…):

{exp:query sql="SELECT exp_members.member_id, exp_members.group_id, exp_members.screen_name, exp_members.email, exp_member_data.m_field_id_11, exp_member_data.m_field_id_12, exp_member_data.m_field_id_13, exp_member_data.m_field_id_14, exp_member_data.m_field_id_15, exp_member_data.m_field_id_16, exp_member_groups.group_title FROM exp_members, exp_member_data, exp_member_groups WHERE exp_members.member_id = exp_member_data.member_id,  exp_members.group_id = exp_member_groups.group_id ORDER BY exp_members.screen_name asc"}


<tr>
<
td><a href="{path=member/{member_id}}">{ screen_name }</a></td>

<
td>{email}</td>

<
td align="center">{group_title}</td>

<
td align="center">{m_field_id_15}</td>

<
td align="center">{m_field_id_16}</td>

<
td align="center">{m_field_id_11}</td>

<
td align="center">{m_field_id_12}</td>

<
td align="center">{m_field_id_13}</td>

<
td align="center">{m_field_id_14}</td>

</
tr>

{/exp:query}

This code works fine if I forget trying to retrieve the group data insert the group title.

many thanks

chris

Profile
 
 
Posted: 07 March 2006 01:38 PM   [ Ignore ]   [ # 18 ]  
Administrator
Avatar
RankRankRankRankRankRankRank
Total Posts:  15842
Joined  06-03-2002

The group_title field is stored in a different table, actually, which is why that won’t work.  MySQL queries aren’t my bag either, so cross your fingers, heh.  Remove the group_title portion from your big SQL query, and then above

<td align="center">{group_title}</td>


put

{exp:query sql="SELECT group_title FROM exp_member_groups WHERE group_id = '{group_id}'"}

 Signature 
Profile
MSG
 
 
   
1 of 2
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64978 Total Logged-in Users: 21
Total Topics: 82016 Total Anonymous Users: 18
Total Replies: 440814 Total Guests: 182
Total Posts: 522830    
Members ( View Memberlist )