Skip to content

Commit

Permalink
🎉 ZCode V1.10.15 | Actualización - 29.08.24
Browse files Browse the repository at this point in the history
🌟 4 Nuevos iconos

🌟 Activar 'saliendo de...' desde ./admin/configs (hace que lo enlaces abrá una ventana antes de acceder)

🌟 Activar 'fuentes' desde ./admin/configs (fuentes en los posts)

📣 Mejora en el plugin UPModal

📣 Ya no requiere que se use , será de forma automática

🔨 Arreglo de Images.php, daba error al usar un enlace para portada el post

🔨 Ahora si tiene el archivo 'Avatar.php'

🔖 'UUID.php', algún día lo usaré

🔖 'xsl-sitemap.xml', aun no tiene uso
  • Loading branch information
joelmiguelvalente committed Aug 30, 2024
1 parent 2b3183d commit 2bd0395
Show file tree
Hide file tree
Showing 36 changed files with 651 additions and 165 deletions.
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ assets/images/uploads
backup/
cache/

# Themes
!themes/default
themes/*

# Ignorar archivos
inc/ext/Avatar.php
inc/ext/UUID.php
inc/ext/xsl-sitemap.xml
.log
.env
.lock
error.log
changelog.txt
config.inc.php
pasos.txt
robots.txt
295 changes: 151 additions & 144 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,144 +1,151 @@
ErrorDocument 400 /400.html
ErrorDocument 401 /401.html
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
#ErrorDocument 500 /500.html
#ErrorDocument 501 /501.html

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

## NO DEBEN EDITAR ESTO, YA QUE PUEDE GENERAR ERROR! DEBE TENER LAS LINEAS 13 HASTA 16
#RewriteBase /
#RewriteCond %{SERVER_PORT} 80
#RewriteCond %{HTTP_HOST} ^http://TU_SITIO_WEB.com[NC,OR]
#RewriteRule ^(.*)$ https://TU_SITIO_WEB.com/$1 [L,R=301,NC]

Options +FollowSymLinks

# Protege contra escaneos y manipulaciones malintencionadas
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(-|\.|') [OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)(<|>|%3C|%3E)(.*) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget)(.*) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)(libwww-perl|libwwwperl|snoopy|curl|wget|winhttp|python|nikto|scan|clshttp|archiver|loader|email|harvest|fetch|extract|grab|miner|suck|reaper|leach)(.*) [NC,OR]

RewriteCond %{REQUEST_URI} ^(/,|/;|/<|/>|/'|/`|/%2C|/%3C|/%3E|/%27|/////) [NC,OR]
RewriteCond %{HTTP_REFERER} ^(.*)(%00|%08|%09|%0A|%0B|%0C|%0D|%0E|%0F|%2C|<|>|'|%3C|%3E|%26%23|%27|%60)(.*) [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)(%00|%08|%09|%0A|%0B|%0C|%0D|%0E|%0F|%2C|%3C|%3E|%27|%26%23|%60)(.*) [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)('|-|<|>|,|/|\\|\.a|\.c|\.t|\.d|\.p|\.i|\.e|\.j)(.*) [NC,OR]
RewriteCond %{HTTP_COOKIE} ^(.*)(<|>|'|%3C|%3E|%27)(.*) [NC]

## Evitar que se liste el contenido de los directorios
Options All -Indexes
IndexIgnore *

# Limitar tama?o de subida de archivos
LimitRequestBody 10240000

# INDEX
RewriteRule ^$ index.php?do=home [QSA,L]
RewriteRule ^pagina([0-9]+)$ index.php?page=$1 [QSA,L]
RewriteRule ^index.php$ index.php?do=home [QSA,L]
RewriteRule ^cuenta/([A-Za-z0-9_-]+)$ inc/php/cuenta.php?accion=$1 [QSA,L]
RewriteRule ^agregar.php$ inc/php/agregar.php [QSA,L]

# CALLBACK PARA REDES SOCIALES
RewriteRule ^(github|discord|google|facebook)\.php$ inc/callback/$1.php [QSA,L]

#PERFIL
RewriteRule ^perfil/([A-Za-z0-9_-]+)(/([0-9]+))?$ inc/php/perfil.php?user=$1&pid=$3 [QSA,L]

# PORTAL
RewriteRule ^mi/$ index.php?do=portal [QSA,L]

# POSTS
RewriteRule ^posts(/([a-z]+))?(pagina([0-9]+))?$ index.php?do=posts&action=$2&page=$4 [QSA,L]
RewriteRule ^posts/([A-Za-z0-9_-]+)(/pagina([0-9]+))?$ index.php?do=posts&cat=$1&page=$3 [QSA,L]
RewriteRule ^posts/([A-Za-z0-9_-]+)/([0-9]+)/(.*)\.html$ index.php?do=posts&cat=$1&post_id=$2&title=$3 [QSA,L]
RewriteRule ^posts/editar/([0-9]+)$ inc/php/agregar.php?action=editar&pid=$1 [QSA,L]

# POSTS SHORTEN
RewriteRule ^p/([0-9]+)$ index.php?do=posts&p=$1 [QSA,L]

# RECUPERAR PASS Y VALIDAR CUENTA
RewriteRule ^password/(.+)/([0-9]+)/(.+)/?$ inc/php/password.php?hash=$1&type=$2&email=$3
RewriteRule ^validar/(.+)$ inc/php/validar.php?encode=$1 [QSA,L]

# FOTOS
RewriteRule ^fotos/([A-Za-z0-9_-]+)(/([0-9]+))?(.*)\.html?$ inc/php/fotos.php?action=album&user=$1&page=$3&fid=$4 [QSA,L]

# MODERACI?N
RewriteRule ^moderacion/buscador/([0-2]+)/([0-2]+)/(.+)$ inc/php/moderacion.php?action=buscador&act=search&m=$1&t=$2&texto=$3 [QSA,L]

#HISTORIAL DE MODERACI?N
RewriteRule ^mod-history/([A-Za-z0-9_-]+)/?$ inc/php/mod-history.php?ver=$1 [QSA,L]

# SITEMAP & RSS
RewriteRule ^rss/([A-Za-z0-9_-]+)(/([A-Za-z0-9_-]+))?$ inc/php/rss.php?type=$1&user=$3 [QSA,L]

# COMUNIDADES
RewriteRule ^comunidades(/([A-Za-z0-9_-]+))?(/([0-9]+))?(/([A-Za-z0-9_-]+))?(/([A-Za-z0-9_-]+))?(/([0-9]+))?$ inc/php/comunidades.php?action=$2&act=$3&bid=$4&page=$5&c_seo=$6&s_seo=$7 [QSA,L]

# LOGIN & REGISTRO
RewriteRule ^(login|registro)/?$ inc/php/access.php?action=$1 [QSA,L]

# UPGRADE
RewriteRule ^update/index.php$ update/index.php [QSA,L]

# EXTRAS
RewriteRule ^([A-Za-z0-9_-]+)\.php$ inc/php/ajax_files.php?action=$1 [QSA,L]
RewriteRule ^([A-Za-z0-9_-]+)/(([A-Za-z0-9_-]+))?$ inc/php/$1.php?action=$2&id=$3 [QSA,L]

# NO PERMITIR LA DESCARGA DE ARCHIVOS .TPL
<FilesMatch "\.(htaccess|ini|log|cfg|tpl|env|version|md)$">
Order Allow,Deny
Deny from all
</FilesMatch>

# Seguridad contra patrones de consulta maliciosos
RewriteCond %{QUERY_STRING} PHP[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} [NC]
RewriteRule .* - [F]

# Control de cach? para archivos est?ticos
<FilesMatch "\.(jpg|jpeg|png|gif|webp|svg|js|css|pdf)$">
Header set Cache-Control "max-age=31536000, public"
</FilesMatch>

# Compresi?n
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
Header append Vary User-Agent
</IfModule>

<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
ErrorDocument 400 /400.html
ErrorDocument 401 /401.html
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
#ErrorDocument 500 /500.html
#ErrorDocument 501 /501.html

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

## NO DEBEN EDITAR ESTO, YA QUE PUEDE GENERAR ERROR! DEBE TENER LAS LINEAS 13 HASTA 16
#RewriteBase /
#RewriteCond %{SERVER_PORT} 80
#RewriteCond %{HTTP_HOST} ^http://TU_SITIO_WEB.com[NC,OR]
#RewriteRule ^(.*)$ https://TU_SITIO_WEB.com/$1 [L,R=301,NC]

Options +FollowSymLinks

# Protege contra escaneos y manipulaciones malintencionadas
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
RewriteCond %{HTTP_USER_AGENT} ^(-|\.|') [OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)(<|>|%3C|%3E)(.*) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget)(.*) [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^(.*)(libwww-perl|libwwwperl|snoopy|curl|wget|winhttp|python|nikto|scan|clshttp|archiver|loader|email|harvest|fetch|extract|grab|miner|suck|reaper|leach)(.*) [NC,OR]

RewriteCond %{REQUEST_URI} ^(/,|/;|/<|/>|/'|/`|/%2C|/%3C|/%3E|/%27|/////) [NC,OR]
RewriteCond %{HTTP_REFERER} ^(.*)(%00|%08|%09|%0A|%0B|%0C|%0D|%0E|%0F|%2C|<|>|'|%3C|%3E|%26%23|%27|%60)(.*) [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)(%00|%08|%09|%0A|%0B|%0C|%0D|%0E|%0F|%2C|%3C|%3E|%27|%26%23|%60)(.*) [NC,OR]
RewriteCond %{QUERY_STRING} ^(.*)('|-|<|>|,|/|\\|\.a|\.c|\.t|\.d|\.p|\.i|\.e|\.j)(.*) [NC,OR]
RewriteCond %{HTTP_COOKIE} ^(.*)(<|>|'|%3C|%3E|%27)(.*) [NC]

## Evitar que se liste el contenido de los directorios
Options All -Indexes
IndexIgnore *

# Limitar tama?o de subida de archivos
LimitRequestBody 10240000

# INDEX
RewriteRule ^$ index.php?do=home [QSA,L]
RewriteRule ^pagina([0-9]+)$ index.php?page=$1 [QSA,L]
RewriteRule ^index.php$ index.php?do=home [QSA,L]
RewriteRule ^cuenta/([A-Za-z0-9_-]+)$ inc/php/cuenta.php?accion=$1 [QSA,L]
RewriteRule ^agregar.php$ inc/php/agregar.php [QSA,L]

# CALLBACK PARA REDES SOCIALES
RewriteRule ^(github|discord|google|facebook)\.php$ inc/callback/$1.php [QSA,L]

#PERFIL
RewriteRule ^perfil/([A-Za-z0-9_-]+)(/([0-9]+))?$ inc/php/perfil.php?user=$1&pid=$3 [QSA,L]

# PORTAL
RewriteRule ^mi/$ index.php?do=portal [QSA,L]

# POSTS
RewriteRule ^posts/(([a-z]+))/$ index.php?do=posts&cat=$1 [QSA,L]
RewriteRule ^posts(/([a-z]+))?(pagina([0-9]+))?$ index.php?do=posts&action=$2&page=$4 [QSA,L]
RewriteRule ^posts/([A-Za-z0-9_-]+)?(/pagina([0-9]+))?$ index.php?do=posts&cat=$1&page=$3 [QSA,L]
RewriteRule ^posts/([A-Za-z0-9_-]+)/([0-9]+)/(.*)\.html$ index.php?do=posts&cat=$1&post_id=$2&title=$3 [QSA,L]
RewriteRule ^posts/editar/([0-9]+)$ inc/php/agregar.php?action=editar&pid=$1 [QSA,L]

# POSTS SHORTEN
RewriteRule ^p/([0-9]+)$ index.php?do=posts&p=$1 [QSA,L]

# RECUPERAR PASS Y VALIDAR CUENTA
RewriteRule ^password/(.+)/([0-9]+)/(.+)/?$ inc/php/password.php?hash=$1&type=$2&email=$3
RewriteRule ^validar/(.+)$ inc/php/validar.php?encode=$1 [QSA,L]

# FOTOS
RewriteRule ^fotos/([A-Za-z0-9_-]+)(/([0-9]+))?(.*)\.html?$ inc/php/fotos.php?action=album&user=$1&page=$3&fid=$4 [QSA,L]

# MODERACI?N
RewriteRule ^moderacion/buscador/([0-2]+)/([0-2]+)/(.+)$ inc/php/moderacion.php?action=buscador&act=search&m=$1&t=$2&texto=$3 [QSA,L]

#HISTORIAL DE MODERACI?N
RewriteRule ^mod-history/([A-Za-z0-9_-]+)/?$ inc/php/mod-history.php?ver=$1 [QSA,L]

# SITEMAP & RSS
RewriteRule ^rss/([A-Za-z0-9_-]+)(/([A-Za-z0-9_-]+))?$ inc/php/rss.php?type=$1&user=$3 [QSA,L]

# COMUNIDADES
RewriteRule ^comunidades(/([A-Za-z0-9_-]+))?(/([0-9]+))?(/([A-Za-z0-9_-]+))?(/([A-Za-z0-9_-]+))?(/([0-9]+))?$ inc/php/comunidades.php?action=$2&act=$3&bid=$4&page=$5&c_seo=$6&s_seo=$7 [QSA,L]

# LOGIN & REGISTRO
RewriteRule ^(login|registro)/?$ inc/php/access.php?action=$1 [QSA,L]

# UPGRADE
RewriteRule ^update/index.php$ update/index.php [QSA,L]

# EXTRAS
RewriteRule ^([A-Za-z0-9_-]+)\.php$ inc/php/ajax_files.php?action=$1 [QSA,L]
RewriteRule ^([A-Za-z0-9_-]+)/(([A-Za-z0-9_-]+))?$ inc/php/$1.php?action=$2&id=$3 [QSA,L]

# NO PERMITIR LA DESCARGA DE ARCHIVOS .TPL
<FilesMatch "\.(htaccess|ini|log|cfg|tpl|env|version|md)$">
Order Allow,Deny
Deny from all
</FilesMatch>

# Seguridad contra patrones de consulta maliciosos
RewriteCond %{QUERY_STRING} PHP[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} [NC]
RewriteRule .* - [F]

# Control de cach? para archivos est?ticos
<FilesMatch "\.(jpg|jpeg|png|gif|webp|svg|js|css|pdf)$">
Header set Cache-Control "max-age=31536000, public"
</FilesMatch>

# Compresi?n
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
Header append Vary User-Agent
</IfModule>

<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php82” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.12
1.10.15
1 change: 1 addition & 0 deletions assets/icons/others/checkmark-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/others/php-1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/others/php-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/icons/others/php-3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/favicon/logo-128.webp
Binary file not shown.
Binary file modified assets/images/favicon/logo-16.webp
Binary file not shown.
Binary file modified assets/images/favicon/logo-256.webp
Binary file not shown.
Binary file modified assets/images/favicon/logo-32.webp
Binary file not shown.
Binary file modified assets/images/favicon/logo-512.webp
Binary file not shown.
Binary file modified assets/images/favicon/logo-64.webp
Binary file not shown.
Binary file modified assets/images/favicon/zcode.webp
Binary file not shown.
5 changes: 3 additions & 2 deletions assets/js/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ const UPModal = {
if(this.isShow) return;
this.isShow = true;
//
if ($('.UPModal').length === 0) $('body').append(this.template);
$('<div class="loader_modal"></div>').prependTo('body');
$('.loader_modal').html(this.template);
// Para los tamaños del modal
$('.UPModal-dialog').addClass(`UPModal-dialog-${this.size}`);
// Cerramos modal con la mascará
Expand Down Expand Up @@ -281,7 +282,7 @@ const UPModal = {
},
close(){
this.isShow = false;
$('.UPModal').remove();
$('.loader_modal').remove();
$('body').css({ overflow: 'auto' });
},
setTitle(title) {
Expand Down
6 changes: 6 additions & 0 deletions dashboard/admin_mods/m.admin_configs.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@
{html_radios name="c_avatar" id="ai_avatar" values=[1, 0] output=['Si', 'No'] selected=$tsConfig.c_avatar class="radio"}
</dd>
</dl>
<dl>
<dt><label for="ai_fuentes">Activar fuentes (posts):</label><span>Los usuarios podr&aacute;n agregar las fuentes donde han obtenido la informacion.</span></dt>
<dd>
{html_radios name="c_allow_fuentes" id="ai_fuentes" values=[1, 0] output=['Si', 'No'] selected=$tsConfig.c_allow_fuentes class="radio"}
</dd>
</dl>
<dl>
<dt><label for="ai_portal">Activar portal:</label><span>Los usuarios podr&aacute;n tener un inicio perzonalizado.</span></dt>
<dd>
Expand Down
Loading

0 comments on commit 2bd0395

Please sign in to comment.