===================================================== RISUS NOVA 2.0.5 — CHANGELOG PHPost | https://phpost.es/ Fecha: 15 de Junio 2026 @author Tronlar + PHPost Team ===================================================== ------------------------------------------------------ NUEVO — SISTEMA DE RETOS DE COMUNIDAD ------------------------------------------------------ - El admin crea retos desde Admin -> Retos con: nombre, tipo de metrica, fechas de inicio/fin, premios para los 3 primeros y estado activo/pausado - 4 tipos de reto: posts publicados, comentarios escritos, votos recibidos y nuevos seguidores - Todos los usuarios compiten automaticamente — sin necesidad de inscribirse - Ranking en tiempo real calculado con las tablas existentes del script (p_posts, p_comentarios, p_votos, u_follows) - Widget en la sidebar de la home con el reto activo, ranking de los top 5 y barra de progreso de tiempo - Pagina publica /retos/ con ranking completo (top 10), premios y listado de retos anteriores con ganadores - Al terminar el plazo el sistema cierra el reto automaticamente, da los puntos a los ganadores y les manda una notificacion en el sitio - El admin puede cerrar un reto manualmente antes de que expire desde el panel - Historial de retos cerrados con ganadores y puntos obtenidos visible en /retos/ y en el admin - Tablas: w_retos, w_retos_historial - Archivos nuevos: c.retos.php, inc/php/retos.php, t.retos.tpl, modules/m.home_retos.tpl, admin_mods/m.admin_retos.tpl - Modificados: admin.php, index.php, t.home.tpl, t.admin.tpl, m.admin_sidemenu.tpl, database.php ------------------------------------------------------ INSTALACION — CONSULTAS SQL NECESARIAS ------------------------------------------------------ Ejecutar en phpMyAdmin antes de usar los Retos: 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; ===================================================== RISUS NOVA 2.0.4 — CHANGELOG PHPost | https://phpost.es/ Fecha: Junio 2026 @author Tronlar + PHPost Team ===================================================== ------------------------------------------------------ NUEVO — SISTEMA DE PREMIOS ------------------------------------------------------ - Reconocimientos especiales para los miembros - 8 premios por defecto en 4 categorias: Participacion, Colaboracion, Especiales y Staff - El admin da premios a usuarios desde Admin -> Premios indicando el nick y un motivo - Notificacion automatica al usuario al recibirlo - Los premios aparecen en el perfil del usuario como iconos de colores con tooltip - Pagina /premios/ con todos los disponibles y cuantos usuarios los tienen - Panel Admin -> Premios con 3 pestanas: Premios, Categorias e Historial de asignaciones - Premios con icono Font Awesome 7 y color personalizable desde el admin - Tablas w_premios_cats, w_premios, u_premios - Archivos: c.premios.php, premios.php, ajax.premios.php, t.premios.tpl, m.admin_premios.tpl, m.perfil_premios.tpl ------------------------------------------------------ MEJORA — OPEN GRAPH ------------------------------------------------------ - og:type cambia a "article" en posts individuales y "website" en el resto de páginas - og:url ahora es dinámico — apunta a la URL exacta de cada página en lugar de siempre a la home - Metadatos article:published_time y article:author añadidos en posts individuales - Mejor vista previa al compartir en WhatsApp, Discord, Twitter y Telegram ------------------------------------------------------ NUEVO — NOTIFICACIONES EN DISCORD ------------------------------------------------------ - Aviso automatico en tu servidor de Discord cada vez que se publique un post nuevo - El mensaje incluye titulo, categoria, autor y enlace directo al post - Usa Webhooks nativos de Discord — sin bot externo ni instalacion adicional - URL del Webhook configurable desde Admin -> Configuracion -> Discord - Si lo dejas vacio no se envia nada Como activarlo: 1. En Discord ve al canal donde quieres los avisos 2. Configuracion del canal -> Integraciones -> Webhooks -> Nuevo Webhook 3. Copia la URL del Webhook 4. Pegala en Admin -> Configuracion -> Discord 5. Guarda - Columna discord_webhook en w_configuracion ------------------------------------------------------ NUEVO — GOOGLE ANALYTICS 4 ------------------------------------------------------ - Soporte para Google Analytics 4 integrado - ID de medicion (G-XXXXXXXXXX) configurable desde Admin -> Configuracion -> Google Analytics 4 - El codigo de seguimiento solo se carga si hay ID configurado — si lo dejas vacio no afecta al rendimiento - Columna analytics_id en w_configuracion ------------------------------------------------------ NUEVO — FEED INTELIGENTE DE TENDENCIAS ------------------------------------------------------ - Nueva pestana "Tendencias" en la home junto a "Ultimos posts" - Algoritmo que combina puntos, comentarios y velocidad de crecimiento para ordenar los posts mas populares del momento - Similar al algoritmo hot de Reddit: (puntos*3 + comentarios*2) / horas^1.5 - Muestra posts de las ultimas 48 horas - Los 3 primeros posts tienen badge de posicion (oro, plata, bronce) y badge de fuego - Sin SQL adicional — usa las tablas existentes - Archivos: m.home_tendencias.tpl (nuevo), c.posts.php, posts.php, t.home.tpl (modificados) ------------------------------------------------------ NUEVO — ZONA DE STREAMING ------------------------------------------------------ - Pagina /streaming/ con player de video y chat integrado sin salir de la comunidad - Compatible con Twitch, YouTube y Kick - Widget en la sidebar de la home que aparece automaticamente cuando hay canal configurado - Plataforma y nombre del canal configurables desde Admin -> Configuracion -> Streaming - Si no hay canal configurado no aparece nada - Columnas stream_plataforma y stream_canal en w_configuracion - Archivos: streaming.php, t.streaming.tpl, m.home_streaming.tpl ------------------------------------------------------ NUEVO — MISIONES DIARIAS (GAMIFICACION) ------------------------------------------------------ - Sistema de misiones para mantener a los usuarios activos y que vuelvan cada dia - 9 misiones por defecto incluidas en la instalacion: visita diaria, publicar posts, comentar, votar, recibir votos y conseguir seguidores - Progreso automatico al publicar posts, comentar y votar — sin configuracion adicional - Recompensa en puntos al completar cada mision - Notificacion automatica al usuario al completar - Misiones diarias y semanales - Pagina /misiones/ con progreso visual, barras de completado y listado de misiones pendientes - Widget en la sidebar de la home solo para usuarios logueados con progreso del dia - Panel Admin -> Misiones para crear, editar, activar/desactivar y eliminar misiones - Tablas w_misiones y u_misiones - Archivos: c.misiones.php, misiones.php, t.misiones.tpl, m.home_misiones.tpl, m.admin_misiones.tpl ------------------------------------------------------ NUEVO — LOGIN CON GOOGLE ------------------------------------------------------ - Los usuarios pueden iniciar sesion con su cuenta de Google desde la pagina /login/ - Vinculacion automatica si el email ya existe - Creacion automatica de cuenta al primer login - Client ID y Client Secret configurables desde Admin -> Configuracion -> Login con Google - El boton de Google solo aparece si esta configurado - Columnas google_client_id y google_client_secret en w_configuracion - Columna user_google_id en u_miembros - Archivo: google_auth.php → raiz del sitio ------------------------------------------------------ NUEVO — HONEYPOT ANTI-SPAM ------------------------------------------------------ - Campo invisible en el registro que solo los bots rellenan — bloquea registros automatizados - Activable desde Admin -> Configuracion - Compatible con Turnstile y pregunta de seguridad - No delata que hay proteccion al bot - Columna honeypot_activo en w_configuracion ------------------------------------------------------ NUEVO — POSTS DESTACADOS ------------------------------------------------------ - El admin puede marcar posts como destacados desde Admin -> Posts con un clic - Pagina /destacados/ con todos los posts destacados - Widget en la sidebar de la home - Panel Admin -> Destacados para gestionar y quitar - Badge estrella dorada en posts destacados - Columnas post_destacado, post_destacado_fecha y post_destacado_admin en p_posts ------------------------------------------------------ NUEVO — HOME POR CATEGORIAS ------------------------------------------------------ - Modo de visualizacion de la home configurable desde Admin -> Configuracion: * Normal: todos los posts mezclados (por defecto) * Por categorias: bloques separados por seccion * Ambos: posts normales + bloques por categoria - Numero de posts por categoria configurable (1-10) - Automatico: las categorias nuevas aparecen solas sin tocar codigo - Una sola query para todas las categorias - Compatible con iconos FA7 por categoria - Columnas home_mode y home_cat_limit en w_configuracion ------------------------------------------------------ NUEVO — NOTIFICACIONES PUSH ------------------------------------------------------ - Sistema de notificaciones push para el navegador - Los usuarios reciben avisos aunque no tengan el sitio abierto (nuevos comentarios, respuestas...) - Activacion/desactivacion por el usuario desde Mi Cuenta -> Privacidad - Activacion/desactivacion global desde Admin -> Configuracion -> Notificaciones Push - Requiere HTTPS y claves VAPID configuradas - Compatible con Chrome, Firefox y Edge - Archivos: sw.js, push.js, ajax.push.php, c.push.php - Columnas push_activo, push_vapid_pub, push_vapid_priv en w_configuracion - Columna push_activo en u_perfil - Tabla w_push_subs para suscripciones ------------------------------------------------------ NUEVO — SISTEMA DE DONACIONES ------------------------------------------------------ - Pagina dedicada /donaciones/ con diseno moderno - Compatible con PayPal, Ko-fi, Buy Me a Coffee, Patreon y Bizum - Barra de progreso hacia objetivo mensual - Lista de ultimos donantes con avatar - Widget en sidebar de la home (solo si hay metodo configurado) - Enlace automatico en menu de navegacion - Configuracion desde Admin -> Configuracion - Archivos: donaciones.php, t.donaciones.tpl, m.home_donaciones.tpl - Columnas don_* en w_configuracion - Tabla w_donaciones para registro de donantes ------------------------------------------------------ NUEVO — EMAIL SMTP (PHPMailer) ------------------------------------------------------ - Sistema de email completamente reescrito con soporte SMTP via PHPMailer - Compatible con Gmail, Outlook, Yahoo y el email del propio hosting - Configuracion desde Admin -> Configuracion en la nueva seccion "Configuracion de Email (SMTP)" - Boton de test de envio desde el panel admin - Fallback automatico a mail() si SMTP no esta configurado o falla - Templates de email modernos en HTML con diseno responsive para registro, recuperacion de contrasena y bienvenida - Columnas smtp_host, smtp_user, smtp_pass, smtp_port y smtp_from en w_configuracion ------------------------------------------------------ NUEVO — PREGUNTA DE SEGURIDAD EN REGISTRO ------------------------------------------------------ - Alternativa al Turnstile para hostings sin allow_url_fopen activo - Si hay Turnstile configurado se usa Turnstile; si no, se muestra la pregunta de seguridad - Pregunta y respuesta configurables desde Admin -> Configuracion - Columnas reg_pregunta y reg_respuesta en w_configuracion ------------------------------------------------------ NUEVO — SOPORTE POR TICKETS ------------------------------------------------------ - Sistema completo de soporte en /soporte/ - Prioridades: baja, media, alta, urgente - Categorias: tecnico, cuenta, contenido, pagos, otro - Estados: abierto, en proceso, resuelto, cerrado - Panel admin con estadisticas, filtros por estado y tabla con avatar del usuario que envio el ticket - Chat estilo mensajeria en la vista del ticket - Notificacion automatica al usuario al responder - Valoracion del ticket por el usuario (resuelto / sin resolver) - Tablas s_tickets y s_mensajes ------------------------------------------------------ NUEVO — ZONA VIP ------------------------------------------------------ - Pagina exclusiva /vip/ para miembros con acceso - Panel admin en /admin/vip con estadisticas - Asignacion VIP manual por usuario o por rango completo con fecha de expiracion opcional - Posts VIP — solo visibles para miembros VIP, excluidos de la home, tops y comentarios recientes - Badge dorado en el perfil de usuarios VIP - Notificacion automatica al asignar acceso VIP - Fallback automatico si el mod no esta instalado (detecta columna post_vip via information_schema) - Tablas u_vip y u_vip_rangos ------------------------------------------------------ NUEVO — LOGIN Y REGISTRO EN PAGINAS DEDICADAS ------------------------------------------------------ - Paginas /login/ y /registro/ con diseno carta aerea estilo dos columnas - Registro en 3 pasos (Cuenta, Perfil, Confirmar) con validacion en tiempo real de nick y email - Validacion de contrasenas tanto en JS como en servidor (c.registro.php) - Fix critico: id="password" duplicado en login_box causaba error "Las contrasenas no coinciden" corregido cambiando a id="login_password" ------------------------------------------------------ NUEVO — OTRAS FUNCIONES ------------------------------------------------------ - 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 - Sistema En Vivo en /en-vivo/ con feed de actividad en tiempo real (posts, comentarios, comunidades, nuevos usuarios) y widget en columna lateral - Estrellas de reputacion con FA7 — niveles Normal y Premium, detecta Admin y Moderador por rango - Lazy loading automatico en imagenes de posts - Subida de imagenes en CKEditor 5 via upload_images.php con validacion GD - Meta description dinamica — slogan en home, extracto de 160 chars en posts individuales ------------------------------------------------------ CORRECCIONES ------------------------------------------------------ - perfil.js: global_data is not defined corregido con retry de 100ms hasta que este disponible - c.registro.php: estado (region) ahora opcional, no bloquea el formulario si no carga - m.post_autor.tpl: botones seguir/dejar de seguir ya no se renderizan los dos a la vez - getLastPosts: INNER JOIN cuando hay filtro de pais - getLastPosts: user_rango != 3 para excluir usuarios eliminados de los resultados - posts.php: En Vivo se carga condicionalmente con file_exists() — no falla si no esta instalado - registro.js: eliminados console.log y alert de debug que quedaron de pruebas de desarrollo ------------------------------------------------------ PARCHE 2.0.4 — SEGURIDAD ------------------------------------------------------ - Headers HTTP de seguridad en header.php: X-Frame-Options, X-Content-Type-Options, X-XSS-Protection, Referrer-Policy, Permissions-Policy y HSTS (solo HTTPS) - Cookies de sesion protegidas con httponly y samesite=Lax - Rate limiting en login: maximo 5 intentos por nick y 10 por IP en 10 minutos Tabla w_login_attempts anadida - Clase tsSeguridad con prepared statements, sanitizacion mejorada y tokens CSRF - getIP() corregido: no acepta HTTP_CLIENT_IP - X_FORWARDED_FOR corregido en c.posts.php, c.fotos.php, c.cuenta.php, c.mensajes.php - REMOTE_ADDR validado con FILTER_VALIDATE_IP - Inputs sin sanitizar corregidos en c.mensajes.php - Contrasenas limitadas a 72 caracteres en c.cuenta.php para evitar DoS por bcrypt - XSS corregido en ajax.borradores.php ------------------------------------------------------ PARCHE 2.0.3 ------------------------------------------------------ - Corregido array $files indefinido en ajax.feed.php - Corregido nivel de acceso en ajax.feed.php - Corregida URL AJAX del comprobador de versiones ------------------------------------------------------ PARCHE 2.0.1 ------------------------------------------------------ - public array $permisos declarado como propiedad tipada en tsUser (PHP 8 estricto) - jQuery movido al head para scripts inline del body - Font Awesome 6 eliminado de m.agregar.form.tpl - Columnas p_fondo y p_fondoper anadidas a u_perfil ------------------------------------------------------ COMPATIBILIDAD PHP 8 ------------------------------------------------------ - Compatibilidad total con PHP 8.3+ - Migracion de Smarty 2 a Smarty 4.5.6 - Contrasenas migradas de MD5 a bcrypt con migracion automatica al iniciar sesion - Sistema de sesiones con random_bytes() - Correcciones de TypeError, warnings y claves indefinidas en todo el sistema ------------------------------------------------------ BASE DE DATOS ------------------------------------------------------ - Tabla w_push_subs para suscripciones push - Tabla w_donaciones para registro de donantes - Columnas push en w_configuracion: push_activo, push_vapid_pub, push_vapid_priv - Columna push_activo en u_perfil - Columnas donaciones en w_configuracion: don_paypal, don_kofi, don_bmac, don_patreon, don_bizum, don_transferencia, don_objetivo, don_recaudado - Columnas SMTP en w_configuracion: smtp_host, smtp_user, smtp_pass, smtp_port, smtp_from - Columnas pregunta seguridad en w_configuracion: reg_pregunta, reg_respuesta - Tablas nuevas: s_tickets, s_mensajes (soporte), u_vip, u_vip_rangos (zona vip), w_login_attempts (rate limiting) - Columna post_vip en p_posts - Indices FULLTEXT en p_posts - Columna post_image en p_posts - Columna user_pwtype en u_miembros ------------------------------------------------------ OTROS ------------------------------------------------------ - Nuevos botones de compartir en redes sociales - RSS feed implementado - Sistema de avatares mejorado - Sitemap XML dinamico en /sitemap.xml - Nuevo editor CKEditor 5 - Instalador completamente reescrito (6 pasos) - Limpieza de archivos y librerias innecesarias ===================================================== NOTAS DE ACTUALIZACION DESDE VERSION ANTERIOR ===================================================== 1. Sube todos los archivos al servidor 2. Ejecuta el upgrade desde /upgrade/ 3. Ejecuta en phpMyAdmin: -- Sistema de Premios CREATE TABLE IF NOT EXISTS w_premios_cats ( cat_id int(11) NOT NULL AUTO_INCREMENT, cat_nombre varchar(80) NOT NULL DEFAULT '', cat_orden int(11) NOT NULL DEFAULT 0, PRIMARY KEY (cat_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO w_premios_cats (cat_nombre, cat_orden) VALUES ('Participación',1),('Colaboración',2),('Especiales',3),('Staff',4); CREATE TABLE IF NOT EXISTS w_premios ( premio_id int(11) NOT NULL AUTO_INCREMENT, cat_id int(11) NOT NULL DEFAULT 1, nombre varchar(100) NOT NULL DEFAULT '', descripcion varchar(255) NOT NULL DEFAULT '', icono varchar(60) NOT NULL DEFAULT 'fa-solid fa-award', color varchar(20) NOT NULL DEFAULT '#f39c12', activo tinyint(1) NOT NULL DEFAULT 1, orden int(11) NOT NULL DEFAULT 0, PRIMARY KEY (premio_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE IF NOT EXISTS u_premios ( up_id int(11) NOT NULL AUTO_INCREMENT, user_id int(11) NOT NULL, premio_id int(11) NOT NULL, admin_id int(11) NOT NULL DEFAULT 1, mensaje varchar(255) NOT NULL DEFAULT '', fecha int(11) NOT NULL DEFAULT 0, PRIMARY KEY (up_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- Discord Webhook ALTER TABLE w_configuracion ADD COLUMN IF NOT EXISTS discord_webhook varchar(255) NOT NULL DEFAULT ''; -- Google Analytics 4 ALTER TABLE w_configuracion ADD COLUMN IF NOT EXISTS analytics_id varchar(30) NOT NULL DEFAULT ''; -- Streaming ALTER TABLE w_configuracion ADD COLUMN IF NOT EXISTS stream_plataforma varchar(20) NOT NULL DEFAULT 'twitch', ADD COLUMN IF NOT EXISTS stream_canal varchar(100) NOT NULL DEFAULT ''; -- Misiones Diarias CREATE TABLE IF NOT EXISTS w_misiones ( mision_id int(11) NOT NULL AUTO_INCREMENT, nombre varchar(100) NOT NULL DEFAULT '', descripcion varchar(255) NOT NULL DEFAULT '', tipo varchar(30) NOT NULL DEFAULT 'posts', objetivo int(11) NOT NULL DEFAULT 1, puntos int(11) NOT NULL DEFAULT 10, periodo varchar(10) NOT NULL DEFAULT 'diario', activo tinyint(1) NOT NULL DEFAULT 1, orden int(11) NOT NULL DEFAULT 0, PRIMARY KEY (mision_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO w_misiones (nombre, descripcion, tipo, objetivo, puntos, periodo, activo, orden) VALUES ('Visita diaria','Entra a la comunidad hoy','visita',1,5,'diario',1,1), ('Primer post del día','Publica al menos 1 post hoy','posts',1,20,'diario',1,2), ('Publicador activo','Publica 3 posts hoy','posts',3,40,'diario',1,3), ('Comentarista','Comenta al menos 1 post hoy','comentarios',1,10,'diario',1,4), ('Participación activa','Haz 5 comentarios hoy','comentarios',5,25,'diario',1,5), ('Votante','Vota 3 posts hoy','votos_dados',3,10,'diario',1,6), ('Contenido valorado','Recibe 3 votos positivos hoy','votos_recibidos',3,15,'diario',1,7), ('Influencer semanal','Consigue 5 nuevos seguidores esta semana','seguidores',5,50,'semanal',1,8), ('Creador semanal','Publica 10 posts esta semana','posts',10,80,'semanal',1,9); CREATE TABLE IF NOT EXISTS u_misiones ( um_id int(11) NOT NULL AUTO_INCREMENT, user_id int(11) NOT NULL, mision_id int(11) NOT NULL, progreso int(11) NOT NULL DEFAULT 0, completada tinyint(1) NOT NULL DEFAULT 0, puntos_dados tinyint(1) NOT NULL DEFAULT 0, fecha date NOT NULL, PRIMARY KEY (um_id), UNIQUE KEY user_mision_fecha (user_id, mision_id, fecha), KEY user_id (user_id), KEY fecha (fecha) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- Login con Google ALTER TABLE w_configuracion ADD COLUMN IF NOT EXISTS google_client_id varchar(255) NOT NULL DEFAULT '', ADD COLUMN IF NOT EXISTS google_client_secret varchar(255) NOT NULL DEFAULT ''; ALTER TABLE u_miembros ADD COLUMN IF NOT EXISTS user_google_id varchar(50) NOT NULL DEFAULT ''; -- Honeypot ALTER TABLE w_configuracion ADD COLUMN IF NOT EXISTS honeypot_activo tinyint(1) NOT NULL DEFAULT 0; -- Posts Destacados ALTER TABLE p_posts ADD COLUMN IF NOT EXISTS post_destacado tinyint(1) NOT NULL DEFAULT 0, ADD COLUMN IF NOT EXISTS post_destacado_fecha int(11) NOT NULL DEFAULT 0, ADD COLUMN IF NOT EXISTS post_destacado_admin int(11) NOT NULL DEFAULT 0; -- Home por categorias ALTER TABLE w_configuracion ADD COLUMN IF NOT EXISTS home_mode tinyint(1) NOT NULL DEFAULT 0, ADD COLUMN IF NOT EXISTS home_cat_limit tinyint(2) NOT NULL DEFAULT 5; -- Push Notifications ALTER TABLE w_configuracion ADD COLUMN IF NOT EXISTS push_activo tinyint(1) NOT NULL DEFAULT 0, ADD COLUMN IF NOT EXISTS push_vapid_pub varchar(255) NOT NULL DEFAULT '', ADD COLUMN IF NOT EXISTS push_vapid_priv varchar(255) NOT NULL DEFAULT ''; ALTER TABLE u_perfil ADD COLUMN IF NOT EXISTS push_activo tinyint(1) NOT NULL DEFAULT 1; CREATE TABLE IF NOT EXISTS w_push_subs ( sub_id int(11) NOT NULL AUTO_INCREMENT, user_id int(11) NOT NULL, endpoint text NOT NULL, p256dh varchar(255) NOT NULL DEFAULT '', auth varchar(100) NOT NULL DEFAULT '', fecha int(11) NOT NULL DEFAULT 0, PRIMARY KEY (sub_id), KEY user_id (user_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- Donaciones ALTER TABLE w_configuracion ADD COLUMN IF NOT EXISTS don_paypal varchar(255) NOT NULL DEFAULT '', ADD COLUMN IF NOT EXISTS don_kofi varchar(255) NOT NULL DEFAULT '', ADD COLUMN IF NOT EXISTS don_bmac varchar(255) NOT NULL DEFAULT '', ADD COLUMN IF NOT EXISTS don_patreon varchar(255) NOT NULL DEFAULT '', ADD COLUMN IF NOT EXISTS don_bizum varchar(20) NOT NULL DEFAULT '', ADD COLUMN IF NOT EXISTS don_transferencia tinyint(1) NOT NULL DEFAULT 0, ADD COLUMN IF NOT EXISTS don_objetivo decimal(8,2) NOT NULL DEFAULT 0.00, ADD COLUMN IF NOT EXISTS don_recaudado decimal(8,2) NOT NULL DEFAULT 0.00; CREATE TABLE IF NOT EXISTS w_donaciones ( don_id int(11) NOT NULL AUTO_INCREMENT, don_nombre varchar(64) NOT NULL DEFAULT '', don_cantidad decimal(8,2) NOT NULL DEFAULT 0.00, don_metodo varchar(30) NOT NULL DEFAULT '', don_mensaje varchar(255) NOT NULL DEFAULT '', don_fecha int(11) NOT NULL DEFAULT 0, don_activo tinyint(1) NOT NULL DEFAULT 1, don_mostrar_cantidad tinyint(1) NOT NULL DEFAULT 1, PRIMARY KEY (don_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- SMTP 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 ''; -- Pregunta de seguridad ALTER TABLE w_configuracion ADD COLUMN IF NOT EXISTS reg_pregunta varchar(255) NOT NULL DEFAULT '', ADD COLUMN IF NOT EXISTS reg_respuesta varchar(100) NOT NULL DEFAULT ''; -- Zona VIP 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; -- Soporte 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; -- Rate limiting 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; -- Indices FULLTEXT 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); 4. Sube la carpeta inc/ext/phpmailer/ (3 archivos) 5. Sube sw.js y ajax.push.php a la raiz del sitio 6. Borra las carpetas /cache/ y /templates_c/ 7. Configura SMTP en Admin -> Configuracion 8. Configura Push en Admin -> Configuracion (opcional) 9. Configura Donaciones en Admin -> Configuracion (opcional) ===================================================== CREDITOS ===================================================== PHPost Team | https://phpost.es/ Basado en T!Script por Tronlar =====================================================