• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to move "search" to the top of the members list
#1

How to move "search" to the top of the members list

By default, the search function is at the bottom of the members list. This tutorial is going to show you how to move it to the top.

You can find your members list at: http://yoursite.com/memberlist.php


Steps

Go to:
  • Admin CP
  • Templates (Left)
  • *your theme*
  • Member List Templates
  • memberlist

Look for " <br style="clear: both;" /> ". Once you've found it, highlight from there to " </form> " like below.

Code:
<br style="clear: both;" />
<br />
<form method="post" action="memberlist.php">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="3">
    <div class="float_right">
        <strong><a href="memberlist.php?action=search">{$lang->advanced_search}</a></strong>
    </div>
    <div><strong>{$lang->search_members}</strong></div>
</td>
</tr>
<tr>
    <td class="tcat"><strong><label for="username">{$lang->username}</label></strong></td>
    <td class="tcat"><strong><label for="website">{$lang->website}</label></strong></td>
    <td class="tcat"><strong><label for="sort">{$lang->sort_by}</label></strong></td>
</tr>
<tr>
    <td class="trow1" width="33%" style="vertical-align: top;">
        {$lang->contains}<br />
        <input type="text" class="textbox" name="username" id="username" style="width: 99%; margin-top: 4px;" value="{$search_username}" />
    </td>
    <td class="trow1" width="33%" style="vertical-align: top;">
        {$lang->contains}<br />
        <input type="text" class="textbox" name="website" id="website" style="width: 99%; margin-top: 4px;" value="{$search_website}" />
    </td>
    <td class="trow1" width="33%">
        <select name="sort" id="sort" style="width: 99%;">
            <option value="username"{$sort_selected['username']}>{$lang->sort_by_username}</option>
            <option value="regdate"{$sort_selected['regdate']}>{$lang->sort_by_regdate}</option>
            <option value="lastvisit"{$sort_selected['lastvisit']}>{$lang->sort_by_lastvisit}</option>
            <option value="postnum"{$sort_selected['postnum']}>{$lang->sort_by_posts}</option>
            <option value="referrals"{$sort_selected['referrals']}>{$lang->sort_by_referrals}</options>
        </select><br />
        <span class="smalltext">
        <input type="radio" class="radio" name="order" id="order_asc" value="ascending"{$order_check['ascending']} /> <label for="order_asc">{$lang->order_asc}</label><br />
        <input type="radio" class="radio" name="order" id="order_desc" value="descending"{$order_check['descending']} /> <label for="order_desc">{$lang->order_desc}</label>
        </span>
    </td>
</tr>
</table>
<div align="center"><br /><input type="submit" class="button" name="submit" value="{$lang->search}" /></div>
</form>

Cut it, scroll back up and paste it directly under " {header} ".


Your end result should be this:

Code:
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->member_list}</title>
{$headerinclude}
</head>
<body>
{$header}
<br style="clear: both;" />
<br />
<form method="post" action="memberlist.php">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="3">
    <div class="float_right">
        <strong><a href="memberlist.php?action=search">{$lang->advanced_search}</a></strong>
    </div>
    <div><strong>{$lang->search_members}</strong></div>
</td>
</tr>
<tr>
    <td class="tcat"><strong><label for="username">{$lang->username}</label></strong></td>
    <td class="tcat"><strong><label for="website">{$lang->website}</label></strong></td>
    <td class="tcat"><strong><label for="sort">{$lang->sort_by}</label></strong></td>
</tr>
<tr>
    <td class="trow1" width="33%" style="vertical-align: top;">
        {$lang->contains}<br />
        <input type="text" class="textbox" name="username" id="username" style="width: 99%; margin-top: 4px;" value="{$search_username}" />
    </td>
    <td class="trow1" width="33%" style="vertical-align: top;">
        {$lang->contains}<br />
        <input type="text" class="textbox" name="website" id="website" style="width: 99%; margin-top: 4px;" value="{$search_website}" />
    </td>
    <td class="trow1" width="33%">
        <select name="sort" id="sort" style="width: 99%;">
            <option value="username"{$sort_selected['username']}>{$lang->sort_by_username}</option>
            <option value="regdate"{$sort_selected['regdate']}>{$lang->sort_by_regdate}</option>
            <option value="lastvisit"{$sort_selected['lastvisit']}>{$lang->sort_by_lastvisit}</option>
            <option value="postnum"{$sort_selected['postnum']}>{$lang->sort_by_posts}</option>
            <option value="referrals"{$sort_selected['referrals']}>{$lang->sort_by_referrals}</options>
        </select><br />
        <span class="smalltext">
        <input type="radio" class="radio" name="order" id="order_asc" value="ascending"{$order_check['ascending']} /> <label for="order_asc">{$lang->order_asc}</label><br />
        <input type="radio" class="radio" name="order" id="order_desc" value="descending"{$order_check['descending']} /> <label for="order_desc">{$lang->order_desc}</label>
        </span>
    </td>
</tr>
</table>
<div align="center"><br /><input type="submit" class="button" name="submit" value="{$lang->search}" /></div>
</form>
<br />
{$multipage}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="6">
    <div class="float_right">
        <a href="memberlist.php?username_match=begins&amp;username={$lang->a}" style="padding: 5px;">{$lang->a}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->b}" style="padding: 5px;">{$lang->b}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->c}" style="padding: 5px;">{$lang->c}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->d}" style="padding: 5px;">{$lang->d}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->e}" style="padding: 5px;">{$lang->e}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->f}" style="padding: 5px;">{$lang->f}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->g}" style="padding: 5px;">{$lang->g}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->h}" style="padding: 5px;">{$lang->h}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->i}" style="padding: 5px;">{$lang->i}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->j}" style="padding: 5px;">{$lang->j}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->k}" style="padding: 5px;">{$lang->k}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->l}" style="padding: 5px;">{$lang->l}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->m}" style="padding: 5px;">{$lang->m}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->n}" style="padding: 5px;">{$lang->n}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->o}" style="padding: 5px;">{$lang->o}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->p}" style="padding: 5px;">{$lang->p}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->q}" style="padding: 5px;">{$lang->q}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->r}" style="padding: 5px;">{$lang->r}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->s}" style="padding: 5px;">{$lang->s}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->t}" style="padding: 5px;">{$lang->t}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->u}" style="padding: 5px;">{$lang->u}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->v}" style="padding: 5px;">{$lang->v}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->w}" style="padding: 5px;">{$lang->w}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->x}" style="padding: 5px;">{$lang->x}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->y}" style="padding: 5px;">{$lang->y}</a>
        <a href="memberlist.php?username_match=begins&amp;username={$lang->z}" style="padding: 5px;">{$lang->z}</a>
    </div>
    <div><strong>{$lang->member_list}</strong></td></div>
</tr>
<tr>
<td class="tcat" width="1%"><span class="smalltext"><strong>{$lang->avatar}</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>{$lang->username}</strong></span></td>
<td class="tcat" width="15%" align="center"><span class="smalltext"><strong>{$lang->joined}</strong></span></td>
<td class="tcat" width="15%" align="center"><span class="smalltext"><strong>{$lang->lastvisit}</strong></span></td>
<td class="tcat" width="10%" align="center"><span class="smalltext"><strong>{$lang->posts}</strong></span></td>
{$referral_header}
</tr>
{$users}
</table>
<div class="float_right" style="padding-top: 4px;">
    <a href="showteam.php"><strong>{$lang->forumteam}</strong></a>
</div>
{$multipage}
{$footer}
<script type="text/javascript" src="jscripts/autocomplete.js?ver=1400"></script>
<script type="text/javascript">
<!--
    if(use_xmlhttprequest == "1")
    {
        new autoComplete("username", "xmlhttp.php?action=get_users", {valueSpan: "username"});
    }
// -->
</script>
</body>
</html>


Example:

[spoiler]
[Image: mybbtut-memberslist.png]
[/spoiler]
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Group promotions - Automatically move users! Mark 0 7,501 18-11-2010, 04:46 PM
Last Post: Mark
  Whois users straight from the who's online list! Mark 0 6,192 24-10-2010, 10:28 PM
Last Post: Mark
  How to backup and move a MyBB forum Mark 0 31,833 24-10-2010, 04:04 AM
Last Post: Mark
  [TUT] Editing members profile appearance in MyBB Mark 0 61,576 22-10-2010, 10:45 PM
Last Post: Mark
  List of free webhosting providers. Loka123 !p9TllnK6yg 15 37,735 05-08-2010, 03:48 PM
Last Post: Blue_Social

Forum Jump: