-
Posts
8 -
Joined
-
Last visited
Contact Methods
-
Website URL
http://dnespanama.com/
Profile Information
-
Gender
Male
-
Location
Panamá
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
LexSanchez's Achievements
Newbie (2/6)
35
Reputation
-
TextformatterFontAwesome Un módulo Textformatter para ProcessWire que convierte atajos de texto en iconos de Font Awesome. Características ✅ Convierte atajos como :fa-star: en iconos de Font Awesome ✅ Configuración flexible de mapeos de iconos ✅ Soporte para Font Awesome 6+ (solid, regular, brands) ✅ Carga automática de assets desde CDN ✅ Salida HTML o SVG ✅ Cache para mejor rendimiento ✅ Fácil configuración desde el admin de ProcessWire Instalación Descarga o clona este módulo en /site/modules/TextformatterFontAwesome/ Ve a Módulos > Refresh en el admin de ProcessWire Instala el módulo TextformatterFontAwesome Configura los mapeos de iconos según tus necesidades Configuración Mapeos de Iconos Define tus atajos de texto y las clases de Font Awesome correspondientes: :fa-star: = fa-solid fa-star :fa-heart: = fa-solid fa-heart :fa-home: = fa-solid fa-house :fa-user: = fa-solid fa-user :fa-email: = fa-solid fa-envelope :fa-facebook: = fa-brands fa-facebook :fa-twitter: = fa-brands fa-twitter Opciones de Configuración Formato de Salida: HTML (CSS) o SVG Cargar Assets: Incluir automáticamente Font Awesome desde CDN Versión CDN: Versión de Font Awesome a cargar (por defecto 6.5.1) CSS Personalizado: URL opcional para CSS personalizado Habilitar Cache: Cache de mapeos para mejor rendimiento Uso 1. Aplicar a Campos Ve a Configuración > Campos > selecciona tu campo de texto y en la pestaña Detalles: En Textformatters aplicados, selecciona Font Awesome Icons Guarda el campo 2. Usar en Plantillas // El textformatter se aplica automáticamente al renderizar el campo echo $page->body; // Los atajos :fa-star: se convierten automáticamente // O aplicar manualmente $textformatter = $modules->get('TextformatterFontAwesome'); $text = "Me gusta esta página :fa-heart: ¡Es genial! :fa-star:"; $textformatter->format($text); echo $text; // Salida: Me gusta esta página <i class="fa-solid fa-heart"></i> ¡Es genial! <i class="fa-solid fa-star"></i> 3. Ejemplos de Atajos Atajo Resultado Descripción :fa-star: <i class="fa-solid fa-star"></i> Estrella sólida :fa-heart: <i class="fa-solid fa-heart"></i> Corazón sólido :fa-home: <i class="fa-solid fa-house"></i> Casa sólida :fa-facebook: <i class="fa-brands fa-facebook"></i> Logo Facebook :fa-email: <i class="fa-solid fa-envelope"></i> Sobre de correo Ejemplos de Uso en Contenido En un Editor de Texto ¡Bienvenido a nuestro sitio! :fa-star: Contáctanos: - Email: info@ejemplo.com :fa-email: - Teléfono: +1234567890 :fa-phone: Síguenos en redes sociales: - Facebook :fa-facebook: - Twitter :fa-twitter: - Instagram :fa-instagram: ¡Gracias por visitarnos! :fa-heart: Resultado HTML ¡Bienvenido a nuestro sitio! <i class="fa-solid fa-star"></i> Contáctanos: - Email: info@ejemplo.com <i class="fa-solid fa-envelope"></i> - Teléfono: +1234567890 <i class="fa-solid fa-phone"></i> Síguenos en redes sociales: - Facebook <i class="fa-brands fa-facebook"></i> - Twitter <i class="fa-brands fa-twitter"></i> - Instagram <i class="fa-brands fa-instagram"></i> ¡Gracias por visitarnos! <i class="fa-solid fa-heart"></i> Personalización Avanzada Mapeos Personalizados Puedes crear tus propios atajos: :mi-icono: = fa-solid fa-custom-icon :empresa: = fa-solid fa-building :producto: = fa-solid fa-box CSS Personalizado Si usas Font Awesome Pro o tienes iconos personalizados: .fa-custom-icon::before { content: "\f123"; } Uso Programático // Obtener el módulo $fa = $modules->get('TextformatterFontAwesome'); // Formatear texto $content = "Texto con iconos :fa-star: y :fa-heart:"; $fa->format($content); echo $content; // Configurar dinámicamente $fa->set('outputFormat', 'svg'); $fa->set('loadAssets', false); Rendimiento El módulo incluye cache para los mapeos parseados Los assets se cargan solo cuando es necesario Detección inteligente de contenido con iconos Compatibilidad ProcessWire 3.0+ Font Awesome 6.0+ PHP 7.4+ Soporte Para reportar bugs o solicitar características, visita: GitHub Issues Licencia Mozilla Public License v2.0 Créditos Basado en TextformatterEmoji por Ryan Cramer.
- 1 reply
-
- 4
-
-
TrackingScripts Module Manage and inject tracking scripts (Google Analytics, Google Ads, Facebook Pixel, custom code) into site pages, with optional PrivacyWire consent integration and robots.txt/llms.txt file management. Features Google Analytics (GA4) — inject gtag.js with Measurement ID Google Ads — inject gtag.js with Ads conversion ID Facebook Pixel — inject Pixel tracking code with noscript fallback Custom code — free-form textareas for any third-party scripts (head and/or body) PrivacyWire integration — when enabled, scripts are injected with data-category attributes and type="text/plain" so they only load after user consent robots.txt & llms.txt — edit and auto-generate both files from the admin; content is written to the site root on save Per-service controls — enable/disable, position (head or body), and consent category for each service independently ID validation — regex validation for GA (G-), Ads (AW-), and Pixel (numeric) IDs before injection Admin-only exclusion — scripts are never injected on admin or form-builder templates Files site/modules/TrackingScripts/ ├── TrackingScripts.info.php ← module metadata ├── TrackingScripts.module.php ← main module (hooks, script injection) ├── TrackingScriptsConfig.php ← module configuration (ModuleConfig) ├── ProcessTrackingScriptsConfig.info.php ← Process module metadata └── ProcessTrackingScriptsConfig.module ← admin UI for non-superusers Installation Copy the TrackingScripts folder into /site/modules/ In the admin go to Modules → Refresh, then install TrackingScripts Optionally install ProcessTrackingScriptsConfig — this adds a Setup → Tracking Scripts page that allows non-superuser roles to edit the configuration. Assign the tracking-scripts-config permission to any role that needs access. Configuration Go to Modules → Configure → TrackingScripts (superuser) or Setup → Tracking Scripts (any user with permission). Google Analytics Field Description Enable Activate/deactivate injection Measurement ID GA4 ID, e.g. G-XXXXXXXXXX Position Inject in <head> or before </body> PrivacyWire Category Consent category (default: Statistics) Google Ads Field Description Enable Activate/deactivate injection Ads ID e.g. AW-XXXXXXXXX Position Inject in <head> or before </body> PrivacyWire Category Consent category (default: Marketing) Facebook Pixel Field Description Enable Activate/deactivate injection Pixel ID Numeric ID, e.g. 123456789012345 Position Inject in <head> or before </body> PrivacyWire Category Consent category (default: Marketing) Custom Tracking Code Two free-form textareas for any additional third-party code: Custom Code — Head: injected before </head> Custom Code — Body: injected before </body> PrivacyWire Integration When enabled, all tracking scripts are rendered with PrivacyWire-compatible attributes: <script type="text/plain" data-type="text/javascript" data-category="statistics" class="require-consent" src="..."></script> This ensures scripts only execute after the user gives consent for the corresponding cookie category. Requires the PrivacyWire module to be installed and active. Robots.txt & LLMs.txt Edit the content of both files directly from the admin. On save, the files are written to (or removed from) the site root: /robots.txt — search engine crawler directives /llms.txt — LLM/AI bot directives If a textarea is left empty, the corresponding file is deleted from the site root. How It Works The module hooks into Page::render (priority 100) to inject scripts via str_replace on </head> and </body>. This means: No template modifications required Works on all front-end pages automatically Runs before PrivacyWire (priority 101), so consent attributes are in place when PrivacyWire processes the page The robots.txt and llms.txt files are written via a hook on Modules::saveConfig, triggered whenever the module configuration is saved from either the module config screen or the Process admin page. ProcessTrackingScriptsConfig (Admin UI) A Process module that mirrors the full TrackingScripts configuration under Setup → Tracking Scripts. Purpose Allows non-superuser roles to manage tracking scripts without access to the Modules admin. Permission The module registers the permission tracking-scripts-config. To grant access: Go to Access → Roles Edit the desired role Check tracking-scripts-config Save How it works Reads and writes the same configuration data as TrackingScripts via $modules->getConfig() / $modules->saveConfig() Changes from either location (Modules → Configure or Setup → Tracking Scripts) are reflected in both Saving triggers the same Modules::saveConfig hook, so robots.txt/llms.txt files are written automatically Requirements ProcessWire 3.0.110+ PHP 7.2+ PrivacyWire (optional, for consent integration) License Licensed under the MIT License.
-
- 4
-
-
LexSanchez started following Module: Video or Social Post Embed and FrontEnd Login Not Work with AWS Cloudfront
-
Hi everyone: I do not know if someone before using ProcessWire with AWS CloudFront, currently I have problems with the login, it does not work for any reason, when I check in the logs generated by ProcessWire, it only indicates This request was aborted because it appears to be forged. (in /wire/core/SessionCSRF.php line 190). I have allowed CloudFront to forward all headers, cookies and allow all methods (GET, POST, PUT). When I perform the same process from the ip server if it works or from the balancer.
- 1 reply
-
- aws
- cloudfront
-
(and 1 more)
Tagged with:
-
Hi Bernhard: Sorry for answering something late, I attached 2 images of how it is shown in social network content.
-
Allowing a user to view certain admin page
LexSanchez replied to louisstephens's topic in Module/Plugin Development
Hi Louis: In the information array of your module you can add 'permission' => 'permission-name', add this permission to the role you need edit or use this module. -
Hello Theo: Thanks for your comment; I have made an update to the module that solves this error, please uninstall the module replace with the new version. Regards,
-
Text input in ProcessHello
LexSanchez replied to Sean Dinwiddie's topic in Module/Plugin Development
Hi Sean: This is a basic example of how to create a module that has configurable fields. <?php class Example extends Process implements Module, ConfigurableModule { private static $pathDir; /** * getModuleInfo is a module required by all modules to tell ProcessWire about them * * @return array * */ public static function getModuleInfo() { return array( // The module's title, typically a little more descriptive than the class name 'title' => 'Example Module', // version number 'version' => '0.0.1', // summary is brief description of what this module is 'summary' => 'This module descripton.', // author 'author' => 'Author Name', // singular=true: indicates that only one instance of the module is allowed. // This is usually what you want for modules that attach hooks. 'singular' => true, // autoload=true: indicates the module should be started with ProcessWire. // This is necessary for any modules that attach runtime hooks, otherwise those // hooks won't get attached unless some other code calls the module on it's own. // Note that autoload modules are almost always also 'singular' (seen above). 'autoload' => true, // If true, the module may not be uninstalled once installed. 'permanent' => false, 'page' => array( // optionally install/uninstall a page for this process automatically 'name' => 'example-module', // name of page to create 'parent' => '', // parent name (under admin) or omit or blank to assume admin root 'title' => 'Example Module', // title of page, or omit to use the title already specified above ), 'permission' => 'example-module', 'requires' => array('PHP>=5.4.1', 'ProcessWire>=2.7.0'), 'icon' => 'film', // module icon ); } public static function getModuleConfigInputfields(array $data) { // ------------------------------------------------------------------------ // Initialize InputField wrapper // ------------------------------------------------------------------------ $fields = new InputfieldWrapper(); // ------------------------------------------------------------------------ // Define text input field for the directory path. // ------------------------------------------------------------------------ $field = wire('modules')->get('InputfieldText'); $field->name = 'pathDirectory'; $field->label = __('Directory Videos'); $field->required = true; $field->columnWidth = 50; $field->value = (!empty($data['pathDirectory']) ? rtrim($data['pathDirectory'],"/")."/" : '/var/www/html/videos/'); $field->description = __('Description Field.'); $fields->add($field); // ------------------------------------------------------------------------ // Return of the fields. // ------------------------------------------------------------------------ return $fields; } public function ___install() { parent::___install(); } /** * Initialize the module * * ProcessWire calls this when the module is loaded. For 'autoload' modules, this will be called * when ProcessWire's API is ready. As a result, this is a good place to attach hooks. * */ public function init() { // Variable from module settings self::$pathDir = $this->pathDirectory; } /** * Executed when root url for module is accessed * */ public function ___execute() { $preview = $this->modules->get("InputfieldMarkup"); $preview->value .= "<h2>echo " . $this->pathDirectory . "</h2>"; return $preview->render(); } } -
LexSanchez changed their profile photo
-
Video or Social Post Embed Based on the TextformatterVideoEmbed module developed by Ryan Cramer, we have added the possibility to embed publications of the main social networks Facebook, Twitter and Instagram. ProcessWire Textformatter module that enables translation of YouTube, Vimeo, Instagram, Facebook, Twitter or Issuu URLs to full embed codes, resulting in a viewable video or social post in textarea fields you apply it to. How to install Download or Clone from Github: https://github.com/lexsanchez/VideoOrSocialPostEmbed Copy the VideoOrSocialPostEmbed.module file to your /site/modules/ directory (or place it in /site/modules/VideoOrSocialPostEmbed/). Click check for new modules in ProcessWire Admin Modules screen. Click install for the module labeled: "Video or Social Post Embed". Now you will be on the module config screen. Please make note of the config options and set as you see fit. How to use Edit your body field in Setup > Fields (or whatever field(s) you will be placing videos in). On the details tab, find the Text Formatters field and select "Video or Social Post Embed". Save. Edit a page using the field you edited and paste in YouTube, Vimeo, Facebook, Twitter, Instagram and/or Issuu URLs each on their own paragraph. Example How it might look in your editor (like TinyMCE): How it works This module uses YouTube, Vimeo, Instagram, Facebook, Twitter and Issuu oEmbed services to generate the embed codes populated in your content. After these services are queried the first time, the embed code is cached so that it doesn't need to be pulled again. Configuration You may want to update the max width and max height settings on the module's configuration screen. You should make these consistent with what is supported by your site design. If you change these max width / max height settings you may also want to check the box to clear cache, so that YouTube/Vimeo/Facebook/Twitter/Instagram/Issuu oembed services will generate new embed codes for you. Using with Markdown, Textile or other LML This text formatter is looking for a YouTube, Vimeo, Instagram, Facebook, Twitter or Issuu video URL surrounded by paragraph tags. As a result, if you are using Markdown or Textile (or something else like it) you want that text formatter to run before this one. That ensures that the expected paragraph tags will be present when VideoOrSocialPostEmbed runs. You can control the order that text formatters are run in by drag/drop sorting in the field editor. Copyright 2018 by Ryan Cramer / Updated by Lex Sanchez