
Retos de comunidad, autocompletado, menciones y mas mejoras
Presentamos Risus Nova 2.0.5 con el sistema de Retos de Comunidad, buscador con autocompletado predictivo, menciones en comentarios y correcciones varias.
NOVEDADES 2.0.5
SISTEMA DE RETOS DE COMUNIDAD
El admin crea retos desde Admin - Retos con nombre, tipo de metrica, fechas de inicio y fin, y premios en puntos para los 3 primeros. Todos los usuarios compiten automaticamente sin necesidad de inscribirse.
- 4 tipos de reto: posts publicados, comentarios escritos, votos recibidos y nuevos seguidores
- Ranking en tiempo real calculado con las tablas existentes del script
- Widget en la sidebar de la home con el reto activo, top 5 y barra de progreso de tiempo
- Pagina publica /retos/ con ranking completo (top 10), premios e historial
- Cierre automatico al expirar el plazo -- puntos a los ganadores y notificacion automatica
- El admin puede cerrar un reto manualmente antes de que expire
- Panel Admin - Retos con 3 pestanas: Todos los retos, Nuevo reto e Historial
- Premios configurables e independientes para los 3 primeros puestos
BUSCADOR CON AUTOCOMPLETADO PREDICTIVO
Mientras escribes en el buscador aparece un dropdown en tiempo real con sugerencias de posts y usuarios, sin necesidad de pulsar buscar.
- Posts sugeridos por titulo con puntuacion de relevancia
- Usuarios sugeridos por nick con sus puntos
- Navegacion con flechas arriba/abajo y Enter para seleccionar
- Disponible en el widget de la sidebar y en la pagina /buscador/
- Sin dependencias externas -- JavaScript vanilla puro
SISTEMA DE MENCIONES (@usuario)
Escribe @usuario en cualquier comentario para mencionar a alguien. El usuario mencionado recibe una notificacion automatica.
- Autocompletado al escribir @ con lista de usuarios y avatar
- Navegacion con flechas y Tab para seleccionar la mencion
- Notificacion automatica al usuario mencionado via sistema de monitor
- Compatible con el sistema de notificaciones existente
NOVEDADES 2.0.4 (incluidas)
EMAIL SMTP (PHPMailer)
El sistema de email ha sido completamente reescrito con PHPMailer. Los correos de registro, activacion y recuperacion de contrasena se envian de forma fiable desde cualquier hosting.
Se configura desde Admin - Configuracion en la nueva seccion "Configuracion de Email". Compatible con Gmail, Outlook, Yahoo y el email del propio hosting. Incluye boton de prueba de envio desde el panel y templates de email modernos en HTML.
SOPORTE POR TICKETS (Complemento - instalacion aparte)
Sistema completo de soporte en /soporte/ con:
- Prioridades: baja, media, alta, urgente
- Categorias: tecnico, cuenta, contenido, pagos, otro
- Estados: abierto, en proceso, resuelto, cerrado
- Panel admin con estadisticas, filtros y tabla con avatar del usuario
- Chat estilo mensajeria en la vista del ticket
- Notificacion automatica al usuario cuando el admin responde
- Valoracion del ticket por el usuario (resuelto / sin resolver)
ZONA VIP (Complemento - instalacion aparte)
Pagina exclusiva /vip/ con contenido solo para miembros VIP:
- Panel admin para asignar VIP manual o por rango, con fecha de expiracion
- Posts VIP -- excluidos de la home y tops, solo visibles para VIPs
- Badge dorado en el perfil de usuarios VIP
- Notificacion automatica al asignar acceso VIP
LOGIN Y REGISTRO EN PAGINAS DEDICADAS
Paginas /login/ y /registro/ con diseno moderno estilo carta aerea en dos columnas. El registro es en 3 pasos con validacion en tiempo real de usuario y email.
FILTROS Y MEJORAS EN POSTS
- Filtro de posts por pais del autor con banderas
- Filtro de posts por inicial del titulo (A-Z, 0-9)
- Buscador con 3 pestanas: Posts, Comunidades y Google
- Meta description dinamica en home y posts individuales
- Lazy loading automatico en imagenes
- Subida de imagenes en CKEditor 5 via upload_images.php
SISTEMA EN VIVO (Complemento - instalacion aparte)
Feed de actividad en tiempo real en /en-vivo/ con posts, comentarios, comunidades y nuevos usuarios.
ESTRELLAS DE REPUTACION
Sistema de estrellas con Font Awesome 7. Niveles Normal y Premium. Detecta automaticamente Administrador y Moderador por rango.
SEGURIDAD
- Headers HTTP de seguridad: X-Frame-Options, X-Content-Type-Options, X-XSS-Protection, Referrer-Policy, Permissions-Policy y HSTS
- Cookies de sesion protegidas con flags httponly y samesite=Lax
- Rate limiting en login: maximo 5 intentos por nick y 10 por IP en 10 minutos
- Clase tsSeguridad con prepared statements, sanitizacion mejorada y tokens CSRF
- Contrasenas limitadas a 72 caracteres para evitar DoS por bcrypt
- XSS corregido en ajax.borradores.php
- getIP() corregido: no acepta HTTP_CLIENT_IP falsificable
PHP 8.3 -- Script completamente adaptado. Corregidos todos los errores de tipado estricto, propiedades nulas y funciones obsoletas.
Smarty 4.5.6 -- Motor de plantillas actualizado desde Smarty 2. Compilacion mas eficiente y cache mejorada.
Seguridad
- Contrasenas migradas de MD5 a bcrypt. Migracion automatica al iniciar sesion.
- Cloudflare Turnstile en lugar de reCaptcha.
- Correcciones en manejo de sesiones y cookies.
CKEditor 5 -- editor moderno con subida de imagenes integrada.
Font Awesome 7 -- mas de 4.500 iconos nuevos.
SEO -- Sitemap XML
Sitemap dinamico en /sitemap.xml con posts, categorias y perfiles.
Instalador nuevo -- Proceso en 6 pasos con diseno moderno y deteccion automatica del entorno.
Notas de actualizacion desde 2.0.4
1. Sube todos los archivos al servidor
2. Ejecuta en phpMyAdmin:
-- Tablas nuevas para Retos de Comunidad
CREATE TABLE IF NOT EXISTS `w_retos` (
`reto_id` int(11) NOT NULL AUTO_INCREMENT,
`reto_nombre` varchar(120) NOT NULL DEFAULT '',
`reto_tipo` varchar(20) NOT NULL DEFAULT 'posts',
`reto_inicio` int(11) NOT NULL DEFAULT 0,
`reto_fin` int(11) NOT NULL DEFAULT 0,
`reto_puntos` int(6) NOT NULL DEFAULT 0,
`reto_puntos2` int(6) NOT NULL DEFAULT 0,
`reto_puntos3` int(6) NOT NULL DEFAULT 0,
`reto_activo` tinyint(1) NOT NULL DEFAULT 1,
`reto_cerrado` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`reto_id`),
KEY `idx_activo_fechas` (`reto_activo`,`reto_cerrado`,`reto_fin`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `w_retos_historial` (
`hist_id` int(11) NOT NULL AUTO_INCREMENT,
`reto_id` int(11) NOT NULL DEFAULT 0,
`user_id` int(11) NOT NULL DEFAULT 0,
`posicion` tinyint(3) NOT NULL DEFAULT 0,
`valor` int(11) NOT NULL DEFAULT 0,
`puntos_ganados` int(6) NOT NULL DEFAULT 0,
PRIMARY KEY (`hist_id`),
UNIQUE KEY `reto_user` (`reto_id`,`user_id`),
KEY `idx_reto_pos` (`reto_id`,`posicion`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Indices FULLTEXT para el buscador con autocompletado
ALTER TABLE `p_posts` ADD FULLTEXT INDEX `ft_post_title` (`post_title`);
ALTER TABLE `p_posts` ADD FULLTEXT INDEX `ft_post_tags` (`post_tags`);
3. Borra las carpetas /cache/ y /templates_c/
Notas de actualizacion desde 2.0.x (version anterior a 2.0.4)
1. Sube todos los archivos al servidor
2. Ejecuta el upgrade desde /upgrade/
3. Sube la carpeta inc/ext/phpmailer/ (3 archivos)
4. Ejecuta en phpMyAdmin:
ALTER TABLE w_configuracion
ADD COLUMN IF NOT EXISTS smtp_host varchar(120) NOT NULL DEFAULT '',
ADD COLUMN IF NOT EXISTS smtp_user varchar(120) NOT NULL DEFAULT '',
ADD COLUMN IF NOT EXISTS smtp_pass varchar(120) NOT NULL DEFAULT '',
ADD COLUMN IF NOT EXISTS smtp_port smallint(5) NOT NULL DEFAULT 587,
ADD COLUMN IF NOT EXISTS smtp_from varchar(120) NOT NULL DEFAULT '';
CREATE TABLE IF NOT EXISTS u_vip (
vip_id int(11) NOT NULL AUTO_INCREMENT,
user_id int(11) NOT NULL,
vip_tipo tinyint(1) NOT NULL DEFAULT 1,
vip_inicio int(11) NOT NULL DEFAULT 0,
vip_expira int(11) NOT NULL DEFAULT 0,
vip_notas varchar(255) NOT NULL DEFAULT '',
vip_admin int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (vip_id),
UNIQUE KEY user_id (user_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS u_vip_rangos (
vr_id int(11) NOT NULL AUTO_INCREMENT,
rango_id int(11) NOT NULL,
PRIMARY KEY (vr_id),
UNIQUE KEY rango_id (rango_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE p_posts ADD COLUMN IF NOT EXISTS post_vip tinyint(1) NOT NULL DEFAULT 0;
CREATE TABLE IF NOT EXISTS s_tickets (
ticket_id int(11) NOT NULL AUTO_INCREMENT,
user_id int(11) NOT NULL,
asunto varchar(120) NOT NULL DEFAULT '',
categoria varchar(30) NOT NULL DEFAULT 'tecnico',
prioridad tinyint(1) NOT NULL DEFAULT 2,
estado tinyint(1) NOT NULL DEFAULT 1,
fecha int(11) NOT NULL DEFAULT 0,
fecha_update int(11) NOT NULL DEFAULT 0,
leido_admin tinyint(1) NOT NULL DEFAULT 0,
leido_user tinyint(1) NOT NULL DEFAULT 1,
valoracion tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (ticket_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS s_mensajes (
msg_id int(11) NOT NULL AUTO_INCREMENT,
ticket_id int(11) NOT NULL,
user_id int(11) NOT NULL,
cuerpo text NOT NULL,
es_admin tinyint(1) NOT NULL DEFAULT 0,
fecha int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (msg_id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS w_login_attempts (
id int(11) NOT NULL AUTO_INCREMENT,
ip varchar(45) NOT NULL DEFAULT '',
nick varchar(50) NOT NULL DEFAULT '',
fecha int(11) NOT NULL DEFAULT 0,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `w_retos` (
`reto_id` int(11) NOT NULL AUTO_INCREMENT,
`reto_nombre` varchar(120) NOT NULL DEFAULT '',
`reto_tipo` varchar(20) NOT NULL DEFAULT 'posts',
`reto_inicio` int(11) NOT NULL DEFAULT 0,
`reto_fin` int(11) NOT NULL DEFAULT 0,
`reto_puntos` int(6) NOT NULL DEFAULT 0,
`reto_puntos2` int(6) NOT NULL DEFAULT 0,
`reto_puntos3` int(6) NOT NULL DEFAULT 0,
`reto_activo` tinyint(1) NOT NULL DEFAULT 1,
`reto_cerrado` tinyint(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`reto_id`),
KEY `idx_activo_fechas` (`reto_activo`,`reto_cerrado`,`reto_fin`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE IF NOT EXISTS `w_retos_historial` (
`hist_id` int(11) NOT NULL AUTO_INCREMENT,
`reto_id` int(11) NOT NULL DEFAULT 0,
`user_id` int(11) NOT NULL DEFAULT 0,
`posicion` tinyint(3) NOT NULL DEFAULT 0,
`valor` int(11) NOT NULL DEFAULT 0,
`puntos_ganados` int(6) NOT NULL DEFAULT 0,
PRIMARY KEY (`hist_id`),
UNIQUE KEY `reto_user` (`reto_id`,`user_id`),
KEY `idx_reto_pos` (`reto_id`,`posicion`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
ALTER TABLE p_posts ADD FULLTEXT KEY ft_tags (post_tags);
ALTER TABLE p_posts ADD FULLTEXT KEY ft_title_body (post_title, post_body);
ALTER TABLE `p_posts` ADD FULLTEXT INDEX `ft_post_title` (`post_title`);
5. Borra las carpetas /cache/ y /templates_c/
6. Configura el SMTP en Admin - Configuracion
Requisitos del servidor
PHP
- Version minima: PHP 8.0
- Version recomendada: PHP 8.2 o superior
Extensiones obligatorias:
- mysqli -- base de datos
- mbstring -- codificacion de texto
- gd -- procesamiento de imagenes
- curl -- peticiones HTTP externas
- json -- formato de datos
- session -- sesiones de usuario
- fileinfo -- deteccion de tipo de archivo
- openssl -- seguridad y cifrado
Configuracion recomendada:
allow_url_fopen = On
upload_max_filesize = 8M
post_max_size = 8M
max_execution_time = 60Base de datos
- MySQL 5.7 o superior
- MariaDB 10.4 o superior
Servidor web
- Apache con mod_rewrite activado (necesario para las URLs amigables)
- O Nginx con configuracion equivalente de rewrite
Permisos de escritura
Las siguientes carpetas deben tener permisos de escritura (666 o 777):
/cache/
/files/avatar/
/files/images/
/files/uploads/
/files/posts/
/config.inc/La mayoria de hostings compartidos actuales cumplen estos requisitos. Consulta la Guia de hostings compatibles en el foro si tienes dudas.
Debes agradecer para ver el contenido...
Descarga
phpost.es
Debes agradecer para ver el contenido...
Tienes dudas o encuentras algun problema? Dejalo en los comentarios.





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