Phpost
COMPLEMENTOS Reacciones en Posts v1.0 - Versión para impresión

+- Phpost (https://phpost.es)
+-- Foro: Risus Nova 2.0 (https://phpost.es/forum-150.html)
+--- Foro: Complementos (https://phpost.es/forum-164.html)
+---- Foro: Terminados (https://phpost.es/forum-165.html)
+---- Tema: COMPLEMENTOS Reacciones en Posts v1.0 (/thread-988.html)



Reacciones en Posts v1.0 - Tronlar - 05-28-2026

Reacciones en Posts v1.0
Nuevo módulo para Risus Nova 2.0 — PHPost


Capturas
[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]


Añade un sistema de reacciones con 6 emojis en cada post. Convive con el sistema de puntos existente — son completamente independientes. Un usuario puede dar puntos Y reaccionar al mismo post.


😊 Reacciones disponibles
   


⚡ Características
   


📋 Requisitos
   


🛠️ Instalación

Paso 1 — Ejecutar el instalador

Sube la carpeta install/ a la raíz y accede a:
 
Código:
Registrate o inicia tu sesión para ver este contenido

Pulsa Instalar ahora. Crea la tabla p_reacciones.

⚠️ Elimina la carpeta install/ cuando termine.


Paso 2 — Subir los archivos
 
Código:
inc/class/c.reacciones.php                          →  inc/class/
inc/php/ajax/ajax.reacciones.php                    →  inc/php/ajax/
themes/default/templates/modules/m.reacciones.tpl  →  themes/default/templates/modules/

Paso 3 — En posts.php

Busca en inc/php/posts.php la línea:

 
Código:
$smarty->assign("tsPost",$tsPost);

Añade justo después:
 
Código:
// ── Reacciones ──
require_once TS_CLASS . 'c.reacciones.php';
$tsReac = new tsReacciones();
$smarty->assign('tsReacciones', $tsReac->getReacciones($tsPost['post_id']));
// ────────────────

Paso 4 — Añadir en m.posts_metadata.tpl

Busca el bloque de estadísticas que termina con </ul>:
 
Código PHP:
<div style="margin-top: 5px;">
<
strong style="color: #333; font-size: 15px; display: block; line-height: 1;">{$tsPost.post_seguidores}</strong>
<
span style="color: #999; font-size: 11px; text-transform: uppercase;">Seguidores</span>
</
div>
</
li>
</
ul

Debajo agregar:
 
Código:
{include file='modules/m.reacciones.tpl'}

Paso 5 — Borrar la caché

Borra el contenido de la carpeta /cache/ del sitio.


🗑️ Desinstalar
 
Código:
DROP TABLE IF EXISTS p_reacciones;

Elimina los archivos subidos y quita los hooks añadidos.

 
Descarga

Mediafire
http://Registrate o inicia tu sesión para ver este contenido

Google Drive
http://Registrate o inicia tu sesión para ver este contenido


¿Tienes dudas o encuentras algún problema? Déjalo en los comentarios.