Phpost
COMPLEMENTOS Mensaje Temporal Administrable (Default, V5 y V6) - 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 Mensaje Temporal Administrable (Default, V5 y V6) (/thread-50.html)



Mensaje Temporal Administrable (Default, V5 y V6) - 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]

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



Ejecutar esta consulta

Código PHP:
ALTER TABLE w_configuracion ADD actnot int(1NOT NULL DEFAULT '0'ADD titlenot varchar(100NOT NULLADD infonot varchar(350NOT NULLADD timenot int(1NOT NULL DEFAULT '1'


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

Buscar:

Código PHP:
'offline_message' => $tsCore->setSecure($tsCore->parseBadWords($_POST['offline_message'])), 


Debajo agregar:

Código PHP:
'actnot' => empty($_POST['actnot']) ? 1,
            
'titlenot' => $tsCore->setSecure($tsCore->parseBadWords($_POST['titlenot'])),
            
'infonot' => $tsCore->setSecure($tsCore->parseBadWords($_POST['infonot'])),
            
'timenot' => $tsCore->setSecure($_POST['timenot']), 


Buscar:

Código PHP:
`offline_message` = \'' $c['offline_message'] . '\' 


Al lado agregar:

Código PHP:
, `actnot` = \'' $c['actnot'] . '\' , `titlenot` = \'' $c['titlenot'] . '\' , `infonot` = \'' $c['infonot'] . '\' , `timenot` = \'' $c['timenot'] . '\' 


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

Buscar:

Código PHP:
{include file='sections/main_footer.tpl'


Arriba agregar:

Código PHP:
{if $tsConfig.actnot == 1}
    <
div class="boxvell">
    <
span class="titlenot"><h2>{$tsConfig.titlenot}</h2></span>
    <
div style="margin:5px">{$tsConfig.infonot}</div>
    </
div>
    {/if} 


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

Buscar:

Default y V5

Código PHP:
<dl>
                <
dt>
                    <
label for="ai_chat">Chatango ID:</label>
                    <
br /><span>Por defecto puedes agregar un chat de <a href="Registrate o inicia tu sesión para ver este contenido">Chatango</apara tu websolo crea tu grupo he ingresa el nombre. (Dejar vac&iacute;o para usar xat)</span></dt>
                <
dd>
                    <
input type="text" id="ai_chat" name="chat" maxlength="20" value="{$tsConfig.chat_id}/> </dd>
            </
dl


Arriba agregar:

Código PHP:
<hr>
            <
dl
                <
dt><label for="actnot">Mensaje Temporal:</label><span>Este mensaje se mostrara de manera temporal.</span></dt>
                <
dd>
                    <
label><input name="actnot" type="radio" id="actnot" value="1" {if $tsConfig.actnot == 1}checked="checked"{/if} class="radio"/> S&iacute;</label>
                    <
label><input name="actnot" type="radio" id="actnot" value="0" {if $tsConfig.actnot != 1}checked="checked"{/if} class="radio"/> No</label>
                </
dd>
            </
dl>
            <
dl>
                <
dt><label for="timenot">Tiempo:</label> <span>Indique la cantidad de segundos que se mostrara el mensaje.(<b>0</bes permanente)</span></dt>
                <
dd><input type="text" onkeyup="var no_digito = /\D/g; this.value = this.value.replace(no_digito , '');" id="timenot" name="timenot" style="width:10%" maxlength="5" value="{$tsConfig.timenot}/> segundos.</dd>
            </
dl>
            <
dl>
                <
dt><label for="titlenot">T&iacute;tulo:</label><span>Indique el t&iacute;tulo del mensaje.</span></dt>
                <
dd><input type="text" maxlength="100" id="titlenot" name="titlenot" maxlength="20" value="{$tsConfig.titlenot}/> </dd>
            </
dl>
            <
dl>
                <
dt><label for="infonot">Contenido del Mensaje:</label><span>Ingresar el mensaje (max350 caracteres)</span></dt>
                <
dd><textarea style="width:300px;" maxlength="350" id="infonot" name="infonot">{$tsConfig.infonot}</textarea></dd>
            </
dl>
            <
hr


V6

Buscar:

Código PHP:
<div class="boxblo">
            <
div class="desbox">
                <
label for="ai_chat">Chatango ID:</label>
                <
span class="foquito" onclick="mydialog.alert('Informaci&oacute;n','Por defecto puedes agregar un chat de <b>Chatango</b> para tu sitio<br/> solo crea tu grupo he ingresa el nombre.')"></span>
            </
div>
            <
input type="text" id="ai_chat" name="chat" maxlength="20" value="{$tsConfig.chat_id}placeholder="Dejar vac&iacute;o para usar xat"/>
        </
div



Debajo agregar:

Código PHP:
<div class="boxblo">
            <
div class="desbox">
                <
label for="actnot">Mensaje Temporal:</label>
                <
span class="foquito" onclick="mydialog.alert('Este mensaje se mostrara de manera temporal.')"></span>
            </
div>
            <
select name="actnot">
                <
option value="1" {if $tsConfig.actnot == 1}selected="selected"{/if}>Si</option>
                <
option value="0" {if $tsConfig.actnot != 1}selected="selected"{/if}>No</option>
            </
select>                                        
        </
div>            
         <
div class="boxblo" style="border-top: none;">
            <
div class="desbox">
                <
label for="timenot">Tiempo:</label>
                <
span class="foquito" onclick="mydialog.alert('Indique la cantidad de segundos que se mostrara el mensaje.(<b>0</b> es permanente)')"></span>
            </
div>
            <
input type="text" onkeyup="var no_digito = /\D/g; this.value = this.value.replace(no_digito , '');" id="timenot" name="timenot" style="width:10%" maxlength="5" value="{$tsConfig.timenot}placeholder="segundos"/>
        </
div>        
        
         <
div class="boxblo" style="border-top: none;">
            <
div class="desbox">
                <
label for="titlenot">T&iacute;tulo:</label>
                <
span class="foquito" onclick="mydialog.alert('Indique el t&iacute;tulo del mensaje.')"></span>
            </
div>
            <
input type="text" maxlength="100" id="titlenot" name="titlenot" maxlength="20" value="{$tsConfig.titlenot}"/>
        </
div>        
         <
div class="boxblo" style="border-top: none;">
            <
div class="desbox">
                <
label for="infonot">Contenido del Mensaje:</label>
                <
span class="foquito" onclick="mydialog.alert('Ingresar el mensaje (max. 350 caracteres)')"></span>
            </
div>
            <
textarea maxlength="350" id="infonot" name="infonot">{$tsConfig.infonot}</textarea>
        </
div


En main_header.tpl --> themes --> default --> templates --> sections --> main_header.tpl

Buscar:

Código PHP:
</head


Arriba agregar:

Código PHP:
{if $tsConfig.actnot == 1}
    <
script type="text/javascript">
    {
literal}
    
setTimeout(function(){$('.boxvell').fadeOut('fast')},{/literal}({if $tsConfig.timenot==0}10000{else}{$tsConfig.timenot}{/if}*1000){literal});  //30000 = 30 segundos
    
{/literal}
    </
script>
    {/if} 


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

Al final agregar:

Código PHP:
.titlenot h2{font-size:14px;color:#f4ff74;text-decoration:underline}
.boxvell{position:fixed;bottom:0;right:200px;padding:10px;color:#fff;font-family:tahoma;font-size:11px;font-family:tahoma;font-size:11px;text-align:left;margin-bottom:17px;width:300px;background:url(Registrate o inicia tu sesión para ver este contenido 1px 1px rgba(0,0,0,.7);-moz-box-shadow:0 2px 7px rgba(0,0,0,.3);-webkit-box-shadow:0 2px 7px rgba(0,0,0,.3);box-shadow:0 2px 7px rgba(0,0,0,.3)} 



Creditos: Vellenger