Top Usuarios [Plugin y Modificacion]

SKIDROW Seguir

Beta
Verificación en dos pasos desactivada
Desde
5 Feb 2012
Mensajes
70
Hola compañeros.

Hoy estaba buscando algun plugin, algo como "Top Usuarios", encontre, pero era Gratis y sin opciones de modificar nada, solo Habilitar o Deshabilitar. Bueno, buscando y editando conseguí mas o menos lo que quería.

Plugin: Top X Active&Popular Users Stats

Este mod mostrara sus Usuarios con mas Puntos y con mas Posts
Puedes Activar y Desactivar mod Admincp->Settings->Options->Active Popular Stats



Como veis en la Imagen 2 - nuevo campo con los Users esta arriba de los foros, a mi personalmente no me gusta y lo deje asi



para ello, aceder a: Admincp->Plugins y Productos->Administrar Plugins-> - Buscamos "Producto: Top X Active&PopularUsers Stats" y accedemos a editar "forumhome_start"


Insertar CODE, HTML o PHP:
if ($vbulletin->options['hook_enable']){
         
         
        //Display the overall top posters
        $query = $vbulletin->db->query_read("
        SELECT userid, username, posts 
        FROM " . TABLE_PREFIX . "user 
        ORDER BY posts DESC
        LIMIT 0, [COLOR=#ff0000]5[/COLOR]
        ");


       while ($row = $vbulletin->db->fetch_array($query))
       {
          $allposters .="<a href=\"member.php?u=".$row['userid']."\">". $row['username'] ."</a> (".$row['posts'].")<br /> ";
       }
  
  
        //Display the most popular users
        $query = $vbulletin->db->query_read("
        SELECT userid, username, reputation 
        FROM " . TABLE_PREFIX . "user             
        ORDER BY reputation DESC
        LIMIT 0, [COLOR=#ff0000]5[/COLOR]
        ");


        while ($row = $vbulletin->db->fetch_array($query))
        {
          $popular .="<a href=\"member.php?u=".$row['userid']."\">". $row['username'] ."</a> (".$row['reputation'].") <br />";
        }
  
  
  
      //Pre register the variables for using them in our custom template
      $templater = vB_Template::create('forumhome_borbole_stats');
      $templater->register('allposters', $allposters);
      $templater->register('popular', $popular);
      
      $template_hook[forumhome_[COLOR=#0000ff]above[/COLOR]_forums] .= $templater->render();
}

los numeros "5" que estan en rojo, modifiques al numero deseado, es para que muestra cantidad de usuarios, por difecto solo 5

y "above" - aqui "[forumhome_above_forums]" lo cambias por "below" se cambia para que campo se muestra de bajo de forums, o sea, abajo no arriba

aqui os dejo el codigo completo, modificado

Insertar CODE, HTML o PHP:
if ($vbulletin->options['hook_enable']){
         
         
        //Display the overall top posters
        $query = $vbulletin->db->query_read("
        SELECT userid, username, posts 
        FROM " . TABLE_PREFIX . "user 
        ORDER BY posts DESC
        LIMIT 0, 10
        ");


       while ($row = $vbulletin->db->fetch_array($query))
       {
          $allposters .="<a href=\"member.php?u=".$row['userid']."\">". $row['username'] ."</a> (".$row['posts'].")<br /> ";
       }
  
  
        //Display the most popular users
        $query = $vbulletin->db->query_read("
        SELECT userid, username, reputation 
        FROM " . TABLE_PREFIX . "user             
        ORDER BY reputation DESC
        LIMIT 0, 10
        ");


        while ($row = $vbulletin->db->fetch_array($query))
        {
          $popular .="<a href=\"member.php?u=".$row['userid']."\">". $row['username'] ."</a> (".$row['reputation'].") <br />";
        }
  
  
  
      //Pre register the variables for using them in our custom template
      $templater = vB_Template::create('forumhome_borbole_stats');
      $templater->register('allposters', $allposters);
      $templater->register('popular', $popular);
      
      $template_hook[forumhome_below_forums] .= $templater->render();
}
 

¡Regístrate y comienza a ganar!

Beneficios

  • Gana dinero por participar
  • Gana dinero por recomendarnos
  • Descubre ofertas de empleo diariamente
  • Negocios seguros
  • ¡Información premium y más!

Acceder

¿Ya tienes una cuenta? Accede aquí

Arriba