Skip to content

Instantly share code, notes, and snippets.

View renekreijveld's full-sized avatar

Rene Kreijveld renekreijveld

View GitHub Profile
@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:
--
@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 = "";
#!/bin/sh
# jdbimp -- Import a sql file into a Joomla database.
# 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.
#
# Warning! This script needs the file joomlafunctions. This has to be installed in the same directory as this script.
#!/bin/sh
# findjoomlas-csv -- Find Joomla instances on your (DirectAdmin based) server. Output as csv.
# Supports Joomla versions 1.0/1.5/1.6/1.7/2.5/3.0/3.1
#
# usage: findjoomlas-csv > myjoomlasites.csv
#
# Copyright 2013 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#!/bin/sh
# updatejoomlas
# updates your Joomla 2.5.x websites to the latest version (2.5.13 in this example)
#
# Copyright 2013 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
wget http://joomlacode.org/gf/download/frsrelease/18554/83288/Joomla_2.5.x_to_2.5.13-Stable-Patch_Package.zip -O /joomla/25xupdate.zip
Verifying that +renekreijveld is my blockchain ID. https://onename.com/renekreijveld
@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.

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 / 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)
@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.