21
Xtracted
Re: List members?
  • 2004/1/16 19:04

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


Ok, done.. Now what?

22
shino
Re: List members?
  • 2004/1/16 19:41

  • shino

  • Theme Designer

  • Posts: 23

  • Since: 2003/7/16


it's a table with the "grades"
he's in french, sorry :p
translate yourself !


23
Xtracted
Re: List members?
  • 2004/1/16 19:55

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


Eh.. what am I supposed to do with it? =P All I want is that it should say "Rank" on the top of the members search result page... =P

24
Mithrandir
Re: List members?

The hacked xoopsmembers/index.php

Where you added the previous code to fetch the user rank.

Outside of that is a list of $xoopsTpl->assign('lang_Something' => _MA_SOMETHING);

Add a
$xoopsTpl->assign('lang_rank' =>

Sorry - intoxicated atm.

Seems the code for saying "Rank" at the top of the page is in some weird language file in some weird module.

If this is a modification of a personal website and nothing to do with language-selection etc. Just edit the template to say
<td>Ranktd>

instead of
<td><{$lang_rank}>td>

Not as clean code - but if you run only English on your site, it doesn't matter, really.

25
irmtfan
Re: List members?
  • 2004/2/21 22:49

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


sorry for my basic question

i create list.php & grade.php how use them?? what is the next step?

i want to show member list in xoopsmembers/index.php instead search page & show ranks of users & any useful command in list.php & grades.php

26
irmtfan
Re: List members?
  • 2004/2/28 9:44

  • irmtfan

  • Module Developer

  • Posts: 3419

  • Since: 2003/12/7


just a guide to use this hack plz

27
Xtracted
Re: List members?
  • 2005/4/20 14:42

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


Ok, now with this hack, I get people who gets wrong rank displayed for users.. it works fine for me but for others the wrong rank is displayed in front of certain people in the memberlist.. I think that the ranks are moved down one step or something..

28
u2psycho
Re: List members?
  • 2005/5/23 0:00

  • u2psycho

  • Just popping in

  • Posts: 6

  • Since: 2005/1/3 2


i read and re-read this topic and still don't understand how to get the members rank displayed on my site members list.....can anyone help me? and show me the different steps ?

do i only have to modify my index.php file to make it work? make a new file? plz help the newb coder i am...i joined my index.php and i put in red the line where theres something missing....can some1 help me filling that part so the members rank can be displayed?or do i need to do seomthing else too? i tried a few things but always got a blank column....i really dont know wut to do :(

here's my index.php from modules/xoopsmembers

// $Id: index.php,v 1.2 2003/01/25 22:52:08 Onokazu Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                                                    //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
include "../../mainfile.php";
include 
"../../header.php";
function 
alpha() {
    global 
$sortby$xoopsConfig;
    
$alphabet = array ( "A","B","C","D","E","F","G","H","I","J","K","L","M",
                            
"N","O","P","Q","R","S","T","U","V","W","X","Y","Z", );
        
$num count($alphabet) - 1;
        echo 
"[ "// start of HTML
        
$counter 0;
        while (list(, 
$ltr) = each($alphabet)) {
                echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$ltr."&sortby=".$sortby."'>".$ltr."";
                if ( 
$counter == round($num/2) ) {
                    echo 
" ]nn[ "
                } elseif ( 
$counter != $num ) {
                    echo 
" | n";
                }
                
$counter++;
        }
        echo 
" ]n
nn";
}

if ( 
$xoopsConfig['startpage'] == "xoopsmembers" ) {
    
$xoopsOption['show_rblock'] =1;
    include(
XOOPS_ROOT_PATH."/header.php");
    
make_cblock();
    echo 
"";
} else {
    
$xoopsOption['show_rblock'] =0;
    include(
XOOPS_ROOT_PATH."/header.php");
}
$pagesize 20;

if ( !isset(
$letter) ) { $letter _ML_ALL; }
if ( !isset(
$sortby) ) { $sortby "uid"; }
if ( !isset(
$orderby) ) { $orderby "ASC"; }
if ( !isset(
$page) ) { $page 1; }

if ( isset(
$query) ) {
        
$where "WHERE level>0 AND (uname LIKE '%$query%' OR user_icq LIKE '%$query%' ";
        
$where .= "OR user_from LIKE '%$query%' OR user_sig LIKE '%$query%' ";
        
$where .= "OR user_aim LIKE '%$query%' OR user_yim LIKE '%$query%' OR user_msnm like '%$query%'";
    if ( 
$xoopsUser ) {
            if ( 
$xoopsUser->isAdmin() ) {
                
$where .= " OR email LIKE '%$query%'";
        }
        }
    
$where .= ") ";
} else {
        
$where "WHERE level>0";
}
$result $xoopsDB->query("SELECT uid, uname FROM ".$xoopsDB->prefix("users").$where ORDER BY uid DESC",1,0);
list(
$lastuid$lastuser) = $xoopsDB->fetchRow($result);

OpenTable();
echo 
"";
echo 
"
n";
echo 
Last_User..XOOPS_URL."/userinfo.php?uid=".$lastuid."'>".$lastuser."
n";
if (isset(
$query) && trim($query) != "") {
        
$where "WHERE level>0 AND (uname LIKE '%$query%' OR user_icq LIKE '%$query%' ";
        
$where .= "OR user_from LIKE '%$query%' OR user_sig LIKE '%$query%' ";
        
$where .= "OR user_aim LIKE '%$query%' OR user_yim LIKE '%$query%' OR user_msnm like '%$query%'";
        if ( 
$xoopsUser ) {
        if ( 
$xoopsUser->isAdmin() ) {
                
$where .= " OR email LIKE '%$query%'";
            }
    }
    
$where .= ") ";
} else {
        
$where "WHERE level>0";
}

list(
$numrows) = $xoopsDB->fetchRow($xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("users").$where"));

echo 
"";

echo 
"
";
        
echo 
".XOOPS_URL."/modules/xoopsmembers/index.php' method='post'>";
if ( isset(
$query) ) {
        echo 
"$query' />";
} else {
        echo 
"";
}
echo 
".SEARCH."' />";

echo 
".XOOPS_URL."/modules/xoopsmembers/index.php' method='post'>";
echo 
".RESET."' />";
echo 
"";
alpha();

$min $pagesize * ($page 1); 
$max $pagesize
        
$count "SELECT COUNT(uid) AS total FROM ".$xoopsDB->prefix("users")." "// Count all the users in the db..
$select "SELECT uid, name, uname, email, url, user_avatar, user_regdate, user_icq, user_from, user_aim, user_yim, user_msnm, user_viewemail FROM ".$xoopsDB->prefix("users")." ";
if ( ( 
$letter != _ML_OTHER ) AND ( $letter != _ML_ALL ) ) {
    
$where "WHERE level>0 AND uname LIKE '".$letter."%' ";
} else if ( ( 
$letter == _ML_OTHER ) AND ( $letter != _ML_ALL ) ) {
        
$where "WHERE level>0 AND uname REGEXP '^[1-9]' "
} else { 
        
$where "WHERE level>0 "
}
$sort "order by $sortby $orderby";


if ( isset(
$query) ) {
        
$where "WHERE level>0 AND (uname LIKE '%$query%' OR user_icq LIKE '%$query%' ";
        
$where .= "OR user_from LIKE '%$query%' OR user_sig LIKE '%$query%' ";
        
$where .= "OR user_aim LIKE '%$query%' OR user_yim LIKE '%$query%' OR user_msnm LIKE '%$query%'";
        if ( 
$xoopsUser ) {
        if ( 
$xoopsUser->isAdmin() ) {
                
$where .= "OR email LIKE '%$query%'";
        }
        }
    
$where .= ") ";
}
$count_result $xoopsDB->query($count.$where);
list(
$num_rows_per_order) = $xoopsDB->fetchRow($count_result);

$result $xoopsDB->query($select.$where.$sort,$max,$min) or die($xoopsDB->error() ); // Now lets do it !!
echo "";
if ( 
$letter != "front" ) {
    if ( 
$orderby == "ASC" ) {
        
$orderby "DESC";
    } else {
        
$orderby "ASC";
    }
    if ( !isset(
$query) ) {
        
$query "";
    }
    echo 
"n";
    echo 
"n";
    echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=user_avatar&orderby=".$orderby."&query=".$query."'>".Avatar."n"
;
        echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=uname&orderby=".$orderby."&query=".$query."'>".NickName."n"
;
        echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=url&orderby=".$orderby."&query=".$query."'>".Rank."n"
;
        echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=name&orderby=".$orderby."&query=".$query."'>".Posts."n"
;
    echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=user_regdate&orderby=".$orderby."&query=".$query."'>".RegDate."n"
;
        echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=email&orderby=".$orderby."&query=".$query."'>".EMAIL."n";
    echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=email&orderby=".$orderby."&query=".$query."'>".PM."n";
        echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=url&orderby=".$orderby."&query=".$query."'>".URL."n";
        
$cols 8;
        if ( 
$xoopsUser ) {
        if ( 
$xoopsUser->isAdmin() ) {
                    
$cols 9;
                    echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=email&orderby=".$orderby."&query=".$query."'>".Admin."n";
        }
        }
        echo 
"";
        
$a 0;
        
$dcolor_A "odd";
        
$dcolor_B "even";

        
$num_users $xoopsDB->getRowsNum($result); //number of users per sorted and limit query
        
if ( $num_rows_per_order 0  ) {
                while ( 
$userinfo $xoopsDB->fetchArray($result) ) {
            
$userinfo = new XoopsUser($userinfo['uid']);
                        
$dcolor = ($a == $dcolor_A $dcolor_B);
                        echo 
".$dcolor."'>n";
            echo 
".XOOPS_URL."/uploads/".$userinfo->user_avatar()."' alt='' /> n";
            echo 
".XOOPS_URL."/userinfo.php?uid=".$userinfo->uid()."'>".$userinfo->uname("E")." n";
            [
color=FF0000]//missing lines to show rank here[/color]
                        
echo "".$userinfo->posts("E")." n";
            echo 
"".formatTimeStamp($userinfo->user_regdate(),"m")." n";
            
$showmail 0;
            if ( 
$userinfo->user_viewemail() ) {
                
$showmail 1;
            } else {
                if ( 
$xoopsUser ) {
                    if ( 
$xoopsUser->isAdmin() ) {
                        
$showmail 1;
                    }
                }
                
            }
            if ( 
$showmail ){
                echo 
".$userinfo->email("E")."'>.XOOPS_URL."/images/icons/email.gif' border='0' alt='";
                
printf(_SENDEMAILTO,$userinfo->uname("E"));
                echo 
"' />n";
            } else {
                echo 
" n";
            }
            echo 
"";
            if ( 
$xoopsUser ) {
                echo 
"/pmlite.php?send2=1&to_userid=".$userinfo->uid()."","pmlite",450,370);'>";
                echo 
".XOOPS_URL."/images/icons/pm.gif' border='0' alt='";
                
printf(_SENDPMTO,$userinfo->uname("E"));
                echo 
"' />";
            } else {
                echo 
" ";
            }
            echo 
"n";
            if ( 
$userinfo->url("E") ) {
                            echo 
".$userinfo->url("E")."' target=new>.XOOPS_URL."/images/icons/www.gif' border='0' alt='"._VISITWEBSITE."' />n";
            } else {
                echo 
" n";
            }
                        echo 
"n";
                        
                        if ( 
$xoopsUser ) {
                if ( 
$xoopsUser->isAdmin() ) {
                                echo 
".XOOPS_URL."/modules/system/admin.php?fct=users&op=reactivate&uid=".$userinfo->uid()."&op=modifyUser'>".EDIT."n";
                                echo 
".XOOPS_URL."/modules/system/admin.php?fct=users&op=delUser&uid=".$userinfo->uid()."'>".DELETE."n";
                }
                        }
                        echo 
"";
                        
$a = ($dcolor == $dcolor_A 0);
                } 
// end while ()
        
echo "";
                
// start of next/prev/row links.
        
echo "";

                echo 
"n";
                
                if ( 
$num_rows_per_order $pagesize ) { 
                        
$total_pages ceil($num_rows_per_order $pagesize); // How many pages are we dealing with here ??
                        
$prev_page $page 1;
                    
                        if ( 
$prev_page ) {
                            echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=".$sortby."&page=".$prev_page."'>";
                            echo 
"<<($prev_page)";
                        } else { 
                            echo 
" n"
                        }
                
                        echo 
"";


                        
$next_page $page 1;
                        if ( 
$next_page <= $total_pages ) {
                            echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=".$sortby."&page=".$next_page."'>";
                            echo 
"(".$next_page.")>>";
                        } else {
                            echo 
" n"
                        }
    
/* Added a numbered page list, only shows up to 50 pages. */
                    
                        
echo "";
                        echo 
";
                        
                        for ( 
$n 1$n $total_pages$n++ ) {
                                if ( 
$n == $page ) {
                    echo 
"$n"
;
                                } else {
                    echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=".$sortby."&page=".$n."'>";
                    echo 
"$n"
;
                    }
                                if ( 
$n >= 50 ) {  // if more than 50 pages are required, break it at 50.
                                    
$break true
                                    break;
                                } else {  
// guess not.
                                    
echo " | "
                                }
                        }
                        
                        if(!isset(
$break)) { // are we sopposed to break ?
                    
if ( $n == $page ) {
                                echo 
"$n"
;
                    } else {
                                echo 
".XOOPS_URL."/modules/xoopsmembers/index.php?letter=".$letter."&sortby=".$sortby."&page=".$total_pages."'>";
                                echo 
"$n"
;
                    }
                        }
                        echo 
] ";
                        echo 
"";

                }else{ 
                        echo 
"";
            
printf(_ML_USERSFOUND,$num_rows_per_order);
                        echo 
"";
                    
        }
                
                echo 
"n";

                
// end of next/prev/row links
                
    
} else {
                echo 
".$cols."' align='center'>n";
        echo 
"";
        
printf(_ML_NOUSERFOUND,$letter);
                echo 
"
n"
;
                echo 
"n";
                echo 
"n";
        }
}
CloseTable();
include(
XOOPS_ROOT_PATH."/footer.php");

?>


thx in advance for ur help

29
areamike
Re: List members?
  • 2005/9/27 17:01

  • areamike

  • Just popping in

  • Posts: 33

  • Since: 2005/1/28


Quote:

I cannot access that link in order to try the same thing the poster of this topic did.

Login

Who's Online

330 user(s) are online (276 user(s) are browsing Support Forums)


Members: 1


Guests: 329


Harald0123,

more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits