Skip to content

Instantly share code, notes, and snippets.

View TLWebdesign's full-sized avatar

Tom van der Laan TLWebdesign

View GitHub Profile
@TLWebdesign
TLWebdesign / searchfiles.sh
Created August 31, 2023 22:11
Bash script to search for known files placed by Acymailing vulnerability
#!/bin/bash
# Created by Tom van der Laan - TLWebdesign with the help of ChatGPT 4
# Created on 31st of August 2023
# This script will search for files known to be placed in your joomla installation because of the Acymailing vulnerability.
# It is set up to work on a DirectAdmin installation by default. But when you run the script it will ask you for the file system search pattern.
# Leaving that empty will default it to directadmin structure.
# Common structures are (according to chatGPT)
@TLWebdesign
TLWebdesign / gist:196a0b0f2f6c74f7984272a0db0f1d5a
Created August 15, 2023 21:39
Overriding FontAwesome in Cassiopeia child template.
First upload your new fontawesome css files to /media/templates/site/cassiopeia_yourchildtemplatename/css
Then upload your new fontawesome webfont files to /media/templates/site/cassiopeia_yourchildtemplatename/webfonts
Then create a joomla.asset.json in your /templates/cassiopeia_yourchildtemplatename/ folder with these contents:
replace ###CHILDNAME### with your childtemplate name (the part after the underscore).
{
"$schema": "https://developer.joomla.org/schemas/json-schema/web_assets.json",
"name": "cassiopeia_###CHILDNAME###",
"version": "4.0.0",
@TLWebdesign
TLWebdesign / info_NL.txt
Last active October 24, 2023 14:01
Module override to use com_content to display a slideshow.
Je zet slideshow.php in je template map: "templates/template-naam/html/mod_articles_category/"
- Mijn opmaak is gebaseerd op Bootstrap 5.
- Voor de slideshow gebruiken we splindle http://splidejs.com en in het voorbeeld gebruik ik jsdeliver om die aan de pagina toe te voegen. In mijn eigen implementatie heb ik de files locaal opgeslagen en geladen via de template.
Custom fields informatie
- Ik heb een custom field groep aangemaakt genaamd "slideshow"
- Daarna heb ik 6 custom fields aangemaakt. Voor alle custom fields heb ik veldgroep op "slideshow" gezet. en ik heb ook een artikel categorie genaamd "slideshow" gemaakt waar ik alle slides in heb staan. Die selecteer je ook bij "categorie".
De custom fields
I've edited the original to be able to upload a field called "photo".
I also opted for not including the full path in my database so there is a bit more seperation
between database and file location.
Since these images are extension specific I opted to place them in the media folder like this:
'/media/com_[[[component]]]/images/[[[views]]]/'. This way i can keep my uploads seperate.
I also use the default componentHelper::randomKey(48); to generate a random key i append to the
filename to prevent double filenames being uploaded.
@TLWebdesign
TLWebdesign / gist:c5e16bf03e556b4d5495783ae83c555c
Created May 18, 2021 07:36
Creating categories in Joomla Programmatically
$tagTitles = array(
"title 1",
"title 2",
"title 3"
);
foreach ($tagTitles as $title )
{
$category = JTable::getInstance('Category');
$category->extension = "com_[[[component]]].training";