Phpost
COMPLEMENTOS Mostrar/ocultar última conexión (Act 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 Mostrar/ocultar última conexión (Act 1.3) (/thread-18.html)



Mostrar/ocultar última conexión (Act 1.3) - Chctrpgo - 01-25-2021

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

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


¿Que tiene?

Ejecutar esta consulta

Código PHP:
ALTER TABLE  `u_perfilADD  `user_conexionINTNOT NULL DEFAULT  '1'


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

Buscar:

Código PHP:
'gopfd' => $_POST['global-pointsforday']); 


Arriba agregar:

Código PHP:
'gocon' => $_POST['global-conexion'], 


Buscar:

Código PHP:
'gopfd' => $_POST['global-pointsforday']); 


Arriba agregar:

Código PHP:
'gocon' => $_POST['global-conexion'], 


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

Buscar:

Código PHP:
'sexo' => ($_POST['sexo'] == 'f') ? 1


Arriba agregar:

Código PHP:
'conexion' => (int)($_POST['conexion'] ? 0), 


En m.admin_rangos.tpl --> themes --> default --> templates --> admin_mods --> m.admin_rangos.tpl

Buscar:

Código PHP:
<legend>Global</legend>
                                        <
input type="checkbox" id="godp" name="global-darpuntos" {if $tsRango.permisos.godp}checked{/if} /><label style="font-weight:bold;" for="godp">Puntuar Posts</label><label for="godp">   Podr&aacute;n puntuar posts.</label>
                                        <
br /><hr


Debajo agregar:

Código PHP:
<input type="checkbox" id="gocon" name="global-conexion" {if $tsRango.permisos.gocon}checked{/if} /><label style="font-weight:bold;" for="goved">Ocultar última conexión</label><label for="gocon">   Podr&aacute;n ocultar la última conexión a otros usuarios.</label>
                                        <
br /><hr


En m.cuenta_cuenta.tpl --> themes --> default --> templates --> modules --> m.cuenta_cuenta.tpl

Buscar:

Código PHP:
<div class="field">
                                        <
label>Sexo</label>
                                        <
ul class="fields">
                                            <
li>
                                                <
label><input type="radio" value="m" name="sexo" class="radio cuenta-save-1" {if $tsPerfil.user_sexo == '1'}checked="checked"{/if}/>Masculino</label>
                                            </
li>
                                            <
li>
                                                <
label><input type="radio" value="f" name="sexo" class="radio cuenta-save-1" {if $tsPerfil.user_sexo == '0'}checked="checked"{/if}/>Femenino</label>
                                            </
li>
                                        </
ul>
                                    </
div


Debajo agregar:

Código PHP:
{if $tsUser->permisos.suad || $tsUser->permisos.sumo || $tsUser->permisos.gocon || $tsUser->uid ==1}                
                                    <
div class="field">
                                        <
label>Mostrar última conexión:</label>
                                        <
ul class="fields">
                                            <
li>
                                                <
label><input type="radio" value="1" name="conexion" class="radio cuenta-save-1" {if $tsPerfil.user_conexion == '1'}checked="checked"{/if}/>Si</label>
                                            </
li>
                                            <
li>
                                                <
label><input type="radio" value="0" name="conexion" class="radio cuenta-save-1" {if $tsPerfil.user_conexion == '0'}checked="checked"{/if}/>No</label>
                                            </
li>
                                       </
ul>
                                   </
div>
                                   {/if} 


En p.perfil.info.tpl --> themes --> default --> templates --> t.php_files --> p.perfil.info.tpl

Buscar:

Código PHP:
<li><label>&Uacute;ltima vez activo</label><strong>{$tsPerfil.user_lastactive|fecha}</strong></li


Reemplazar por:

Código PHP:
<li><label>&Uacute;ltima vez activo</label><strong>  {if $tsPerfil.user_conexion}{$tsPerfil.user_lastactive|fecha}{else}Privado{/if}</strong></li




Creditos: aperpen