Skip to content

Instantly share code, notes, and snippets.

View pepperstreet's full-sized avatar

pepperstreet pepperstreet

View GitHub Profile
<?php
/**
* @version 1.0.0
* @package Readmedia
* @copyright Copyright (C) 2018 David Jardin - djumla GmbH
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://www.djumla.de
*/
/* Initialize Joomla framework */
@kovtunos
kovtunos / full-width.css
Last active February 28, 2018 19:04
Full width section inside fixed width container #css
/* Variant 1 */
.full-width {
margin-left: calc(-50vw + 50%);
margin-right: calc(-50vw + 50%);
}
/* Variant 2 */
.full-width {
width: 100vw;
margin-left: -50vw;
@marcelo-ribeiro
marcelo-ribeiro / javascript-remove-accents.js
Last active July 12, 2025 21:44 — forked from fabiofdsantos/angularJS_removeAccents.js
An Javascript function to remove accents and others characters from an input string.
// Example: https://codepen.io/marcelo-ribeiro/pen/OJmVOyW
const accentsMap = new Map([
["A", "Á|À|Ã|Â|Ä"],
["a", "á|à|ã|â|ä"],
["E", "É|È|Ê|Ë"],
["e", "é|è|ê|ë"],
["I", "Í|Ì|Î|Ï"],
["i", "í|ì|î|ï"],
["O", "Ó|Ò|Ô|Õ|Ö"],
@gunjanpatel
gunjanpatel / get-menu-item-backend.php
Created July 11, 2016 05:10
Get article or content menu item from backend
<?php
// Get site menu - specially pass `site` argument as you are going to get site menu from backend.
$menu = JFactory::getApplication()->getMenu('site');
// Get menu item based on query
$menuItems = $menu->getItems('link', 'index.php?option=com_content&view=article&id=' . (int) $this->item->id);
@phproberto
phproberto / templates\protostar\html\layouts\com_content\article\image.php
Created October 23, 2015 02:03
Joomla layouts to generate thumbnails on the fly
<?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;
@gunjanpatel
gunjanpatel / user.md
Created April 22, 2015 07:24
trigger joomla user plugin from your component

Using following code you can trigger any joomla user plugin event in your component

JPluginHelper::importPlugin('user', 'contactcreator');

JDispatcher::getInstance()->trigger(
	'onUserAfterSave', 
	array(
 $user, 
@malles
malles / UIkit-sortable-javascript.markdown
Created February 19, 2015 22:13
UIkit sortable javascript
@Gerlof
Gerlof / edit.php
Last active April 23, 2021 23:55 — forked from sanderpotjer/edit.php
<?php
/**
* @package Article Form override for Joomla 3
* @copyright Copyright (c) 2014 Sander Potjer - www.perfectwebteam.nl
* @license GNU General Public License version 3 or later
*/
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
@kricore
kricore / default.php
Last active February 24, 2017 04:57
Simple Image Gallery Pro responsive template using Foundation's block grid.
<?php
/**
* @version 3.0.x
* @package Simple Image Gallery Pro
* @author JoomlaWorks - http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2014 JoomlaWorks Ltd. All rights reserved.
* @license http://www.joomlaworks.net/license
*/
// no direct access
@renekreijveld
renekreijveld / jfindfiles
Last active March 11, 2021 07:03
Find unused and used content files in your Joomla website
#!/bin/sh
# jfindfiles -- Find used and unused content files in your Joomla website
#
# This scripts supports Joomla versions 2.5 - 3.x
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#