11
Xtracted
Re: List members?
  • 2004/1/16 15:43

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


Cant I just edit the "xoopsmembers_searchresults.html" template and add "rank" there? Problem is that I dont know what to add...

12
Mithrandir
Re: List members?

No, you cannot. The template can only show information, which is fetched prior in a php file.

You have made some changes to get all members listed and bypassing the search form, right? You wrote that earlier, didn't you? How did you do that?

13
Xtracted
Re: List members?
  • 2004/1/16 15:55

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


Ah, I used the simple change that chapi posted in another thread:

"I also don't like this searchform, but there is a simple fix for this problem:

Edit xoopsmembers/index.php in line 29 and change

$op = "form";

to

$op = "submit";

Now the list will come up firstly without the form!"

14
Mithrandir
Re: List members?

If I have misunderstood you and you really just want to change the normal member listing with search form, go to modules/xoopsmembers/index.php line 349 and add another line like this
$userdata['rank'] = $foundusers[$j]->rank();
as the new line 350.

Now you can edit the template to include <{$users[i].rank}> inside the <{section name=i loop=$users}> loop.

15
Xtracted
Re: List members?
  • 2004/1/16 17:03

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


Ok, I added the line and edited the template so it looks like this:


<{if $total_found != 0}>













<{if $is_admin == true}>

<{/if}>


<{section name=i loop=$users}>











<{if $is_admin == true}><{/if}>

<{/section}>

<{$lang_avatar}> <{$lang_username}> <{$lang_realname}> <{$lang_rank}> <{$lang_email}> <{$lang_privmsg}> <{$lang_url}> <{$lang_regdate}> <{$lang_lastlogin}> <{$lang_posts}>  
<{$users[i].avatar}> <{$users[i].name}> <{$users[i].realname}> <{$users[i].rank}> <{$users[i].email}> <{$users[i].pmlink}> <{$users[i].website}> <{$users[i].registerdate}> <{$users[i].lastlogin}> <{$users[i].posts}><{$users[i].adminlink}>



<{$pagenav}>
<{$lang_numfound}>


<{else}>

<{$lang_nonefound}>

<{/if}>



And something is wrong.. =P

16
Mithrandir
Re: List members?

Ok, if something is wrong, you just have to do this:....


Need more than that to do anything. What is wrong? Errors? Doesn't display anything? What...

17
Xtracted
Re: List members?
  • 2004/1/16 17:14

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


I get a new field in the listing saying "Array".. nothing else... screenshot can be seen at:

http://www.bujinkan.cc/screenshot.jpg

18
Mithrandir
Re: List members?

Right, forgot.

change
$userdata['rank'] = $foundusers[$j]->rank();

to
$rank $foundusers[$j]->rank();
$userdata['rank'] = $rank['title'];

19
Xtracted
Re: List members?
  • 2004/1/16 17:24

  • Xtracted

  • Not too shy to talk

  • Posts: 138

  • Since: 2004/1/7 2


Ah, great, now I get the rank text, thanks!

Hm.. I dont get a header to that row.. It should say "rank".. is the <{$lang_rank}> line wrong? Or do I have to add a line in the language file (I guess thats where it tries to get the title from?)

20
shino
Re: List members?
  • 2004/1/16 18:40

  • shino

  • Theme Designer

  • Posts: 23

  • Since: 2003/7/16


maybe is that...create a file in
modules\xoopsmembers
with a name for example : grade.php

// $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";

    
$db =& Database::getInstance();

OpenTable();
    echo 
"
Les Grades
Ces grades sont détérminés en fonction du nombre de posts sur le forum 

et de commentaires sur chaque partie du site.



    
    
    Rang
    Nombre de posts minv
    Nombre de posts max
    Image"
;
    
$result $db->query("SELECT * FROM ".$db->prefix("ranks")." where rank_special=0 ORDER BY rank_id");
    
$count 0;
    while ( 
$rank $db->fetchArray($result) ) {
        if (
$count == 0) {
            
$class 'odd';
        } else {
            
$class 'even';
        }
        echo 
"$class' align='center'>
        "
.$rank['rank_title']."
        "
.$rank['rank_min']."
        "
.$rank['rank_max']."
        "
;
        if ( 
$rank['rank_image'] ) {
            echo 
'.XOOPS_URL.'/uploads/'.$rank['rank_image'].'" alt="" />';
        } else {
            echo 
' ';
        }
        echo
"";
        
$count++;
    }
    echo 
'';
CloseTable();
include_once 
XOOPS_ROOT_PATH."/footer.php";
?>

Login

Who's Online

294 user(s) are online (264 user(s) are browsing Support Forums)


Members: 1


Guests: 293


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