01-26-2021, 09:01 AM
3

[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]
[img]Registrate o inicia tu sesión para ver este contenido[/img]
Ejecutar estas consultas
Código PHP: ( Seleccionar Todo )
ALTER TABLE w_configuracion ADD url_iframe tinytext NOT NULL, ADD w_iframe int(3) NOT NULL, ADD h_iframe int(4) NOT NULL, ADD iframeon int(1) NOT NULL DEFAULT '0', ADD iframeoff int(1) NOT NULL DEFAULT '0';
Código PHP: ( Seleccionar Todo )
ALTER TABLE p_posts ADD post_iframe VARCHAR( 255 ) NOT NULL, ADD post_iframeoff int(1) NOT NULL DEFAULT '0';
En c.admin.php --> inc --> class --> c.admin.php
Buscar:
Código PHP: ( Seleccionar Todo )
'offline_message' => $tsCore->setSecure($tsCore->parseBadWords($_POST['offline_message'])),
Debajo agregar:
Código PHP: ( Seleccionar Todo )
'iframeoff' => empty($_POST['iframeoff']) ? 0 : 1,
'url_iframe' => $tsCore->setSecure($tsCore->parseBadWords($_POST['url_iframe'])),
'w_iframe' => $tsCore->setSecure($_POST['w_iframe']),
'h_iframe' => $tsCore->setSecure($_POST['h_iframe']),
'iframeon' => empty($_POST['iframeon']) ? 0 : 1,
Buscar:
Código PHP: ( Seleccionar Todo )
'\', `offline_message` = \'' . $c['offline_message'] .
Al lado agregar:
Código PHP: ( Seleccionar Todo )
'\', `iframeoff` = \'' . $c['iframeoff'] . '\', `url_iframe` = \'' . $c['url_iframe'] . '\', `w_iframe` = \'' . $c['w_iframe']. '\', `h_iframe` = \'' . $c['h_iframe'] . '\', `iframeon` = \'' . $c['iframeon'].
En c.posts.php --> inc --> class --> c.posts.php
Buscar 2 veces:
Código PHP: ( Seleccionar Todo )
$postData['private'] = empty($_POST['privado']) ? 0 : 1;
Debajo agregar:
Código PHP: ( Seleccionar Todo )
$postData['iframe'] = isset($_POST['url']) ? 'uif' : $tsCore->setSecure($_POST['iframe']);
$postData['iframeoff'] = empty($_POST['ifoff']) ? 0 : 1;
Buscar:
Código PHP: ( Seleccionar Todo )
if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `p_posts` (post_user, post_category, post_title, post_body, post_date, post_tags, post_ip, post_private, post_block_comments, post_sponsored, post_sticky, post_smileys, post_visitantes, post_status) VALUES (\''.$tsUser->uid.'\', \''.(int)$postData['category'].'\', \''.$postData['title'].'\', \''.$postData['body'].'\', \''.$postData['date'].'\', \''.$postData['tags'].'\', \''.$_SERVER['REMOTE_ADDR'].'\', \''.(int)$postData['private'].'\', \''.(int)$postData['block_comments'].'\', \''.(int)$postData['sponsored'].'\', \''.(int)$postData['sticky'].'\', \''.(int)$postData['smileys'].'\', \''.(int)$postData['visitantes'].'\', '.(!$tsUser->is_admod && ($tsCore->settings['c_desapprove_post'] == 1 || $tsUser->permisos['gorpap'] == true) ? '\'3\'' : '\'0\'').')')) {
Reemplazar por:
Código PHP: ( Seleccionar Todo )
if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `p_posts` (post_user, post_category, post_title, post_body, post_date, post_tags, post_iframe, post_ip, post_private, post_block_comments, post_iframeoff, post_sponsored, post_sticky, post_smileys, post_visitantes, post_status) VALUES (\''.$tsUser->uid.'\', \''.(int)$postData['category'].'\', \''.$postData['title'].'\', \''.$postData['body'].'\', \''.$postData['date'].'\', \''.$postData['tags'].'\', \''.$postData['iframe'].'\', \''.$_SERVER['REMOTE_ADDR'].'\', \''.(int)$postData['private'].'\', \''.(int)$postData['block_comments'].'\', \''.(int)$postData['iframeoff'].'\', \''.(int)$postData['sponsored'].'\', \''.(int)$postData['sticky'].'\', \''.(int)$postData['smileys'].'\', \''.(int)$postData['visitantes'].'\', '.(!$tsUser->is_admod && ($tsCore->settings['c_desapprove_post'] == 1 || $tsUser->permisos['gorpap'] == true) ? '\'3\'' : '\'0\'').')')) {
Agregado:
Código PHP: ( Seleccionar Todo )
post_iframe,
Código PHP: ( Seleccionar Todo )
post_iframeoff,
Código PHP: ( Seleccionar Todo )
, \''.$postData['iframe'].'\'
Código PHP: ( Seleccionar Todo )
, \''.(int)$postData['iframeoff'].'\'
Buscar:
Código PHP: ( Seleccionar Todo )
if(db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE p_posts SET post_title = \''.$postData['title'].'\', post_body = \''.$postData['body'].'\', post_tags = \''.$tsCore->setSecure($postData['tags']).'\', post_category = \''.(int)$postData['category'].'\', post_private = \''.$postData['private'].'\', post_block_comments = \''.$postData['block_comments'].'\', post_sponsored = \''.$postData['sponsored'].'\', post_smileys = \''.$postData['smileys'].'\', post_visitantes = \''.$postData['visitantes'].'\', post_sticky = \''.$postData['sticky'].'\' WHERE post_id = \''.(int)$post_id.'\'') or exit( show_error('Error al ejecutar la consulta de la línea '.__LINE__.' de '.__FILE__.'.', 'db') )) {
Reemplazar por:
Código PHP: ( Seleccionar Todo )
if(db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE p_posts SET post_title = \''.$postData['title'].'\', post_body = \''.$postData['body'].'\', post_tags = \''.$tsCore->setSecure($postData['tags']).'\', post_category = \''.(int)$postData['category'].'\', post_private = \''.$postData['private'].'\', post_block_comments = \''.$postData['block_comments'].'\', post_iframeoff = \''.$postData['iframeoff'].'\', post_sponsored = \''.$postData['sponsored'].'\', post_smileys = \''.$postData['smileys'].'\', post_visitantes = \''.$postData['visitantes'].'\', post_sticky = \''.$postData['sticky'].'\', post_iframe = \''.$postData['iframe'].'\' WHERE post_id = \''.(int)$post_id.'\'') or exit( show_error('Error al ejecutar la consulta de la línea '.__LINE__.' de '.__FILE__.'.', 'db') )) {
Agregado:
Código PHP: ( Seleccionar Todo )
, post_iframeoff = \''.$postData['iframeoff'].'\'
Código PHP: ( Seleccionar Todo )
, post_iframe = \''.$postData['iframe'].'\'
En m.agregar_form.tpl --> themes --> default --> templates --> modules --> m.agregar_form.tpl
Buscar:
Código PHP: ( Seleccionar Todo )
<li>
<label>Tags</label>
<span style="display: none;" class="errormsg"></span>
<input type="text" tabindex="4" name="tags" maxlength="128" class="text-inp required" value="{$tsDraft.b_tags}"/>
Una lista separada por comas, que describa el contenido. Ejemplo: <b>gol, ingleses, Copa Oro, futbol, Chicharito, México</b>
</li>
Debajo agregar:
Código PHP: ( Seleccionar Todo )
{if $tsConfig.iframeoff == 1 AND $tsUser->is_admod == 1}
{if $tsConfig.iframeon==0}
<li>
<label>Iframe</label>
<span style="display: none;" class="errormsg"></span>
<input type="text" tabindex="4" name="iframe" maxlength="250" class="text-inp required" value="{$tsDraft.b_iframe}"/>
<b>Link del Iframe</b> - Ingresa la URL del Iframe
</li>
{else}
{/if}
{/if}
Buscar:
Código PHP: ( Seleccionar Todo )
<div class="option clearbeta">
<input type="checkbox" tabindex="9" name="smileys" id="smileys" class="floatL" {if $tsDraft.b_smileys == 1}checked={/if}>
<p class="floatL">
<label for="smileys">Sin Smileys</label>
Si tu post no necesita smileys, desactívalos.
</p>
</div>
Debajo agregar:
Código PHP: ( Seleccionar Todo )
{if $tsUser->is_admod}
{if $tsConfig.iframeoff==1}
<div class="option clearbeta">
<input type="checkbox" tabindex="7" name="ifoff" id="ifoff" class="floatL" {if $tsDraft.b_iframeoff == 1}checked="checked"{/if}>
<p class="floatL">
<label for="seguidores">Desactivar Iframe</label>
Quitar Iframe de este posts
</p>
</div>
{/if}
{/if}
V5 y V6
Buscar:
Código PHP: ( Seleccionar Todo )
<li id="tagsfox">
<div class="titular">
<h2 style="background: #eee;">Tags</h2>
</div>
<span style="display: none;" id="tagerror" class="errormsg"></span>
<input id='tagnew' type="text" tabindex="4" name="tags" maxlength="128" class="text-inp required" value="{$tsDraft.b_tags}"/>
<p>Una lista separada por comas, que describa el contenido. Ejemplo: <b>Arte, Juegos, Noticias, Celulares, Linux, Deportes</b></p>
</li>
Debajo agregar:
Código PHP: ( Seleccionar Todo )
{if $tsConfig.iframeoff == 1 AND $tsUser->is_admod == 1}
{if $tsConfig.iframeon==0}
<li>
<label>Iframe</label>
<span style="display: none;" class="errormsg"></span>
<input type="text" tabindex="4" name="iframe" maxlength="250" class="text-inp required" value="{$tsDraft.b_iframe}" style="width: 870px;"/>
<b style="color: white;">Link del Iframe</b> <b style="color: white;">Ingresa la URL del Iframe</b>
</li>
{else}
{/if}
{/if}
En m.post_content.tpl --> themes --> default --> templates --> modules --> m.post_content.tpl
Default
Buscar:
Código PHP: ( Seleccionar Todo )
<span>
{$tsPost.post_body}
</span>
Debajo agregar:
Código PHP: ( Seleccionar Todo )
{if $tsConfig.iframeoff==1}
{if $tsPost.post_iframeoff==1}
{else}
{if $tsConfig.iframeon==1}
<center><iframe style="height: {$tsConfig.h_iframe}px; width: {$tsConfig.w_iframe}px;" src="{$tsConfig.url_iframe}" frameborder="0"></iframe></center>
{else}
<center><iframe style="height: {$tsConfig.h_iframe}px; width: {$tsConfig.w_iframe}px;" src="{$tsPost.post_iframe}" frameborder="0"></iframe></center>
{/if}
{/if}
{/if}
V5 y V6
Buscar:
Código PHP: ( Seleccionar Todo )
<div class="contenido">{$tsPost.post_body}</div>
Reemplazar por:
Código PHP: ( Seleccionar Todo )
<div class="contenido">{$tsPost.post_body}
<br>
{if $tsConfig.iframeoff==1}
{if $tsPost.post_iframeoff==1}
{else}
{if $tsConfig.iframeon==1}
<center><iframe style="height: {$tsConfig.h_iframe}px; width: {$tsConfig.w_iframe}px;" src="{$tsConfig.url_iframe}" frameborder="0"></iframe></center>
{else}
<center><iframe style="height: {$tsConfig.h_iframe}px; width: {$tsConfig.w_iframe}px;" src="{$tsPost.post_iframe}" frameborder="0"></iframe></center>
{/if}
{/if}
{/if}
</div>
En m.admin_configs.tpl --> themes --> default --> templates --> admin_mods --> m.admin_configs.tpl
Default y V5
Buscar:
Código PHP: ( Seleccionar Todo )
<dl>
<dt>
<label for="ai_offline">Modo mantenimiento:</label>
<br /><span>Esto hará al Sitio inaccesible a los usuarios. Si quiere, también puede introducir un breve mensaje (255 caracteres) para mostrar.</span></dt>
<dd>
<label>
<input name="offline" type="radio" id="ai_offline" value="1" {if $tsConfig.offline==1 }checked="checked" {/if} class="radio" /> Sí</label>
<label>
<input name="offline" type="radio" id="ai_offline" value="0" {if $tsConfig.offline !=1 }checked="checked" {/if} class="radio" /> No</label>
<br />
<input type="text" name="offline_message" id="ai_offline" value="{$tsConfig.offline_message}" />
</dd>
</dl>
Debajo agregar:
Código PHP: ( Seleccionar Todo )
<hr />
{if $tsUser->uid ==1}
<dl>
<dt><label for="iframeoff">Activar Iframes en los posts:</label><br /><span>Se activa el uso de Iframes en los posts</span></dt>
<dd>
<label><input name="iframeoff" type="radio" id="iframeoff" value="1" {if $tsConfig.iframeoff == 1}checked="checked"{/if} class="radio"/> Sí</label>
<label><input name="iframeoff" type="radio" id="iframeoff" value="0" {if $tsConfig.iframeoff != 1}checked="checked"{/if} class="radio"/> No</label>
</dd>
</dl>
{/if}
<dl>
<dt><label for="iframeon">Agregar Iframe en todos los Posts</label><br /><span>Con esto podras Agregar en todos los post un solo iframe, si dejas en <b>no</b> deberas ingresar la url dentro de los posts. Ingresa la url aqui:</span></dt>
<dd>
<label><input name="iframeon" type="radio" id="iframeon" value="1" {if $tsConfig.iframeon == 1}checked="checked"{/if} class="radio"/>Sí</label>
<label><input name="iframeon" type="radio" id="iframeon" value="0" {if $tsConfig.iframeon != 1}checked="checked"{/if} class="radio"/>No</label>
<br /><br /><br />
<input type="text" name="url_iframe" id="iframeon" value="{$tsConfig.url_iframe}" />
</dd>
</dl>
<dl>
<dt><label for="w_iframe">Ancho del Iframe</label><br /><span>Introduce el Ancho del Iframe en Porcentaje ( % )</span></dt>
<dd><input type="text" id="w_iframe" name="w_iframe" style="width:10%" maxlength="3" value="{$tsConfig.w_iframe}" /></dd>
</dl>
<dl>
<dt><label for="h_iframe">Altura del Iframe</label><br /><span>Introduce la Altura en Pixeles.</span></dt>
<dd><input type="text" id="h_iframe" name="h_iframe" style="width:10%" maxlength="4" value="{$tsConfig.h_iframe}" /></dd>
</dl>
<hr/>
V6
Buscar:
Código PHP: ( Seleccionar Todo )
<div class="boxblo">
<div class="desbox">
<label>Mensaje modo mantenimiento:</label>
<span class="foquito" onclick="mydialog.alert('Información','Puedes introducir un breve mensaje (255 caracteres)<br/> para mostrar a los usuarios durante el mantenimiento.')"></span>
</div>
<input type="text" name="offline_message" id="ai_offline" value="{$tsConfig.offline_message}" />
</div>
Debajo agregar:
Código PHP: ( Seleccionar Todo )
{if $tsUser->uid ==1}
<div class="boxblo">
<div class="desbox">
<label for="ai_sess_ip">Activar Iframes en los posts:</label>
<span class="foquito" onclick="mydialog.alert('Información','Se activa el uso de Iframes en los posts.')"></span>
</div>
<select name="sess_ip">
<option value="1" {if $tsConfig.iframeoff == 1}selected="selected"{/if}>Si</option>
<option value="0" {if $tsConfig.iframeoff != 1}selected="selected"{/if}>No</option>
</select>
</div>
{/if}
<div class="boxblo">
<div class="desbox">
<label for="ai_sess_ip">Iframe en todos los Posts:</label>
<span class="foquito" onclick="mydialog.alert('Información','Con esto podras Agregar en todos los post un solo iframe, si dejas en <b>no</b> deberas ingresar la url dentro de los posts.')"></span>
</div>
<select name="sess_ip">
<option value="1" {if $tsConfig.iframeon == 1}selected="selected"{/if}>Si</option>
<option value="0" {if $tsConfig.iframeon != 1}selected="selected"{/if}>No</option>
</select>
<div class="desbox">
<label for="ai_url">Ingresa la url aqui:</label>
</div>
<input type="text" name="url_iframe" id="iframeon" value="{$tsConfig.url_iframe}" /> <br>
<div class="desbox">
<label for="ai_max_com">Ancho del Iframe:</label>
<span class="foquito" onclick="mydialog.alert('Información','Introduce el Ancho del Iframe en Porcentaje ( % )')"></span>
</div>
<input type="text" id="w_iframe" name="w_iframe" style="width:10%" maxlength="3" value="{$tsConfig.w_iframe}" /><br>
<div class="desbox">
<label for="ai_max_com">Altura del Iframe:</label>
<span class="foquito" onclick="mydialog.alert('Información','Introduce la Altura en Pixeles')"></span>
</div>
<input type="text" id="h_iframe" name="h_iframe" style="width:10%" maxlength="4" value="{$tsConfig.h_iframe}" />
</div>
Creditos: Debes agradecer para ver el contenido...


Facebook
Twitter
Reddit
Digg
del.icio.us
Tumblr
Pinterest
Blogger
Fark
LinkedIn
Mix
Google