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}>

<table class="outer" cellspacing="1" cellpadding="4">
<tr>
<th align="center"><{$lang_avatar}></th>
<th align="center"><{$lang_username}></th>
<th align="center"><{$lang_realname}></th>
<th align="center"><{$lang_rank}></th>
<th align="center"><{$lang_email}></th>
<th align="center"><{$lang_privmsg}></th>
<th align="center"><{$lang_url}></th>
<th align="center"><{$lang_regdate}></th>
<th align="center"><{$lang_lastlogin}></th>
<th align="center"><{$lang_posts}></th>
<{if $is_admin == true}>
<th align="center">&nbsp;</th>
<{/if}>
</tr>

<{section name=i loop=$users}>
<tr valign="middle">
<td class="even"><{$users[i].avatar}></td>
<td class="odd"><a href="<{$xoops_url}>/userinfo.php?uid=<{$users[i].id}>"><{$users[i].name}></a></td>
<td class="even"><{$users[i].realname}></td>
<td align="center" class="odd"><{$users[i].rank}></td>
<td align="center" class="even"><{$users[i].email}></td>
<td class="odd" align="center"><{$users[i].pmlink}></td>
<td class="even" align="center"><{$users[i].website}></td>
<td class="odd" align="center"><{$users[i].registerdate}></td>
<td align="center"><{$users[i].lastlogin}></td>
<td class="even" align="center"><{$users[i].posts}></td>
<{if $is_admin == true}><td class="even" align="center"><{$users[i].adminlink}></a></td><{/if}>
</tr>
<{/section}>

</table>

<div style="text-align:center">
<{$pagenav}>
<{$lang_numfound}>
</div>

<{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:....
</irony>

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 <th align="center"><{$lang_rank}></th> 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

<?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                           //
//                       <https://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 
"<br><h4 style='text-align:center;'>Les Grades</h4><br><center>Ces grades sont détérminés en fonction du nombre de posts sur le forum 
<br>et de commentaires sur chaque partie du site.</center><br>

    <table width='100%' class='head' cellpadding='4' cellspacing='1'>
    <tr align='center'>
    <td><font color=#666666>Rang</font></td>
    <td><font color=#666666>Nombre de posts minv</td>
    <td><font color=#666666>Nombre de posts max</font></td>
    <td><font color=#666666>Image</font></td></tr>"
;
    
$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 
"<tr class='$class' align='center'>
        <td>"
.$rank['rank_title']."</td>
        <td>"
.$rank['rank_min']."</td>
        <td>"
.$rank['rank_max']."</td>
        <td>"
;
        if ( 
$rank['rank_image'] ) {
            echo 
'<img src="'.XOOPS_URL.'/uploads/'.$rank['rank_image'].'" alt="" /></td>';
        } else {
            echo 
'&nbsp;';
        }
        echo
"</tr>";
        
$count++;
    }
    echo 
'</table><br /><br />';
CloseTable();
include_once 
XOOPS_ROOT_PATH."/footer.php";
?>

Login

Who's Online

159 user(s) are online (108 user(s) are browsing Support Forums)


Members: 0


Guests: 159


more...

Donat-O-Meter

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

Latest GitHub Commits