Skip to content

Instantly share code, notes, and snippets.

View joelmiguelvalente's full-sized avatar
😎

Miguel92 joelmiguelvalente

😎
View GitHub Profile
/**
* Plugins globales que utilizará el script.
* Los plugins: (fueron obtenidos desde https://locutus.io/php/)
* # Empty
* # Htmlspecialchars_decode
* # Number_format
* # Base64_encode
*/
empty = n => {let e,r,t;const f=[undefined,null,!1,0,"","0"];for(r=0,t=f.length;r<t;r++)if(n===f[r])return!0;if("object"==typeof n){for(e in n)if(n.hasOwnProperty(e))return!1;return!0}return!1}
htmlspecialchars_decode = (e,E) => {let T=0,_=0,t=!1;void 0===E&&(E=2),e=e.toString().replace(/&lt;/g,"<").replace(/&gt;/g,">");const c={ENT_NOQUOTES:0,ENT_HTML_QUOTE_SINGLE:1,ENT_HTML_QUOTE_DOUBLE:2,ENT_COMPAT:2,ENT_QUOTES:3,ENT_IGNORE:4};if(0===E&&(t=!0),"number"!=typeof E){for(E=[].concat(E),_=0;_<E.length;_++)0===c[E[_]]?t=!0:c[E[_]]&&(T|=c[E[_]]);E=T}return E&c.ENT_HTML_QUOTE_SINGLE&&(e=e.replace(/&#0*39;/g,"'")),t||(e=e.replace(/&quot;/g,'"')),e=e.replace(/&amp;/g,"&")}
@joelmiguelvalente
joelmiguelvalente / curso-node-js.md
Created March 9, 2024 23:35 — forked from sergiecode/curso-node-js.md
Instalaciones Necesarias y recomendadas para el curso de NODE.JS
@joelmiguelvalente
joelmiguelvalente / MobileDetect.php
Created January 7, 2024 16:59
Esta es en su versión 2.8.34
<?php
/**
* Mobile Detect Library
* Motto: "Every business should have a mobile detection script to detect mobile readers"
*
* Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets).
* It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.
*
* Homepage: http://mobiledetect.net
* GitHub: https://github.com/serbanghita/Mobile-Detect
@joelmiguelvalente
joelmiguelvalente / c.sitemap.php
Last active January 7, 2023 16:42
Algunos cambios realizado para la "mejora" del sitemap
<?php
if (!defined('TS_HEADER'))
exit('No se permite el acceso directo al script');
/**
* Modelo para el control del registro de usuarios
*
* @name c.sitemap.php
* @author aperpen
@joelmiguelvalente
joelmiguelvalente / footer.php
Last active January 7, 2023 16:33
Instrucciones para ejecutar smarty 4.0 en PHPost Risus
@joelmiguelvalente
joelmiguelvalente / smarty.config.php
Created January 7, 2023 16:29
Esto es para la versión Smarty 4.3.0
<?php
if(!defined('TS_ROOT')) exit('Nooooo... Vete de aquí!');
/**
* Cargamos la librería de Smarty
*/
require_once TS_INC . "smarty" . DS . "bootstrap.php";
/**
@joelmiguelvalente
joelmiguelvalente / config.json
Last active December 21, 2022 15:16
Archivo de configuracion
{
"cdn": [],
"theme_js": [],
"theme_css": []
}
@joelmiguelvalente
joelmiguelvalente / InstallAutomaticTheme.php
Created May 13, 2022 22:29
Instalar theme de forma automática!
<?php
/**
* Install Automatic Theme v2
* Copyright 2022 Miguel92, Todos los derechos reservados
*
* Websites: https://phpost.net/foro/ & https://phpost.es/
*
* @name InstallAutomaticTheme.php
* @author Miguel92
@joelmiguelvalente
joelmiguelvalente / download.php
Last active May 9, 2022 11:16
[MOD] BBCode file para archivos
<?php
/**
* Download
* -------------------------------------------------------------
* File: download.php
* Name: download
* Purpose: Control de descarga de archivos
* @link: https://phpost.net/foro/
* @author: Miguel92
@joelmiguelvalente
joelmiguelvalente / m.admin_configs.tpl
Last active February 17, 2022 13:10
En los campos con el atributo name se agregó "c_" y "c_allow_"
<div class="boxy-title">
<h3>Caracter&iacute;sticas y Opciones</h3>
</div>
<div id="res" class="boxy-content">
{if $tsSave}
<div style="display: block;" class="mensajes ok">Configuraciones guardadas</div>{/if}
<form action="" method="post" autocomplete="off">
<fieldset>
<legend>Configuraci&oacute;n del Sitio</legend>
<dl>