Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Hans Kuijpers hans2103

🏠
Working from home
View GitHub Profile
View flying-focus.js
(function() {
'use strict';
var DURATION = 150;
var ringElem = null;
var movingId = 0;
var prevFocused = null;
var keyDownTime = 0;
@hans2103
hans2103 / data-type.faqpage.php
Created Sep 12, 2019
Structured Data FAQ Page JLayout for Joomla
View data-type.faqpage.php
<?php
defined('_JEXEC') or die;
/**
* Example implementation
*
* $data = array();
* foreach ($this->item->faqs as $key => $faq)
@hans2103
hans2103 / slideshow.php
Created Jun 6, 2019
Joomla alternate layout mod_articles_category for Bootstrap 3 Slideshow
View slideshow.php
<?php
/**
* @package Joomla.Site
* @subpackage mod_articles_category
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
@hans2103
hans2103 / slideshow.php
Created Jun 6, 2019
Joomla alternate layout mod_articles_category for Bootstrap 2 Slideshow
View slideshow.php
<?php
/**
* @package Joomla.Site
* @subpackage mod_articles_category
*
* @copyright Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
@hans2103
hans2103 / rsform-dropdown-items-from-db
Created Mar 11, 2019
RSForm Pro generate dropdown items from DB - title from given category
View rsform-dropdown-items-from-db
//<code>
use Joomla\CMS\Factory;
$catid = 345; // fake cat id
$items = array();
$items[] ="|Select";
$db = Factory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('id','title)));
@hans2103
hans2103 / rsform-dropdown-items.php
Created Mar 11, 2019
RSForm Pro - auto-generate list of years
View rsform-dropdown-items.php
//<code>
$items[] = array();
$items[] = "|Select your birth year";
$currentYear = date(Y);
foreach (range(1930, $currentYear) as $year) {
$items[] = $year;
}
@hans2103
hans2103 / _rsform-dropdown-items.field
Created Mar 11, 2019
RSForm Helper to get a list of titles from published categories and subdirectories
View _rsform-dropdown-items.field
//<code>
require_once JPATH_SITE . '/templates/yourtemplate/html/com_rsform/custom/contact.php';
return (new ContactHelper)->getCourses(1402);
//</code>
@hans2103
hans2103 / default.php
Last active Nov 9, 2020
Clean Joomla Social Share block
View default.php
<?php
// somewhere in on of your overrides
use Joomla\CMS\Layout\LayoutHelper;
// file is stored in your template /html/layouts/template/block/share.php
?><p>Share this item</p><?php
echo LayoutHelper::render('template.block.share', array('title' => 'damn good title'));
@hans2103
hans2103 / 01-rsfppayment.php
Last active Jan 29, 2019
add class to label in RSForm Pro Payment plugin for Joomla
View 01-rsfppayment.php
<?php
/**
* @package RSForm!Pro
* @copyright (C) 2007-2019 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
View Form Fields > textbox
Name: usefulname
Caption: usefulName
You can’t perform that action at this time.