Phpost
COMPLEMENTOS Top Fotos en la Home (1.3) - Versión para impresión

+- Phpost (https://phpost.es)
+-- Foro: Risus 1.3 (https://phpost.es/forum-6.html)
+--- Foro: Complementos (https://phpost.es/forum-7.html)
+---- Foro: Complementos Terminados (https://phpost.es/forum-8.html)
+---- Tema: COMPLEMENTOS Top Fotos en la Home (1.3) (/thread-182.html)



Top Fotos en la Home (1.3) - Chctrpgo - 09-04-2021

Captura
[img]Registrate o inicia tu sesión para ver este contenido[/img]



En c.posts.php --> inc --> class --> c.posts.php

Al final antes de la última:     
 
Código PHP:

   
       
Agregar:
 
Código PHP:
/*getTopFotos*/
 
function getTopFotos(){
        global 
$tsCore;
        
//
        
$query db_exec(array(__FILE____LINE__), 'query''SELECT f.foto_id, f.f_title, f.f_date, f.f_description, f.f_url, f.f_user, f.f_votos_pos, f.f_votos_neg, f.f_status, u.user_id, u.user_name, u.user_rango, u.user_baneado, r.rango_id, r.r_name, r.r_color  FROM f_fotos AS f LEFT JOIN u_miembros AS u ON u.user_id = f.f_user LEFT JOIN u_rangos AS r ON r.rango_id = u.user_rango WHERE u.user_baneado = 0 ORDER BY f.f_votos_pos DESC LIMIT 5');
        if(!
$query) exit( show_error('Error al ejecutar la consulta de la línea '.__LINE__.' de '.__FILE__.'.''db') );
        
$data result_array($query);
        
//
        
return $data;

 
       
En posts.php --> inc --> php --> posts.php

Buscar:
 
Código PHP:
// DO <= PARA EL MENU
        
$smarty->assign("tsDo",$_GET['do']); 
    
 
Debajo agregar:
 
Código PHP:
// TOP  FOTOS
       
$smarty->assign("tsTopFotos",$tsPosts->getTopFotos()); 

       
En t.home.tpl --> themes --> default --> templates --> t.home.tpl

Buscar:            
 
Código PHP:
{include file='modules/m.home_stats.tpl'
    
       
Debajo agregar:
 
Código PHP:
{include file='modules/m.home_top_fotos.tpl'

       
En extras.css --> themes --> default --> extras.css

Al final agregar:        
 
Código PHP:
ul.topf li{display:block;border-bottom:1px solid #ccc;height:62px!important;color:#666}ul.topf li:hover{background:#eee}ul.topf li img{width:52px;height:52px;padding:1px;margin:5px;border:1px solid #ccc}ul.topf li img:hover{background:#fff;opacity:.7;border:1px solid #0cf}.titf{font-weight:600;position:absolute;float:left;margin:5px}.autfot{position:absolute;float:left;margin:-45px 0 0 72px} 
    
       
Y subir esta carpeta
       
Mega
http://Registrate o inicia tu sesión para ver este contenido

Google Drive
http://Registrate o inicia tu sesión para ver este contenido

Mediafire
http://Registrate o inicia tu sesión para ver este contenido

Uptobox
http://Registrate o inicia tu sesión para ver este contenido

4shared
http://Registrate o inicia tu sesión para ver este contenido

        
        
  
        
Creditos: Vellenger
Registrate o inicia tu sesión para ver este contenido