Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Hans Kuijpers hans2103

🏠
Working from home
Block or report user

Report or block hans2103

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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
Created Feb 5, 2019
Clean Joomla Social Share block
View default.php
<?php
// somewhere in on of your overrides
$this->template = Factory::getApplication()->getTemplate();
require_once JPATH_THEMES . '/' . $this->template . '/html/layouts/render.php';
?><p>Share this item</p><?php
echo PWTLayout::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
@hans2103
hans2103 / README.md
Created Jun 4, 2018 — forked from rmkpatchaa/README.md
Bulk delete github repos
View README.md

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for \|.* and replace by empty.

You can’t perform that action at this time.