Bueno comenzemos con la instalación del mod de fuente...
ejecutan esta consulta sql en su phpmyadmin...
ALTER TABLE `p_posts` ADD `p_fuente` VARCHAR( 255 ) NOT NULL
abren m.agregar_form.tpl (themes/default/templates/modules)
buscar:
<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>
agregar debajo:
<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</b> La información del post es de mi autoría, no utilicé contenido de terceros.
</li>
abrir c.post.php (inc/class)
buscar:
$postData['private'] = empty($_POST['privado']) ? 0 : 1;
agregar debajo:
$postData['fuente'] = isset($_POST['font']) ? 'author' : $tsCore->setSecure($_POST['fuente']);
buscar:
if(mysql_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:
if(mysql_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'] == 1 || $tsUser->permisos['gorpap'] == true) ? ''3'' : ''0'').',''.$postData['fuente'].'')')) {
vuelve a buscar más abajo:
$postData['private'] = empty($_POST['privado']) ? 0 : 1;
y agrega debajo:
$postData['fuente'] = isset($_POST['font']) ? 'author' : $tsCore->setSecure($_POST['fuente']);
ahora busca:
if(mysql_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 die(mysql_error())) {
reemplazalo por:
if(mysql_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 die(mysql_error())) {
abrir m.post_metadata.tpl (themes/default/templates/modules)
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}
agregar debajo:
<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ía propia{/if}
saludos!