Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


<< Start < Prev 1 2 3 4 5 Next > End >>
userlist with columns
Date: 2006/08/19 21:38 By: PekkaM Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 1
graphgraph
I would like to create a userlist with many users in a row. It could be very simple, for example only a picture and users name below the pic. Then, if a have a site with about 30 users, i could show them all in a single page.

That would be very nice. I have tried to find this feature in CB, but I haven't found it.

-Pekka
Click here to see the profile of this user The topic has been locked.

Re:userlist with columns
Date: 2006/08/19 22:09 By: spikec Status: User  
Karma: 13  
Senior Joomlapolitan

Posts: 96
graphgraph
Try this:

http://www.joomlapolis.com/component/option,com_joomlaboard/Itemid,38/func,view/id,9410/catid,12/
Click here to see the profile of this user The topic has been locked.

Re:userlist with columns
Date: 2006/08/24 23:02 By: zephhk Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 8
graphgraph
I have been looking for the same solution, (with simply 2 columns of users on the userlist page). The solution spikec referenced in the previous post does not pertain to the current verion of CB.

It does provide clues as to how it can be done, but manipulating php code isn't a stong suite of mine.

Has anyone had success modifying the userlist to more than one column of users? (in CB Stable)
Click here to see the profile of this user The topic has been locked.

Re:userlist with columns
Date: 2006/08/25 04:23 By: spikec Status: User  
Karma: 13  
Senior Joomlapolitan

Posts: 96
graphgraph
It works fine on my site running 1.01....
Click here to see the profile of this user The topic has been locked.

Re:userlist with columns
Date: 2006/08/25 16:27 By: zephhk Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 8
graphgraph
Really?!

That is very interesting. Would you mind posting your URL so we can check it out? Also, if you would be so kind to give any insight into the changes you made that would be wonderful. Here is my userlist, as you can tell, it desperatly needs a 2 column approach...
http://www.rockstardallas.com/index.php?option=com_comprofiler&task=usersList

Concerning hermanandp's solution, it appears the code block is different in the current version of CB from when he posted his sample. For example, from hermanandp:

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) {<strong>         $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&amp;task=userProfile&amp;user=".$user->id)."'\"";             $style="style=\"cursor:hand;cursor:«»pointer;\"";         }         print "\t<tr class=\"$class\" ".$style." </strong>".$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) {             $endofrow0;         //print $user->name;          if($ueConfig['allow_profilelink']==1) {             $onclick "onclick=\"javascript:window.location='".sefRelToAbs("index.php?option=com_comprofiler&amp;task=userProfile&amp;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";                    $endofrow1;             }         $i++;              }                  if ($endofrow == 0) {                     print "\t</tr>\n";             } ?>




Now in the current version of CB it appears we must:

1. locate file- comprofiler.html.php
2. locate the area-
/******************************
List Functions
******************************/
3. within this find the code-

Code:

          </tr> <?php     $i 0;     if (is_array($users) && count($users)>0) {       foreach($users as $user) {         $evenodd $i 2;         if ($evenodd == 0) {             $class "sectiontableentry1";         } else {             $class "sectiontableentry2";         }         //print $user->name;          if($ueConfig['allow_profilelink']==1) {             $style "style=\"cursor:hand;cursor:pointer;\"";             $style .= " id=\"cbU".$i."\"" ;             // $style .= " onclick=\"javascript:window.location='".sefRelToAbs("index.php? option=com_comprofiler&amp;task=userProfile&amp;user=".$user->id.$option_itemid)."'\"";         } else {             $style "";         }         if ($user->banned) {             $colsNbr 1+($row->col2enabled 1:0)+($row->col3enabled 1:0)+($row->col4enabled 1:0);             echo "\t<tr class=\"$class\"><td colspan=\"".$colsNbr."\"><span class=\"error\" style=\"color:red;\">"._UE_BANNEDUSER." ("._UE_VISIBLE_ONLY_MODERATOR.") :</span></td></tr>";         }         print "\t<tr class=\"$class\" ".$style.">\n";         //print $lfields;         $str null;         eval("\$str = \"$lfields\";");         echo $str"\n";         print "\t</tr>\n";         $i++;       }     } else {         $colsNbr 1+($row->col2enabled 1:0)+($row->col3enabled 1:0)+($row->col4enabled 1:0);         echo "\t<tr class=\"sectiontableentry1\"><td colspan=\"".$colsNbr."\">"._UE_NO_USERS_IN_LIST."</td></tr>";     } ?>



And this is where I get lost...

It seems the principal of the change might be the same, but I am a mere coding mortal. (design background) Any insight into this would be greatly appreciated.

-zep
Click here to see the profile of this user The topic has been locked.

Re:userlist with columns
Date: 2006/08/28 00:31 By: zephhk Status: User  
Karma: 0  
Fresh Joomlapolitan

Posts: 8
graphgraph
Well, it's like my dad used to tell me, "Son, even a broken clock is right twice a day, now go get me a beer".

That being said, it appears I succeeded in achieving the 2 column layout in CB Stable. I played around with hermanandp's solution and came up with this. I am not sure if this code configuration will cause the world to come to an end tomorrow, but it seems to work today. (so use it at your own risk) If any php guru's have any suggestions on improvements, fire away.

So, here goes:

1. locate file- comprofiler.html.php
2. locate the area-
/******************************
List Functions
******************************/
3. within this find the code-

Code:

 <?php     $i 0;     if (is_array($users) && count($users)>0) {       foreach($users as $user) {         $evenodd $i 2;         if ($evenodd == 0) {             $class "sectiontableentry1";         } else {             $class "sectiontableentry2";         }         //print $user->name;          if($ueConfig['allow_profilelink']==1) {             $style "style=\"cursor:hand;cursor:pointer;\"";             $style .= " id=\"cbU".$i."\"" ;             // $style .= " onclick=\"javascript:window.location='".sefRelToAbs("index.php? option=com_comprofiler&amp;task=userProfile&amp;user=".$user->id.$option_itemid)."'\"";         } else {             $style "";         }         if ($user->banned) {             $colsNbr 1+($row->col2enabled 1:0)+($row->col3enabled 1:0)+($row->col4enabled 1:0);             echo "\t<tr class=\"$class\"><td colspan=\"".$colsNbr."\"><span class=\"error\" style=\"color:red;\">"._UE_BANNEDUSER." ("._UE_VISIBLE_ONLY_MODERATOR.") :</span></td></tr>";         }         print "\t<tr class=\"$class\" ".$style.">\n";         //print $lfields;         $str null;         eval("\$str = \"$lfields\";");         echo $str"\n";         print "\t</tr>\n";         $i++;       }     } else {         $colsNbr 1+($row->col2enabled 1:0)+($row->col3enabled 1:0)+($row->col4enabled 1:0);         echo "\t<tr class=\"sectiontableentry1\"><td colspan=\"".$colsNbr."\">"._UE_NO_USERS_IN_LIST."</td></tr>";     } ?>


and replace it with this:

Code:

  <?php     $i 1;       foreach($users as $user) {          $endofrow0;                   //print $user->name;          if($ueConfig['allow_profilelink']==1) {             $onclick "onclick=\"javascript:window.location='".sefRelToAbs("index.php?option=com_comprofiler&amp;task=userProfile&amp;user=".$user->id)."'\"";             $style="style=\"cursor:hand;cursor:«»pointer;\"";         }                  //print $lfields;         $str null;         eval("\$str = \"$lfields\";");         echo $str"\n";             $oneintwo $i 2;             if ($oneintwo == 0) {                    print "\t</tr><tr>\n";                    $endofrow1;             }         $i++;     }             if ($endofrow == 0) {                     print "\t</tr>\n";             }      else {         $colsNbr 1+($row->col2enabled 1:0)+($row->col3enabled 1:0)+($row->col4enabled 1:0);         echo "\t<tr class=\"sectiontableentry1\"><td colspan=\"".$colsNbr."\">"._UE_NO_USERS_IN_LIST."</td></tr>";     } ?>



You can check out the end result here, however, I used some additional mods on this page not included in this example (to remove the search function and user list at the top of the page)

http://www.rockstardallas.com/index.php?option=com_comprofiler&task=usersList

Enjoy
Click here to see the profile of this user The topic has been locked.

<< Start < Prev 1 2 3 4 5 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC4)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC4, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers and now also to all registered joomlapolitans.

CB Login