¡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:
  • 2 voto(s) - 5 Media
  • 1
  • 2
  • 3
  • 4
  • 5

COMPLEMENTOS Calendario de Eventos + Próximos Eventos V2 (Act 1.3)
#1

6
Mejor respuesta del mensaje Calendario de Eventos + Próximos Eventos V2 (Act 1.3)Capturas
 
[img]Registrate o inicia tu sesión para ver este contenido[/img]
[img]Registrate o inicia tu sesión para ver este contenido[/img]
[img]Registrate o inicia tu sesión para ver este contenido[/img]




Ejecutar esta consulta
 
CREATE TABLE IF NOT EXISTS `e_eventos` (
`
eidint(11NOT NULL AUTO_INCREMENT,
`
e_userint(11NOT NULL,
`
e_titulovarchar(160NOT NULL,
`
e_cuerpotext NOT NULL,
`
e_diaint(2NOT NULL,
`
e_mesint(2NOT NULL,
`
e_yearint(4NOT NULL,
`
e_fechaint(11NOT NULL,
`
e_privadoint(1NOT NULL,
PRIMARY KEY (`eid`)
ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=
 
 
En c.afiliado.php --> inc --> class --> c.afiliado.php

Al final antes del último } agregar:
 
# Proximos eventos by Kmario19
function getEventos() {
global 
$tsUser;
$query db_exec(array(__FILE____LINE__), 'query''SELECT * FROM e_eventos ORDER BY e_year, e_mes, e_dia');
$data result_array($query);
// ZONA HORARIA
date_default_timezone_set("Europe/Madrid");
// TIEMPO
$dia date('j');
$mes date('n');
$year date('Y');
// SOLO LOS EVENTOS QUE VIENEN
$i 0;
foreach(
$data as $val) {
if(
$val['e_year'] > $year || ($val['e_year'] == $year && $val['e_mes'] > $mes) || ($val['e_year'] == $year && $val['e_mes'] == $mes && $val['e_dia'] >= $dia)) {
// ES PRIVADO?
if($val['e_privado'] == 1) {
$events[] = $data[$i];
}elseif(
$val['e_privado'] == && $val['e_user'] == $tsUser->uid) {
$events[] = $data[$i];
}
}
$i++;
// SOLO LOS ULTIMOS 10
if(count($events) == 10) break;
}
return array(
'data' => $events'dia' => $dia'mes' => $mes'year' => $year);



Nota: Cambiar la zona horaria
 
// ZONA HORARIA
date_default_timezone_set("Europe/Madrid"); 
 
 
Lista zona horaria
Mostrar Contenido
 
 
En posts.php --> inc --> php --> posts.php

Buscar:
 
// AFILIADOS
$smarty->assign("tsAfiliados",$tsAfiliado->getAfiliados()); 
 
 
Arriba agregar:
 
$smarty->assign("tsEventos",$tsAfiliado->getEventos()); 
 
 
En t.home.tpl --> themes --> default --> templates --> t.home.tpl

Buscar:
 
{include file='modules/m.home_afiliados.tpl'
 
 
Arriba agregar:
 
{include file='modules/m.home_eventos.tpl'
 
 
En head_menu.tpl --> themes --> default --> templates --> sections --> head_menu.tpl

Buscar:
 
<li class="tabbed {if $tsPage == 'fotos'}here{/if}" id="tabbedfotos">
<
a title="Ir a Fotos" onclick="menu('fotos', this.href); return false;" href="{$tsConfig.url}/fotos/">Fotos <img alt="Drop Down" src="{$tsConfig.tema.t_url}/images/arrowdown.png"></a>
</
li
 
 
Debajo agregar:
 
<li class="tabbed {if $tsPage == 'calendario'}here{/if}" id="tabbedcalendario">
<
a title="Ir al Calendario" onclick="menu('calendario', this.href); return false;" href="{$tsConfig.url}/calendario/">Calendario <img alt="Drop Down" src="{$tsConfig.tema.t_url}/images/arrowdown.png"></a>
</
li
 
 
Y subi esta carpeta
Nota: Editar el archivo calendario.php la zona horaria
 
#Se define zona horaria
date_default_timezone_set("Europe/Madrid"); 

 

Mega
Debes agradecer para ver el contenido...

Google Drive
Debes agradecer para ver el contenido...

Mediafire
Debes agradecer para ver el contenido...

Uptobox
Debes agradecer para ver el contenido...

4shared
Debes agradecer para ver el contenido...



Creditos: Debes agradecer para ver el contenido...
Responder
#2

1
Gracias
Responder
#3

1
Gracias
Responder


Compartir en:

Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)