Skip to content

Instantly share code, notes, and snippets.

View renekreijveld's full-sized avatar

Rene Kreijveld renekreijveld

View GitHub Profile
@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 / listupdates.php
Last active September 26, 2020 19:38
List extension updates
<?php
/**
* @package Joomla.Cli
*
* @copyright Copyright (C) 2016 Rene Kreijveld, All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/**
* This is a script which should be called from the command-line, not the web.
@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.
@renekreijveld
renekreijveld / gist:bef15b0045327c23e64894bcb48d3794
Created September 2, 2016 08:10
Repair non-working phpMyAdmin in MAMP PRO 4 for OSX
# Open Terminal on your Mac and do the following:
cd "/Library/Application Support/appsolute/MAMP PRO/phpMyAdmin"
cp -R /Applications/MAMP/bin/phpMyAdmin/* .
@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');
Verifying that +renekreijveld is my blockchain ID. https://onename.com/renekreijveld
@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 / searchlatlon.php
Last active August 29, 2015 14:23
Search lat/lom for address
$zoekadres = $l_adres." ".$l_postcode." ".$l_plaats." ".$l_land;
$zoekadres = urlencode($zoekadres);
$url = "http://maps.google.com/maps/api/geocode/json?sensor=false&address={$zoekadres}";
$resp_json = file_get_contents($url);
$resp = json_decode($resp_json, true);
if($resp['status']=='OK') {
$lat = $resp['results'][0]['geometry']['location']['lat'];
$lng = $resp['results'][0]['geometry']['location']['lng'];
} else {
$lat = "";
@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 / upgrade_2.5.7_to_3.3.6.sql
Last active August 29, 2015 14:16
Joomla database update 2.5.x to 3.3.6
-- Upgrade Joomla 2.5.7 database to Joomla 3.3.6 database
-- Written by: Rene Kreijveld
--
-- This script is provided "as is", without any accompanying services or warranties from Rene Kreijveld.
--
-- Please read these instructions carefully!
-- Before you de ANY update, migration or modification, make sure you have a working backup of your website(s)!
--
-- To use this script do the following:
--