¡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 Ya votaste este post anteriormente (Act 1.3)
#1

0
Captura

[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:

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:

// DATOS DEL RANGO DEL PUTEADOR
$smarty->assign("tsPunteador",$tsPosts->getPunteador()); 


Debajo agregar:

// VOTOS DEL POSTS
$smarty->assign("tsVoto",$tsPosts->getVoto()); 


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

Buscar:

<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_puntosxdarDisponibles


Reemplazar por:

{if $tsVoto==true}
                            <
div class="votod">Ya diste {$tsVotoPuntos 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_puntosxdarDisponibles)
                                {/if}
                                {/if} 




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


Compartir en:

Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)