09-29-2021, 02:30 PM
Captura
En c.tops.php --> inc --> class --> c.tops.php
Buscar:
Arriba agregar:
En top.php --> inc --> php --> top.php
Buscar:
Debajo agregar:
En t.tops.tpl --> themes --> default --> templates --> t.tops.tpl
Buscar:
Debajo agregar:
En head_submenu.tpl --> themes --> default --> templates --> sections --> head_submenu.tpl
Buscar:
Debajo agregar:
Y subir esta carpeta
Mega
http://Registrate o inicia tu sesión par... contenido
Google Drive
http://Registrate o inicia tu sesión par... contenido
Mediafire
http://Registrate o inicia tu sesión par... contenido
Uptobox
http://Registrate o inicia tu sesión par... contenido
4shared
http://Registrate o inicia tu sesión par... contenido
Creditos: Nico
[img]Registrate o inicia tu sesión para ver este contenido[/img]
En c.tops.php --> inc --> class --> c.tops.php
Buscar:
Código PHP:
/*
getTopPosts()
*/
Arriba agregar:
Código PHP:
/*
getTopFotos()
*/
function getTopFotos($fecha, $desc){
//
$data = $this->setTime($fecha);
$desc = empty($desc) ? '' : 'AND f_description = '.$desc;
// VOTOS POSITIVOS
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT SUM(f.f_votos_pos) AS total, u.user_id, u.user_name, f_url, f_user, f_votos_pos, f_title, foto_id FROM f_fotos AS f LEFT JOIN u_miembros AS u ON f.f_user = u.user_id WHERE f.f_status = 0 AND f.f_date BETWEEN '.$data['start'].' AND '.$data['end'].' '.$desc.' GROUP BY f.f_user ORDER BY total DESC LIMIT 10');
$array['votos_pos'] = result_array($query);
// VOTOS NEGATIVOS
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT SUM(f.f_votos_neg) AS total, u.user_id, u.user_name, f_url, f_user, f_votos_neg, f_title, foto_id FROM f_fotos AS f LEFT JOIN u_miembros AS u ON f.f_user = u.user_id WHERE f.f_status = 0 AND f.f_date BETWEEN '.$data['start'].' AND '.$data['end'].' '.$desc.' GROUP BY f.f_user ORDER BY total DESC LIMIT 10');
$array['votos_neg'] = result_array($query);
// VISITAS
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT SUM(f_visitas) AS total, u.user_id, u.user_name, f_url, f_user, f_visitas, f_title, foto_id FROM f_fotos AS f LEFT JOIN u_miembros AS u ON f.f_user = u.user_id WHERE f.f_status = 0 AND f.f_date BETWEEN '.$data['start'].' AND '.$data['end'].' '.$desc.' GROUP BY f.f_user ORDER BY total DESC LIMIT 10');
$array['visitas'] = result_array($query);
// MEDALLAS
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT COUNT(m.medal_for) AS total, u.user_id, u.user_name, f_url, f_user, f_title, foto_id, wm.medal_id FROM w_medallas_assign AS m LEFT JOIN f_fotos AS f ON m.medal_for = f.foto_id LEFT JOIN u_miembros AS u ON f.f_user = u.user_id LEFT JOIN w_medallas AS wm ON wm.medal_id = m.medal_id WHERE wm.m_type = \'3\' AND m.medal_date BETWEEN '.$data['start'].' AND '.$data['end'].' GROUP BY m.medal_for ORDER BY total DESC LIMIT 10');
$array['medallas'] = result_array($query);
//
return $array;
}
En top.php --> inc --> php --> top.php
Buscar:
Código PHP:
case 'usuarios':
$smarty->assign("tsTops",$tsTops->getTopUsers($fecha, $cat));
break;
Debajo agregar:
Código PHP:
case 'fotos':
$smarty->assign("tsTops",$tsTops->getTopFotos($fecha, $desc));
break;
En t.tops.tpl --> themes --> default --> templates --> t.tops.tpl
Buscar:
Código PHP:
{elseif $tsAction == 'usuarios'}
{include file='modules/m.top_users.tpl'}
Debajo agregar:
Código PHP:
{elseif $tsAction == 'fotos'}
{include file='modules/m.top_fotos.tpl'}
En head_submenu.tpl --> themes --> default --> templates --> sections --> head_submenu.tpl
Buscar:
Código PHP:
<li{if $tsAction == 'usuarios'} class="here"{/if}><a href="{$tsConfig.url}/top/usuarios/">Usuarios</a></li>
Debajo agregar:
Código PHP:
<li{if $tsAction == 'fotos'} class="here"{/if}><a href="{$tsConfig.url}/top/fotos/">Fotos</a></li>
Y subir esta carpeta
Mega
http://Registrate o inicia tu sesión par... contenido
Google Drive
http://Registrate o inicia tu sesión par... contenido
Mediafire
http://Registrate o inicia tu sesión par... contenido
Uptobox
http://Registrate o inicia tu sesión par... contenido
4shared
http://Registrate o inicia tu sesión par... contenido
Creditos: Nico