|
|
Alternative display for memberlist
|
|
Date: 2006/03/31 20:47
|
By: hermanandp
|
Status: User
|
|
|
Karma: 4  
|
|
Fresh Joomlapolitan  | Posts: 7 |   | |
|
A site I am building for my wife required a memberlist to be displayed as an array of images as is achieved on myspace, faceparty etc. Instead of displaying as a single list this hack will display images in a 3x5 table.
1. locate file- comprofiler.html 2. locate the area- /****************************** List Functions ******************************/ 3. within this find the code-
| Code: |
<?php
$i = 1;
foreach($users as $user) {
$evenodd = $i % 2;
if ($evenodd == 0) {
$class = "sectiontableentry1";
} else {
$class = "sectiontableentry2";
}
//print $user->name;
if($ueConfig['allow_profilelink']==1) {
$onclick = "onclick=\"javascript:window.location='".sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=".$user->id)."'\"";
$style="style=\"cursor:hand;cursor:«»pointer;\"";
}
print "\t<tr class=\"$class\" ".$style." ".$onclick.">\n";
//print $lfields;
$str = null;
eval("\$str = \"$lfields\";"«»);
echo $str. "\n";
print "\t</tr>\n";
$i++;
}
?>
|
and replace it with-
| Code: |
<tr>
<?php
$i = 1;
foreach($users as $user) {
$endofrow= 0;
//print $user->name;
if($ueConfig['allow_profilelink']==1) {
$onclick = "onclick=\"javascript:window.location='".sefRelToAbs("index.php?option=com_comprofiler&task=userProfile&user=".$user->id)."'\"";
$style="style=\"cursor:hand;cursor:«»pointer;\"";
}
//print $lfields;
$str = null;
eval("\$str = \"$lfields\";"«»);
echo $str. "\n";
$oneinthree = $i % 3;
if ($oneinthree == 0) {
print "\t</tr><tr>\n";
$endofrow= 1;
}
$i++;
}
if ($endofrow == 0) {
print "\t</tr>\n";
}
?>
|
when setting up the list (list management) do so as a single column and in community builder-configuraton-user list set the number of users to a multiple of 3 eg 12,15 or 18
for 4 columns of members profiles
replace
| Code: | $oneinthree = $i % 3;
if ($oneinthree == 0) {
print "\t</tr><tr>\n";
$endofrow= 1;
}
|
with
| Code: | $oneinfour = $i % 4;
if ($oneinfour == 0) {
print "\t</tr><tr>\n";
$endofrow= 1;
}
|
|
|
The topic has been locked. |
|
|
|
Re:Alternative display for memberlist
|
|
Date: 2006/04/07 15:27
|
By: Red1000
|
Status: User
|
|
|
Karma: 1  
|
|
Senior Joomlapolitan  | Posts: 55 |   | |
|
Works great, thank you very much! I am displaying five columns, and wanted to know how to center the entire listing and add some padding... right now it appears somewhat left justified, thanks!
Post edited by: Red1000, at: 2006/04/07 09:27 Joomla 1.0.8 + CB Stable
|
|
The topic has been locked. |
|
|
|
Re:Alternative display for memberlist
|
|
Date: 2006/04/07 22:07
|
By: damiendownload
|
Status: User
|
|
|
Karma: 0  
|
|
Fresh Joomlapolitan  | Posts: 22 |   | |
|
How would i remove things like
Username: and Status:
? I have found the language file and removed the text but the ":" still remains.
|
|
The topic has been locked. |
|
|
|
Re:Alternative display for memberlist
|
|
Date: 2006/04/08 02:57
|
By: Red1000
|
Status: User
|
|
|
Karma: 1  
|
|
Senior Joomlapolitan  | Posts: 55 |   | |
|
In your joomla cb administrator options you can turn "titles" off in the list options for each column. Joomla 1.0.8 + CB Stable
|
|
The topic has been locked. |
|
|
|
Re:Alternative display for memberlist
|
|
Date: 2006/04/08 02:58
|
By: Red1000
|
Status: User
|
|
|
Karma: 1  
|
|
Senior Joomlapolitan  | Posts: 55 |   | |
|
I was also curious about how joomloapolis was making their lists look so nice... as far as where you would place the css style, etc.
Post edited by: Red1000, at: 2006/04/07 20:59 Joomla 1.0.8 + CB Stable
|
|
The topic has been locked. |
|
|
|
Re:Alternative display for memberlist
|
|
Date: 2006/04/09 02:34
|
By: mediaguru
|
Status:
|
|
|
Karma: 59  
|
|
Platinum Joomlapolitan  | Posts: 792 |   | |
|
Can we see your site or a site with this feature implemented? I'd love to do this. CB WISHLIST
1. Contextual (member type) registration fields (business, personal, artist etc). 2. Photo gallery style search results (like myspace) 3. Comments on profile gallery photos. 4. Auto resize profile images in backend. 5. Customizable user web pages (see tagworld) 6. Images in CB fields/tabs.
My main CB site: http://www.thegolfspace.com Check out my newest CB site: http://www.themacspace.com My Karma (user rating) suite now in the CB Directory!
|
|
The topic has been locked. |
|
|