¡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 Fuente al agregar post (Act 1.3 Default, V5 y V6)
#1

3
Mejor respuesta del mensaje Fuente al agregar post (Act 1.3 Default, V5 y V6)Default

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




V5


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




V6
 
[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
ALTER TABLE `p_posts` ADD `p_fuente` VARCHAR( 255 ) NOT NULL


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

Buscar:
$postData['private'] = empty($_POST['privado']) ? 1


Debajo agregar:
$postData['fuente'] = isset($_POST['font']) ? 'author' $tsCore->setSecure($_POST['fuente']); 


Buscar:
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 (\''.$postData['portada'].'\', \''.$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'] == || $tsUser->permisos['gorpap'] == true) ? '\'3\'' '\'0\'').')')) { 


Reemplazar por:
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, p_fuente) 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'] == || $tsUser->permisos['gorpap'] == true) ? '\'3\'' '\'0\'').',\''.$postData['fuente'].'\')')) { 


Añadido:
p_fuente 

',\''.$postData['fuente'].'\ 


Buscar:
$postData['private'] = empty($_POST['privado']) ? 1


Debajo agregar:
$postData['fuente'] = isset($_POST['font']) ? 'author' $tsCore->setSecure($_POST['fuente']); 


Buscar:
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:
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'].'\', p_fuente = \''.$postData['fuente'].'\' WHERE post_id = \''.(int)$post_id.'\'') or exit( show_error('Error al ejecutar la consulta de la línea '.__LINE__.' de '.__FILE__.'.''db') )) { 


Añadido:
p_fuente = \''.$postData['fuente'].'\' 


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

Buscar:

Default
<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 comasque describa el contenidoEjemplo: <b>golinglesesCopa OrofutbolChicharitoM&eacute;xico</b>
                                    </
li


Debajo agregar:
<li>
                                    <
label>Fuente</label>
                                    <
span style="display: none;" class="errormsg"></span>
                                    <
input type="text" tabindex="4" name="fuente" maxlength="250" class="text-inp required" value="URL de la fuente..."/>
                                    <
input type="checkbox" name="font" checked="checked"><b>Contenido Propio</bLa informaci&oacute;n del post es de mi autor&iacute;ano utilic&eacutecontenido de terceros.
                                    </
li


V5
<li>
                    <
a name="post"></a>
                    <
div class="titular">
                    <
h2 style="background: #eee;">Contenido del Post</h2>
                    </
div>
                    <
span style="display: none;" class="errormsg"></span>
                    <
textarea id="markItUp" name="cuerpo" tabindex="2" style="min-height:300px;" class="required">{$tsDraft.b_body}</textarea>
                    <
div class="imotin">
                        {include 
file='modules/m.global_emoticons.tpl'}
                    </
div>
                </
li


Debajo agregar:
<li>
                    <
div class="titular">
                    <
h2 style="background: #eee;">Fuente</h2>
                    </
div>
                    <
span style="display: none;" class="errormsg"></span>
                    <
input type="text" tabindex="4" name="fuente" maxlength="250" class="text-inp required" value="URL de la fuente..."/>
                    <
b style="margin-left: 5px;"><input type="checkbox" name="font" checked="checked"><b>Contenido Propio</bLa informaci&oacute;n del post es de mi autor&iacute;ano utilic&eacutecontenido de terceros.</p>    
                </
li


V6
<li class="special-right clearbeta">
                <label><span></span>Categor&iacute;a</label>
                <span style="display: none;" class="errormsg"></span>
                <select class="incube required" tabindex="3" name="categoria">
                    <option value="" selected="selected">Seleccionar categor&iacute;a</option>
                    {foreach from=$tsConfig.categorias item=c}
                        <option value="{$c.cid}" {if $tsDraft.b_category == $c.cid}selected="selected"{/if}>{$c.c_nombre}</option>
                    {/foreach}
                </select>                    
            </li>


Debajo agregar:
<li id="tagsfox">
                <label>Fuente</label>
                <span style="display: none;" class="errormsg"></span>
                <input type="text" tabindex="4" name="fuente" maxlength="250" class="text-inp required" value="URL de la fuente..." style="width: 298px;"/>
                <p><input type="checkbox" name="font" checked="checked"><b style="margin-left: 5px;">Contenido Propio</b> La informaci&oacute;n del post es de mi autor&iacute;a, no utilic&eacute; contenido de terceros.</p>                                
            </li>


Default

m.post_metadata.tpl --> themes --> default --> templates --> modules --> m.post_metadata.tpl

Buscar:
{foreach from=$tsPost.post_tags key=i item=tag}
                                <
a rel="tag" href="{$tsConfig.url}/buscador/?q={$tag|seo}&e=tags">{$tag}</a> {if $i $tsPost.n_tags}-{/if}
                                {/foreach} 


Debajo agregar:
<br /><br /><span class="icons tags_title">Fuente:</span>
                                {if 
$tsPost.p_fuente!='author' && $tsPost.p_fuente}<a rel="tag" href="{$tsPost.p_fuente}">{$tsPost.p_fuente}</a>{else}Este post es de autor&iacute;a propia{/if} 


V5

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

Arriba de:
<div class="tagbox">


Agregar:
<div class="fuente">
    <
div class="titular"><h2>Fuente</h2></div>
    <
b>{if $tsPost.p_fuente!='author' && $tsPost.p_fuente}<a rel="tag" href="{$tsPost.p_fuente}">{$tsPost.p_fuente}</a>{else}Este post es de autor&iacute;a propia{/if}</b>
</
div


themes --> default --> taringa.css

Buscar:
.tagbox {
    padding: 10px;
}


Cambiar por:
.tagbox, .fuente {
    padding: 10px;
}


V6

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

Arriba de:
{/if}
{include 
file='modules/m.posts_tags.tpl'


Agregar:
<fieldset style="margin-top: 15px;padding: 10px;border-radius: 2px;opacity: 0.8;border: none;margin-bottom: 20px;color: #fff;background-image: linear-gradient(to top, #1a1b1f, #212528);text-align: center;">
<
legend style="margin-left: 1.2em;  border: 1px #222 solid;background: #2f2f2f;width: 120px;font-weight: bold;padding: 2px 6px;margin-top: 10px;color: #fff;border-top-left-radius: 50% 25%;border-top-right-radius: 50% 25%;display: inline-block;text-align: center;font-size: 14px;background-image: linear-gradient(to top, #1a1b1f, #212528);"><class="fas fa-external-link-alt" aria-hidden="true" style="color: #25c2f5;"></i>  Fuente</legend>
{if 
$tsPost.p_fuente!='author' && $tsPost.p_fuente}<a rel="tag" href="{$tsPost.p_fuente}">{$tsPost.p_fuente}</a>{else}Este post es de autor&iacute;a propia{/if}
</
fieldset






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


Compartir en:

Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)