Autor Tópico: Dynamic Memberlist 2.0  (Lida 6016 vezes)

0 Membros e 1 Visitante estão a ver este tópico.

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Dynamic Memberlist 2.0
« em: 20 de Novembro de 2010, 07:55 »
/Sources/Memberlist.php

Código: [Seleccione]
      ),
      'real_name' => array(
         'label' => $txt['username']
      ),
      'email_address' => array(
         'label' => $txt['email'],
         'width' => '25'
      ),
      'website_url' => array(
         'label' => $txt['website'],
         'width' => '25',
         'link_with' => 'website',
      ),
      'icq' => array(
         'label' => $txt['icq'],
         'width' => '25'
      ),
      'aim' => array(
         'label' => $txt['aim'],
         'width' => '25'
      ),
      'yim' => array(
         'label' => $txt['yim'],
         'width' => '25'
      ),
      'msn' => array(
         'label' => $txt['msn'],
         'width' => '25'
      ),
      'id_group' => array(
         'label' => $txt['position']
      ),
      'registered' => array(
         'label' => $txt['date_registered']
      ),
      'posts' => array(
         'label' => $txt['posts'],
         'width' => '115',
         'colspan' => '2',
         'default_sort_rev' => true,
      )
   );

Código: [Seleccione]
$context['num_members'] = $modSettings['totalMembers'];

   // Set up the columns...
   $context['columns'] = array(
      'is_online' => array(
         'label' => $txt['status'],
      ),
      'real_name' => array(
         'label' => $txt['name'],
      ),
      'email_address' => array(
         'label' => $txt['email'],
      ),
      'website_url' => array(
         'label' => $txt['website'],
         'link_with' => 'website',
      ),
      'icq' => array(
         'label' => $txt['icq'],
      ),
      'aim' => array(
         'label' => $txt['aim'],
      ),
      'yim' => array(
         'label' => $txt['yim'],
      ),
      'msn' => array(
         'label' => $txt['msn'],
      ),
      'id_group' => array(
         'label' => $txt['position']
      ),
      'registered' => array(
         'label' => $txt['joined']
      ),
      'last_login' => array(
         'label' => $txt['last_active']
      ),
      'posts' => array(
         'label' => $txt['posts'],
         'default_sort_rev' => true,
      )
   );

Código: [Seleccione]
   // List out the different sorting methods...
   $sort_methods = array(
      'is_online' => array(
         'down' => '(IFNULL(lo.log_time, 1=1)' . (!allowedTo('moderate_forum') ? ' OR NOT mem.show_online' : '') . ') ASC, real_name ASC',
         'up' => '(IFNULL(lo.log_time, 1=1)' . (!allowedTo('moderate_forum') ? ' OR NOT mem.show_online' : '') . ') DESC, real_name DESC'
      ),
      'real_name' => array(
         'down' => 'mem.real_name DESC',
         'up' => 'mem.real_name ASC'
      ),
      'email_address' => array(
         'down' => allowedTo('moderate_forum') ? 'mem.email_address DESC' : 'mem.hide_email DESC, mem.email_address DESC',
         'up' => allowedTo('moderate_forum') ? 'mem.email_address ASC' : 'mem.hide_email ASC, mem.email_address ASC'
      ),
      'website_url' => array(
         'down' => 'LENGTH(mem.website_url) > 0 ASC, IFNULL(mem.website_url, 1=1) DESC, mem.website_url DESC',
         'up' => 'LENGTH(mem.website_url) > 0 DESC, IFNULL(mem.website_url, 1=1) ASC, mem.website_url ASC'
      ),
      'icq' => array(
         'down' => 'LENGTH(mem.icq) > 0 ASC, IFNULL(mem.icq, 1=1) OR mem.icq = 0 DESC, mem.icq DESC',
         'up' => 'LENGTH(mem.icq) > 0 DESC, IFNULL(mem.icq, 1=1) OR mem.icq = 0 ASC, mem.icq ASC'
      ),
      'aim' => array(
         'down' => 'LENGTH(mem.aim) > 0 ASC, IFNULL(mem.aim, 1=1) DESC, mem.aim DESC',
         'up' => 'LENGTH(mem.aim) > 0 DESC, IFNULL(mem.aim, 1=1) ASC, mem.aim ASC'
      ),
      'yim' => array(
         'down' => 'LENGTH(mem.yim) > 0 ASC, IFNULL(mem.yim, 1=1) DESC, mem.yim DESC',
         'up' => 'LENGTH(mem.yim) > 0 DESC, IFNULL(mem.yim, 1=1) ASC, mem.yim ASC'
      ),
      'msn' => array(
         'down' => 'LENGTH(mem.msn) > 0 ASC, IFNULL(mem.msn, 1=1) DESC, mem.msn DESC',
         'up' => 'LENGTH(mem.msn) > 0 DESC, IFNULL(mem.msn, 1=1) ASC, mem.msn ASC'
      ),
      'registered' => array(
         'down' => 'mem.date_registered DESC',
         'up' => 'mem.date_registered ASC'
      ),
      'id_group' => array(
         'down' => 'IFNULL(mg.group_name, 1=1) DESC, mg.group_name DESC',
         'up' => 'IFNULL(mg.group_name, 1=1) ASC, mg.group_name ASC'
      ),
      'posts' => array(
         'down' => 'mem.posts DESC',
         'up' => 'mem.posts ASC'
      )
   );


Código: [Seleccione]
// List out the different sorting methods...
   $sort_methods = array(
      'is_online' => array(
         'down' => '(IFNULL(lo.log_time, 1=1)' . (!allowedTo('moderate_forum') ? ' OR NOT mem.show_online' : '') . ') ASC, real_name ASC',
         'up' => '(IFNULL(lo.log_time, 1=1)' . (!allowedTo('moderate_forum') ? ' OR NOT mem.show_online' : '') . ') DESC, real_name DESC'
      ),
      'real_name' => array(
         'down' => 'mem.real_name DESC',
         'up' => 'mem.real_name ASC'
      ),
      'email_address' => array(
         'down' => allowedTo('moderate_forum') ? 'mem.email_address DESC' : 'mem.hide_email DESC, mem.email_address DESC',
         'up' => allowedTo('moderate_forum') ? 'mem.email_address ASC' : 'mem.hide_email ASC, mem.email_address ASC'
      ),
      'website_url' => array(
         'down' => 'LENGTH(mem.website_url) > 0 ASC, IFNULL(mem.website_url, 1=1) DESC, mem.website_url DESC',
         'up' => 'LENGTH(mem.website_url) > 0 DESC, IFNULL(mem.website_url, 1=1) ASC, mem.website_url ASC'
      ),
      'icq' => array(
         'down' => 'LENGTH(mem.icq) > 0 ASC, mem.icq = 0 DESC, mem.icq DESC',
         'up' => 'LENGTH(mem.icq) > 0 DESC, mem.icq = 0 ASC, mem.icq ASC'
      ),
      'aim' => array(
         'down' => 'LENGTH(mem.aim) > 0 ASC, IFNULL(mem.aim, 1=1) DESC, mem.aim DESC',
         'up' => 'LENGTH(mem.aim) > 0 DESC, IFNULL(mem.aim, 1=1) ASC, mem.aim ASC'
      ),
      'yim' => array(
         'down' => 'LENGTH(mem.yim) > 0 ASC, IFNULL(mem.yim, 1=1) DESC, mem.yim DESC',
         'up' => 'LENGTH(mem.yim) > 0 DESC, IFNULL(mem.yim, 1=1) ASC, mem.yim ASC'
      ),
      'msn' => array(
         'down' => 'LENGTH(mem.msn) > 0 ASC, IFNULL(mem.msn, 1=1) DESC, mem.msn DESC',
         'up' => 'LENGTH(mem.msn) > 0 DESC, IFNULL(mem.msn, 1=1) ASC, mem.msn ASC'
      ),
      'registered' => array(
         'down' => 'mem.date_registered DESC',
         'up' => 'mem.date_registered ASC'
      ),
      'last_login' => array(
         'down' => 'mem.last_login DESC',
         'up' => 'mem.last_login ASC'
      ),
      'id_group' => array(
         'down' => 'IFNULL(mg.group_name, 1=1) DESC, mg.group_name DESC',
         'up' => 'IFNULL(mg.group_name, 1=1) ASC, mg.group_name ASC'
      ),
      'posts' => array(
         'down' => 'mem.posts DESC',
         'up' => 'mem.posts ASC'
      )
   );



Memberlist.template.php

Código: [Seleccione]
// Displays a sortable listing of all members registered on the forum.
function template_main()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Show the link tree.
   echo '
   <div style="padding: 3px;">', theme_linktree(), '</div>';

   // shall we use the tabs?
   if (!empty($settings['use_tabs']))
   {
      // Display links to view all/search.
      echo '
   <table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
      <tr>
         <td class="mirrortab_first">&nbsp;</td>';

      foreach ($context['sort_links'] as $link)
      {
         if ($link['selected'])
            echo '
            <td class="mirrortab_active_first">&nbsp;</td>
            <td valign="top" class="mirrortab_active_back">
               <a href="' . $scripturl . '?action=mlist' . (!empty($link['action']) ? ';sa=' . $link['action'] : '') . '">', $link['label'], '</a>
            </td>
            <td class="mirrortab_active_last">&nbsp;</td>';
         else
            echo '
            <td valign="top" class="mirrortab_back">
               <a href="' . $scripturl . '?action=mlist' . (!empty($link['action']) ? ';sa=' . $link['action'] : '') . '">', $link['label'], '</a>
            </td>';
      }

      echo '
         <td class="mirrortab_last">&nbsp;</td>
      </tr>
   </table>';
   }

   echo '
   <table border="0" cellspacing="1" cellpadding="4" align="center" width="100%" class="bordercolor">';

   // Old style tabs?
   if (empty($settings['use_tabs']))
   {
      echo '
      <tr class="titlebg">
         <td colspan="', $context['colspan'], '">';
            $links = array();
            foreach ($context['sort_links'] as $link)
               $links[] = ($link['selected'] ? '<img src="' . $settings['images_url'] . '/selected.gif" alt="&gt;" /> ' : '') . '<a href="' . $scripturl . '?action=mlist' . (!empty($link['action']) ? ';sa=' . $link['action'] : '') . '">' . $link['label'] . '</a>';

            echo '
               ', implode(' | ', $links), '
         </td>
      </tr>';
   }
   echo '
      <tr>
         <td colspan="', $context['colspan'], '" class="', empty($settings['use_tabs']) ? 'catbg' : 'titlebg', '">';

      // Display page numbers and the a-z links for sorting by name if not a result of a search.
      if (!isset($context['old_search']))
         echo '
            <table width="100%" cellpadding="0" cellspacing="0" border="0">
               <tr>
                  <td>', $txt['pages'], ': ', $context['page_index'], '</td>
                  <td align="right">', $context['letter_links'] . '</td>
               </tr>
            </table>';
      // If this is a result of a search then just show the page numbers.
      else
         echo '
            ', $txt['pages'], ': ', $context['page_index'];

      echo '
         </td>
      </tr>
      <tr class="', empty($settings['use_tabs']) ? 'titlebg' : 'catbg3', '">';

   // Display each of the column headers of the table.
   foreach ($context['columns'] as $column)
   {
      // We're not able (through the template) to sort the search results right now...
      if (isset($context['old_search']))
         echo '
         <td', isset($column['width']) ? ' width="' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>
            ', $column['label'], '</td>';
      // This is a selected solumn, so underline it or some such.
      elseif ($column['selected'])
         echo '
         <td style="width: auto;"' . (isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '') . ' nowrap="nowrap">
            <a href="' . $column['href'] . '" rel="nofollow">' . $column['label'] . ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" /></a></td>';
      // This is just some column... show the link and be done with it.
      else
         echo '
         <td', isset($column['width']) ? ' width="' . $column['width'] . '"' : '', isset($column['colspan']) ? ' colspan="' . $column['colspan'] . '"' : '', '>
            ', $column['link'], '</td>';
   }
   echo '
      </tr>';

   // Assuming there are members loop through each one displaying their data.
   if (!empty($context['members']))
   {
      foreach ($context['members'] as $member)
      {
         echo '
      <tr style="text-align: center;"', empty($member['sort_letter']) ? '' : ' id="letter' . $member['sort_letter'] . '"', '>
         <td class="windowbg2">
            ', $context['can_send_pm'] ? '<a href="' . $member['online']['href'] . '" title="' . $member['online']['text'] . '">' : '', $settings['use_image_buttons'] ? '<img src="' . $member['online']['image_href'] . '" alt="' . $member['online']['text'] . '" align="middle" />' : $member['online']['label'], $context['can_send_pm'] ? '</a>' : '', '
         </td>
         <td class="windowbg" align="left">', $member['link'], '</td>
         <td class="windowbg2">', $member['show_email'] == 'no' ? '' : '<a href="' . $scripturl . '?action=emailuser;sa=email;uid=' . $member['id'] . '" rel="nofollow"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . ' ' . $member['name'] . '" /></a>', '</td>';

      if (!isset($context['disabled_fields']['website']))
         echo '
         <td class="windowbg">', $member['website']['url'] != '' ? '<a href="' . $member['website']['url'] . '" target="_blank" class="new_win"><img src="' . $settings['images_url'] . '/www.gif" alt="' . $member['website']['title'] . '" title="' . $member['website']['title'] . '" /></a>' : '', '</td>';

      // ICQ?
      if (!isset($context['disabled_fields']['icq']))
         echo '
         <td class="windowbg2">', $member['icq']['link'], '</td>';

      // AIM?
      if (!isset($context['disabled_fields']['aim']))
         echo '
         <td class="windowbg2">', $member['aim']['link'], '</td>';

      // YIM?
      if (!isset($context['disabled_fields']['yim']))
         echo '
         <td class="windowbg2">', $member['yim']['link'], '</td>';

      // MSN?
      if (!isset($context['disabled_fields']['msn']))
         echo '
         <td class="windowbg2">', $member['msn']['link'], '</td>';

      // Group and date.
      echo '
         <td class="windowbg" align="left">', empty($member['group']) ? $member['post_group'] : $member['group'], '</td>
         <td class="windowbg" align="left">', $member['registered_date'], '</td>';

      if (!isset($context['disabled_fields']['posts']))
         echo '
         <td class="windowbg2" width="15">', $member['posts'], '</td>
         <td class="windowbg" width="100" align="left">
            ', $member['posts'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $member['post_percent'] . '" height="15" alt="" />' : '', '
         </td>';

      echo '
      </tr>';
      }
   }
   // No members?
   else
      echo '
      <tr>
         <td colspan="', $context['colspan'], '" class="windowbg">', $txt['search_no_results'], '</td>
      </tr>';

   // Show the page numbers again. (makes 'em easier to find!)
   echo '
      <tr>
         <td class="titlebg" colspan="', $context['colspan'], '">', $txt['pages'], ': ', $context['page_index'], '</td>
      </tr>
   </table>';

   // If it is displaying the result of a search show a "search again" link to edit their criteria.
   if (isset($context['old_search']))
      echo '
         <br />
            <a href="', $scripturl, '?action=mlist;sa=search;search=', $context['old_search_value'], '">', $txt['mlist_search_again'], '</a>';
}

// A page allowing people to search the member list.
function template_search()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Start the submission form for the search!
   echo '
      <form action="', $scripturl, '?action=mlist;sa=search" method="post" accept-charset="', $context['character_set'], '">';

   // Display that link tree...
   echo '
      <div style="padding: 3px;">', theme_linktree(), '</div>';

   // Display links to view all/search.
   if (!empty($settings['use_tabs']))
   {
      echo '
      <table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
         <tr>
            <td class="mirrortab_first">&nbsp;</td>';

      foreach ($context['sort_links'] as $link)
      {
         if ($link['selected'])
            echo '
            <td class="mirrortab_active_first">&nbsp;</td>
            <td valign="top" class="mirrortab_active_back">
               <a href="' . $scripturl . '?action=mlist' . (!empty($link['action']) ? ';sa=' . $link['action'] : '') . '">', $link['label'], '</a>
            </td>
            <td class="mirrortab_active_last">&nbsp;</td>';
         else
            echo '
            <td valign="top" class="mirrortab_back">
               <a href="' . $scripturl . '?action=mlist' . (!empty($link['action']) ? ';sa=' . $link['action'] : '') . '">', $link['label'], '</a>
            </td>';
      }

      echo '
            <td class="mirrortab_last">&nbsp;</td>
         </tr>
      </table>
      <div class="tborder">';
   }
   else
   {
      echo '
      <div class="bordercolor" style="padding: 1px;">
         <div class="titlebg" style="padding: 4px 4px 4px 10px;">';
            $links = array();
            foreach ($context['sort_links'] as $link)
               $links[] = ($link['selected'] ? '<img src="' . $settings['images_url'] . '/selected.gif" alt="&gt;" /> ' : '') . '<a href="' . $scripturl . '?action=mlist' . (!empty($link['action']) ? ';sa=' . $link['action'] : '') . '">' . $link['label'] . '</a>';

            echo '
               ', implode(' | ', $links), '
         </div>
      </div>
      <div class="bordercolor" style="padding: 1px">';
   }

   // Display the input boxes for the form.
   echo '

      <div class="windowbg" align="center" style="padding-bottom: 1ex;">
         <table width="440" border="0" cellpadding="0" cellspacing="0">
            <tr>
               <td colspan="2" align="left">
                  <br />
                  <b>', $txt['search_for'], ':</b> <input type="text" name="search" value="', $context['old_search'], '" size="35" /> <input type="submit" name="submit" value="' . $txt['search'] . '" style="margin-left: 20px;" /><br />
                  <br />
               </td>
            </tr>
            <tr>
               <td align="left">';

   $count = 0;
   foreach ($context['search_fields'] as $id => $title)
   {
      echo '
               <label for="fields-', $id, '"><input type="checkbox" name="fields[]" id="fields-', $id, '" value="', $id, '" ', in_array($id, $context['search_defaults']) ? 'checked="checked"' : '', ' class="check" /> ', $title, '</label><br />';

      // Half way through?
      if (round(count($context['search_fields']) / 2) == ++$count)
         echo '

               </td>
               <td align="left" valign="top">';
   }
   echo '
      </td>
            </tr>
         </table>
      </div>
   </div>
</form>';
}

Código: [Seleccione]
// This custom Dynamic_Memberlist  template replaces the standard SMF template.
// The following section is the separate page for the search function.

function template_search()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Start the submission form for the search!
   echo '
      <form action="', $scripturl, '?action=mlist;sa=search" method="post" accept-charset="', $context['character_set'], '">';

   // Display that link tree...
   echo '
      <div style="padding: 3px;">', theme_linktree(), '</div>';

   // Display links to view all/search.
   if (!empty($settings['use_tabs']))
   {
      echo '
      <table cellpadding="3" cellspacing="0" border="0" style="margin-top: 10px;">
         <tr>';

      foreach ($context['sort_links'] as $link)
      {
         if ($link['selected'])
            echo '
                <td valign="top" width="212" align="left" class="underline">
                   <a href="' . $scripturl . '?action=mlist' . (!empty($link['action']) ? ';sa=' . $link['action'] : '') . '"><strong>', $link['label'], '</strong></a>
                </td>';
         else
            echo '
                <td valign="top" width="212" align="left" class="underline">
                   <a href="' . $scripturl . '?action=mlist' . (!empty($link['action']) ? ';sa=' . $link['action'] : '') . '"><strong>', $link['label'], '</strong></a>
                </td>';
      }

      echo '
             </tr>
          </table>
   <div class="tborder">';
   }

   // Display the input boxes for the form.
       echo '
   
      <div class="titlebg2" align="center" style="padding-bottom: 1ex;">
         <table width="440" border="0" cellpadding="0" cellspacing="0">
            <tr>
               <td colspan="2" align="left">
                  <br />
                  <b>', $txt['search_for'], ':</b> <input type="text" name="search" value="', $context['old_search'], '" size="35" /> <input type="submit" name="submit" value="' . $txt['search'] . '" style="margin-left: 20px;" /><br />
                  <br />
               </td>
            </tr>
            <tr>
               <td align="left">';

   $count = 0;
   foreach ($context['search_fields'] as $id => $title)
   {
      echo '
               <label for="fields-', $id, '"><input type="checkbox" name="fields[]" id="fields-', $id, '" value="', $id, '" ', in_array($id, $context['search_defaults']) ? 'checked="checked"' : '', ' class="check" /> ', $title, '</label><br />';

   // Half way through?
      if (round(count($context['search_fields']) / 2) == ++$count)
         echo '

               </td>
               <td align="left" valign="top">';
   }
       echo '
                  </td>
            </tr>
         </table>
      </div>
   </div>
</form>';
}

// This next section is the main memberlist.
   
function template_main()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '
      <div id="mlist_wrapper" align="center">
         <table class="mlist_table" border="0" cellpadding="4" cellspacing="0">
            <tr>';

      foreach ($context['sort_links'] as $link)
      {
         if ($link['selected'])
            echo '
            <td valign="top" colspan="2" width="18%" class="underline" align="left">
               <a href="' . $scripturl . '?action=mlist' . (!empty($link['action']) ? ';sa=' . $link['action'] : '') . '"><strong>', $link['label'], '</strong></a>
            </td>';
         else
            echo '
            <td valign="top" colspan="2" width="18%" class="underline" align="left">
               <a href="' . $scripturl . '?action=mlist' . (!empty($link['action']) ? ';sa=' . $link['action'] : '') . '"><strong>', $link['label'], '</strong></a>
            </td>';
      }

      echo '   
                <td colspan="8">&nbsp;</td>     
         </tr>';

   // Display page numbers and the a-z links for sorting by name if not a result of a search.
   if (!isset($context['old_search']))
      echo '
           
         <tr class="tborder">
            <td  class="catbg3" colspan="5" align="left">&nbsp;&nbsp;', $txt['pages'], ': ', $context['page_index'], '</td>
            <td  class="catbg3" colspan="7" align="right">', $context['letter_links'] . '&nbsp;&nbsp;</td>
         </tr>';
         
   // If this is a result of a search then just show the page numbers.
   else
      echo '
          <tr class="tborder">
            <td class="catbg3" colspan="12" align="left">&nbsp;&nbsp;', $txt['pages'], ': ', $context['page_index'],'</td>
         </tr>';
         
      echo'               
          <tr align="center" class="titlebg2 tborder">';

   // Display each of the column headers of the table.
   foreach ($context['columns'] as $column)
   {
      // We're not able (through the template) to sort the search results right now...
      if (isset($context['old_search']))
         echo '
             <td>&nbsp;</td>';
           
      // This is a selected column, so underline it or some such.
      elseif ($column['selected'])
         echo '
             <td><a href="' . $column['href'] . '" rel="nofollow">' . $column['label'] . ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" /></a></td>';
           
      // This is just some column... show the link and be done with it.
      else
         echo '
             <td>', $column['link'], '</td>';
   }
   
   echo '
          </tr>
          <tr>
             <td colspan="12">';         
         
    // This <td> cell contains the individual member blocks.
   // The relevant css classes are at the end of default/style.css
   
      foreach ($context['members'] as $member)
        {                       
            echo '
             <ul>
                <li class="mlist_blocks" >
                <ul>';
   // Box header containing the usename and current status.
         echo'
                  <li class="mlist_header">',$member['link'] , '       
                  </li>                 
                  <li class="mlist_avatar">';
   // The avatar
      if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($member['avatar']['image']))
          echo '
                   <a href="'.$scripturl.'?action=profile;u='.$member['id'].'" title="View the profile of ', $member['name'],' " >', $member['avatar']['image'], '</a>';
         echo'     
                   </li>               
                   <li class="smalltext mlist_group" >';
      if   ($context['can_send_pm'] )     
         echo '     
                   <a href="' . $member['online']['href'] . '" title="' . $member['online']['text'] . ' | ',$txt['pm_menu_send'] ,' "><img src="' . $member['online']['image_href'] . '" alt="' . $member['online']['text'] . '" /></a>&nbsp;';
   // Show the member's primary group (like 'Administrator') if they have one.
       if (isset($member['group']) && $member['group'] != '')
         echo '
                  <strong>', $member['group'], '</strong>';                 
   // Show the member's gender icon?
       if ($member['gender']['image'] != '' && !isset($context['disabled_fields']['gender']))
         echo '
                  &nbsp;', $member['gender']['image'], '';
         echo '         
                  </li>               
                   <li class="smalltext mlist_details" >';
   // Number of posts and date registered on two separate lines
         echo '
                    <strong>', $txt['posts_made'] ,':&nbsp;', $member['posts'], '</strong><br />
                    <strong>',$txt['joined'] ,':&nbsp;', $member['registered_date'], '</strong>
                  </li>
                  <li class="mlist_icons" >';
   /// Don't show the email address if they want it hidden.
      if (in_array($member['show_email'], array('yes', 'yes_permission_override', 'no_through_forum')))
         echo '
                    ', $member['show_email'] == 'no' ? '' : '<a href="' . $scripturl . '?action=emailuser;sa=email;uid=' . $member['id'] . '" rel="nofollow"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt['email'] . '" title="' . $txt['email'] . ' ' . $member['name'] . '" /></a>', '';
   // Website, if any.
      if ($member['website']['url'] != '' && !isset($context['disabled_fields']['website']))
         echo '
                    ', $member['website']['url'] != '' ? '<a href="' . $member['website']['url'] . '" target="_blank" class="new_win"><img src="' . $settings['images_url'] . '/www.gif" alt="' . $member['website']['title'] . '" title="' . $member['website']['title'] . '" /></a>' : '', '';
   // ICQ?
      if (!isset($context['disabled_fields']['icq']))
         echo '
                     ', $member['icq']['link'], '';
   // AIM?
      if (!isset($context['disabled_fields']['aim']))
         echo '
                     ', $member['aim']['link'], '';
   // YIM?
      if (!isset($context['disabled_fields']['yim']))
         echo '
                     ', $member['yim']['link'], '';
   // MSN?
      if (!isset($context['disabled_fields']['msn']))
         echo '
                     ', $member['msn']['link'], '';           
         echo'
                  </li>
               </ul>
               </li>
            </ul>';           
      }   
         
      echo '   
             </td>
          </tr>';
           
      // Display page numbers again.
      if (!isset($context['old_search']))
         echo '
          <tr>   
            <td class="catbg3" colspan="12" align="left">&nbsp;&nbsp;', $txt['pages'], ': ', $context['page_index'], '</td>
          </tr>';     
      echo '
         </table>               
      </div>';

      // Display that link tree...
   echo '
      <div style="padding: 3px;">', theme_linktree(), '</div>';           
}



Modifications.portuguese_pt.php

Código: [Seleccione]
// Important! Before editing these language files please read the text at the top of index.english.php.
Código: [Seleccione]
$txt['joined'] = 'Registado';

$txt['last_active'] = 'Última actividade';

$txt['name'] = 'Nome';

style.css

Código: [Seleccione]
/* hovered auto suggest item */
.auto_suggest_item_hover
{
   background: url(images/autosuggest_back.gif) repeat-x;
   background-color: #7897B4;
   padding: 2px;
   cursor: pointer;
   color: white;
}

Código: [Seleccione]
/* Custom classes for the Dynamic Memberlist mod */
.mlist_table
{
    width: 100%;
    max-width: 1193px;   
   margin-top: 10px;   
}
.mlist_table a:link, .mlist_table a:visited
{
    text-decoration: none;
}
.mlist_table a:hover
{
    text-decoration: blink;
}
.underline a:hover
{
    text-decoration: underline;
}
.mlist_blocks
{
    background: url(images/memberlist_bg.png) center center no-repeat;
   width: 169px;
   height: 280px;
   float: left;
   text-align: center;
   padding: 6px 0 0 0;
}
.mlist_header
{
    height: 21px;
   max-width: 145px;
   background: none;
    padding: 13px 0 0 0;   
   margin: 0 13px 0 13px;
   font-weight: bold;
   overflow: hidden;
}
.mlist_avatar
{
    height: 150px;
   width: 125px;
   margin: 6px 22px 7px 22px;
   overflow: hidden;
}
.mlist_group
{
    width: 139px;
   margin: 0 15px 0 15px;   
   overflow: hidden;
   height: 17px;
}
.mlist_details, .mlist_icons
{
    width: 125px;
   margin: 0 22px 3px 22px;
}