Skip to content

Instantly share code, notes, and snippets.

View RickR2H's full-sized avatar

Rick Spaan RickR2H

View GitHub Profile
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;

Using Bootstrap in Joomla 4

Joomla 4 introduces a modular approach for interactive components

  • What is a modular approach?
  • The functionality is broken down into individual components, files. There is no one file approach as it was with Bootstrap in Joomla 3. This was done for efficiency and performance gains (send only the code that is needed instead of delivering everything in case some page will need so component).

How to deal with Interactive components

  • Load what you need per case! There are helper functions that will help you achieve this and, it is dead easy just call the function with the appropriate arguments.
@RickR2H
RickR2H / listusers.php
Created March 15, 2023 09:17 — forked from renekreijveld/listusers.php
Simple Joomla 4 CLI script
<?php
// listusers.php - simple cli script to dump users on CLI
// Written by René Kreijveld
// Version history:
// 1.0, 2023-03-09: Initial version
use Joomla\CMS\Factory;
const _JEXEC = 1;
@RickR2H
RickR2H / image.php
Created November 17, 2022 23:03 — forked from proweb/image.php
Joomla 3 thumbnails function
/**
* Method to create thumbnails from the current image and save them to disk. It allows creation by resizing
* or croppping the original image.
*
* @param mixed $thumbSizes string or array of strings. Example: $thumbSizes = array('150x75','250x150');
* @param integer $creationMethod 1-3 resize $scaleMethod | 4 create croppping
* @param string $thumbsFolder destination thumbs folder. null generates a thumbs folder in the image folder
*
* @return array
*