¡Bienvenido! ¿Aún no estás registrado?, deberás registrarte antes de poder usar el Chat, Comentar y Descargar en el Foro. Usa un email válido para la activación.
Calificación:
  • 0 voto(s) - 0 Media
  • 1
  • 2
  • 3
  • 4
  • 5

COMPLEMENTOS Usuarios Aleatorios
#1

1
Mejor respuesta del mensaje Usuarios AleatoriosCapturas
[img]Registrate o inicia tu sesión para ver este contenido[/img]
 
[img]Registrate o inicia tu sesión para ver este contenido[/img]


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

Al final antes del último } agregar:
 
// USUARIOS RANDOM
function Random(){
global 
$tsCore$tsUser;
$query db_exec(array(__FILE____LINE__), 'query''SELECT DISTINCT u.user_name, u.user_id, u.user_posts, f.f_id FROM u_miembros AS u LEFT JOIN u_perfil AS p ON u.user_id = p.user_id LEFT JOIN u_follows AS f ON u.user_id = f.f_id WHERE u.user_id != \''.$tsUser->uid.'\' ORDER BY RAND() LIMIT 4');
$data result_array($query);
return 
$data;


En LIMIT 4 pueden cambiar el valor 4 por el número de usuarios que quieran que aparezca


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

Buscar:
 
$smarty->assign("tsStats",$tsTops->getStats()); 


Debajo agregar:
 
// USUARIOS RANDOM
$smarty->assign("tsRandom",$tsPosts->Random()); 


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

Donde quieran que aparezca agregan:
 
{include file='modules/m.home_usuarios_random.tpl'


En estilos.css --> themes --> default --> estilos.css

Al final agregar:
 
.useraletor,.useraletori{float:left;padding:9px 0;text-align:center;background:#f8f8f8}.useralet{width:100%;position:relative;height:auto;display:-webkit-inline-box;margin-top:16px}.useraleto{width:18%;display:block;position:relative;float:left;border:3px solid #005fa3;bottom:4px}.useraletor{width:50%;font-family:cursive}.useraletori{width:37.8%;border-radius:0 0 5px;color:#eee} 


Y subir esta carpeta

Mega
Debes agradecer para ver el contenido...

Mediafire
Debes agradecer para ver el contenido...

4shared
Debes agradecer para ver el contenido...
Responder


Compartir en:

Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)