01-25-2021, 01:39 PM
0
Captura
En c.posts.php --> inc --> class --> c.posts.php
Al final antes de la última } agregar:
En posts.php --> inc --> php --> posts.php
Buscar:
Debajo agregar:
En m.posts_metadata.tpl --> themes --> default --> templates --> modules --> m.posts_metadata.tpl
Buscar:
Reemplazar por:
Creditos: Debes agradecer para ver el contenido...
[img]Registrate o inicia tu sesión para ver este contenido[/img]
En c.posts.php --> inc --> class --> c.posts.php
Al final antes de la última } agregar:
Código PHP: ( Seleccionar Todo )
function getVoto(){
global $tsCore, $tsUser;
$post_id = intval($_GET['post_id']);
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT tid, cant FROM p_votos WHERE tid = \''.(int)$post_id.'\' AND tuser = \''.$tsUser->uid.'\' AND type = \'1\' LIMIT 1');
$data = db_exec('fetch_assoc', $query);
return $data['cant'];
}
En posts.php --> inc --> php --> posts.php
Buscar:
Código PHP: ( Seleccionar Todo )
// DATOS DEL RANGO DEL PUTEADOR
$smarty->assign("tsPunteador",$tsPosts->getPunteador());
Debajo agregar:
Código PHP: ( Seleccionar Todo )
// VOTOS DEL POSTS
$smarty->assign("tsVoto",$tsPosts->getVoto());
En m.posts_metadata.tpl --> themes --> default --> templates --> modules --> m.posts_metadata.tpl
Buscar:
Código PHP: ( Seleccionar Todo )
<span>Dar Puntos:</span>
{section name=puntos start=1 loop=$tsUser->info.user_puntosxdar+1 max=$tsPunteador.rango}
<a href="#" onclick="votar_post({$smarty.section.puntos.index}); return false;">{$smarty.section.puntos.index}</a> {if $smarty.section.puntos.index < $tsPunteador.rango}-{/if}
{/section}
{/if}
(de {$tsUser->info.user_puntosxdar} Disponibles)
Reemplazar por:
Código PHP: ( Seleccionar Todo )
{if $tsVoto==true}
<div class="votod">Ya diste {$tsVoto} Puntos en este Post</div>
{else}
<span>Dar Puntos:</span>
{section name=puntos start=1 loop=$tsUser->info.user_puntosxdar+1 max=$tsPunteador.rango}
<a href="#" onclick="votar_post({$smarty.section.puntos.index}); return false;">{$smarty.section.puntos.index}</a> {if $smarty.section.puntos.index < $tsPunteador.rango}-{/if}
{/section}
(de {$tsUser->info.user_puntosxdar} Disponibles)
{/if}
{/if}
Creditos: Debes agradecer para ver el contenido...


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