Skip to content

Instantly share code, notes, and snippets.

View uzielweb's full-sized avatar

Uziel Almeida Oliveira uzielweb

View GitHub Profile
@uzielweb
uzielweb / joomla-security-scanner.php
Last active October 18, 2025 23:42
Joomla Security Scanner - Ferramenta completa para detectar malware e verificar saúde dos arquivos do Joomla
<?php
/**
* Joomla Security Scanner
* Verifica a saúde dos arquivos do Joomla e detecta possíveis malwares
*
* DESCRIÇÃO:
* Este scanner realiza uma análise completa de segurança em instalações Joomla,
* detectando potenciais ameaças, vulnerabilidades e problemas de configuração.
*
* FUNCIONALIDADES:
@uzielweb
uzielweb / bootstrap4-spacing-compatibility.css
Created July 29, 2025 00:50
Bootstrap 4 Spacing Classes Compatibility for Bootstrap 5
/* Retrocompatibilidade de margens e paddings do Bootstrap 4 no Bootstrap 5 */
/* Escala de espaçamento do Bootstrap 4 (em rem, como no BS4) */
:root {
--bs4-spacer: 1rem; /* Equivalente ao $spacer do Bootstrap 4 */
}
/* Classes de margem (m-*) */
.m-0 { margin: 0 !important; }
.m-1 { margin: calc(var(--bs4-spacer) * 0.25) !important; } /* 0.25rem */
@uzielweb
uzielweb / importArticles.php
Last active October 17, 2024 13:27
Import Articles Cli for Joomla 5 (Form 2 Content component and Joomal Content Articles component)
<?php
/*
Instructions for use:
- To skip the first 100 articles, use the argument "--skip 100".
- To manually define the limit of records to be imported, use the argument "-Limit" followed by the desired number, for example, "-Limit 50".
- To define the start date of import, use the argument "--start_date" followed by the date in "Yyyy-MM-DD" format, for example, "--start_date 2023-01-01".
- To define the end of importation, use the argument "--end_date" followed by the date in "Yyyy-MM-DD" format, for example, "--end_date 2023-12-31".
- To define the category of origin, use the argument "--source_category" followed by the desired ID, for example, "-source_category 10".
- To define the destination category, use the argument "--destination_category" followed by the desired category ID, for example, "--destination_category 5".
- To select Joomla Standard Articles from the Content table in the old database, use the argument "-standard_articles True".
@uzielweb
uzielweb / importArticles.php
Last active November 14, 2023 08:51
Import Articles Cli for Joomla 4, importing articles from form2content and Joomla Articles
<?php
/*
Instructions for use:
- To skip the first 100 articles, use the argument "--skip 100".
- To manually define the limit of records to be imported, use the argument "-Limit" followed by the desired number, for example, "-Limit 50".
- To define the start date of import, use the argument "--start_date" followed by the date in "Yyyy-MM-DD" format, for example, "--start_date 2023-01-01".
- To define the end of importation, use the argument "--end_date" followed by the date in "Yyyy-MM-DD" format, for example, "--end_date 2023-12-31".
- To define the category of origin, use the argument "--source_category" followed by the desired ID, for example, "-source_category 10".
- To define the destination category, use the argument "--destination_category" followed by the desired category ID, for example, "--destination_category 5".
- To select Joomla Standard Articles from the Content table in the old database, use the argument "-standard_articles True".
@uzielweb
uzielweb / custom-bootstrap-m-p.css
Created July 23, 2023 00:21
Custom Bootstrap Margins and Paddings
/* Custom Bootstrap Margins by Uziel Almeida Oliveira */
/* p-1 until p-20 */
.p-1 {
padding: calc(var(--bs-gutter-x) * .125)
}
.p-2 {
padding: calc(var(--bs-gutter-x) * .25)
}
.p-3 {
padding: calc(var(--bs-gutter-x) * .5)
@uzielweb
uzielweb / custom-bootstrap-ratios.css
Last active July 22, 2023 23:56
Custom Bootstrap Ratios
/* Custom Ratios for Bootstrap 5 */
.ratio-1x1 {
--bs-aspect-ratio: 100%;
}
.ratio-1x2 {
--bs-aspect-ratio: 200%;
}
.ratio-2x1 {
--bs-aspect-ratio: 50%;
}
@uzielweb
uzielweb / phpfontawesome-joomla.php
Created November 29, 2022 00:16
php fontawesome for Joomla
<?php
// change $content with your html content
// replace any <i class fa fa-xxx> with svg equivalent
// fa-b, fa-brands, fa-light, fa-regular, fa-solid, fa-duotone, fas, far, fal, fab, fad
preg_match_all('@<' . 'i class="fa-(.*) fa-(.*)"' . '>@Us', $content, $newmatches);
$svgMatchs = $newmatches[2];
foreach ($svgMatchs as $key=>$svgMatch) {
$svgFile = JPATH_BASE.$tpath . '/svgs/' . $newmatches[1][$key] . '/' . $svgMatch . '.svg';
@uzielweb
uzielweb / svg-custom-icons-from-tags-classes.html
Last active October 16, 2022 06:12
Add SVG custom content based on tag class
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-iYQeCzEYFbKjA/T2uDLTpkwGzCiq6soy8tYaI1GyVh/UjpbCx/TYkiZhlZB6+fzT" crossorigin="anonymous">
<title>Title</title>
<style>
body{
color: red;
@uzielweb
uzielweb / gist:322d0573d1dff0cfa7ac86f94c8a3a4d
Created December 13, 2021 03:45
Wordpress --- Filtering Events based on custom field inside custom post type
<?php
// developed by Daniel Paz and Uziel
$tipo = $_GET['tipo'];
$categoria = $_GET['categoria'];
?>
<form action="" method="get">
<div class="vistoboot">
<div class="container">
<div class="row align-items-end">
<div class="col-md">
@uzielweb
uzielweb / span-to-col-helixultimate.js
Created September 18, 2021 07:57
Change span to col-md- classes in Helix Ultimate
// add class row to sp-column when children has any part of class with span in the classname
jQuery(document).ready(function ($) {
$('.sp-column').each(function () {
// get the children class names with span in the classname
var childrenClasses = $(this).children().map(function () { return this.className; }).get().join(' ');
// if children has any part of class with span in the classname
if (childrenClasses.indexOf('span') > -1) { $(this).addClass('row'); }
// change parte of classname with span to col-md-
$(this).children().each(function () {
var className = $(this).attr('class');