Members page

Permalink 1 user found helpful
Hi,

I have enabled public profiles and now have a members page on my C5 site. However, is it possible to not display the username of the members on the members page?

I just want to display the following user attributes for each member:

Full Name
Job Description
Website

Thanks,

 
adajad replied on at Permalink Reply
adajad
Hi jdmoore, and welcome to the forums!

It is possible to not output the username, but to do that you will need to override the members.php single page and modify the code a bit.

I don't have access to any installation at the moment so I can't tell you for sure how to do this, but it is in that file and you need to specify which attributes to show.

Hopefully someone else will give you the exact changes to make, otherwise you will have to post again in this thread and I can take a look at it on Monday (but I can't promise you an absolute solution).
jdmoore replied on at Permalink Reply
Thanks for the reply adajad. Hopefully, someone will be able to make a suggestion about the code.

David
adajad replied on at Permalink Reply
adajad
I just had a look at the members.php file, and the easiest fix will remove the username (but also the link to the profile page) and only list the other attributes.

1. Copy 'root/concrete/single_pages/members.php' to 'root/single_pages/members.php'.
2. Disable override cache.
3. Delete or comment out line 30 in 'root/single_pages/members.php'.
<!-- <div class="ccm-profile-member-username"><a href="<?php echo $this->url('/profile','view', $user->getUserID())?>"><?php echo $user->getUserName()?></a></div> -->

4. Browse to your members page and have a look.

5. Turn on overrides cache.
Shotster replied on at Permalink Best Answer Reply
Shotster
Hi jdmoore,

As adajad said, just override the members.php single page and edit it to output the desired data. To override, copy...

/concrete/single_pages/members.php

...to...

/single_pages/members.php

...and then edit the copy to remove the username and output only the custom attributes you want.

Alternatively (especially if you're not comfortable coding PHP), you might want to take a look at my add-on...

http://www.concrete5.org/marketplace/addons/enhanced-user-list/...


-Steve