Skip to content

Instantly share code, notes, and snippets.

View renekreijveld's full-sized avatar

Rene Kreijveld renekreijveld

View GitHub Profile
#!/bin/sh
# joomlainfo -- Provide information about this Joomla! installation.
# Supports Joomla 1.0 - 3.3
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
# Warning! This script needs the file joomlafunctions. This has to be installed in the same directory as this script.
@renekreijveld
renekreijveld / findlargefiles
Created August 13, 2014 13:15
Find all image files with a resolution wider then a given width.
#!/bin/sh
# findlargefiles - Find all image files with a resolution wider then a given width.
# Supports Joomla versions 1.0 - 3.3
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
# Define general variables
@renekreijveld
renekreijveld / logic.php
Last active February 22, 2018 01:09
Logic.php to include in Joomla 3.x templates
<?php
// Template by DSD business internet // www.gakijken.nl //
defined('_JEXEC') or die;
// Connect with Joomla
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$session = JFactory::getSession();
// Get variables
@renekreijveld
renekreijveld / joomlaqueries.php
Last active February 22, 2018 00:51
DB queries
<?php
// Select record, all fields
$query = $db->getQuery(true)
->select('*')
->from($db->quoteName('#__table'))
->where($db->quoteName('id') . ' = '. (int) $searchId);
$db->setQuery($query);
$results = $db->loadObjectlist();
// Select record, specific fields
@renekreijveld
renekreijveld / sitesinfo.php
Last active February 22, 2018 00:50
Watchful.li site overview through API
<?php
/**
* @package Watchful.li siteoverzicht
* @author Rene Kreijveld, based on the original work of Watchful.li
* @authorUrl https://about.me/renekreijveld
* @copyright (c) 2016, Rene Kreijveld
*/
//Config
define('API_KEY', 'plaats-jouw-watchful.li-api-key-hier');
@renekreijveld
renekreijveld / listupdates
Last active February 22, 2018 00:48
Bash script to find all Joomla extension updates in all Joomla instances on a DirectAdmin based server
#!/bin/sh
# listupdates -- Find Joomla instances and show all extension updates
#
# Copyright 2016 Rene Kreijveld - r.kreijveld@dsd.nu
#
# This program is free software; you may redistribute it and/or modify it.
#
# Version history
# 1.0 Initial version
@renekreijveld
renekreijveld / gencodes.php
Last active October 11, 2017 07:47
Joomla CLI script to generate unique codes with a predefined length.
<?php
/**
* gencodes.php
*
* This Joomla CLI script can generate unique codes of a predefined length.
* The codes are written to standard output.
*
* Modify the value of variables $how_many and $code_length to your liking.
*
* Installation: upload this file to your Joomla CLI folder.
@renekreijveld
renekreijveld / getCategories.php
Last active February 22, 2017 16:06
This function will build and return an array of all parent category id's that an article belongs to.
/**
* This function will build and return an array of all parent category id's that an article belongs to.
* Written by René Kreijveld, email [at] renekreijveld.nl
* 22-feb-2017
*
* Example function call for an article with id = 100:
* $parentCategories = $this->getCategories(100, 0);
*
*/
private function getCategories($artId, $catId)

Keybase proof

I hereby claim:

  • I am renekreijveld on github.
  • I am renekreijveld (https://keybase.io/renekreijveld) on keybase.
  • I have a public key whose fingerprint is F75D 93F8 F076 074F 4EE8 E99C AEC3 777E 175C EE61

To claim this, I am signing this object:

@renekreijveld
renekreijveld / formsreport.php
Last active October 6, 2016 12:38
Daily report of RSForm!Pro form submissions
<?php
/**
* @package Formreport CLI
*
* @copyright Copyright (c)2016 René Kreijveld
* @license GNU General Public License version 2 or later
*/
/**
* Form Check CLI.