This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Joomla 1.5 example CLI script | |
// Written by: Rene Kreijveld, email [at] renekreijveld.nl | |
// 05-feb-2014 | |
// Set flag that this is a parent file | |
define('_JEXEC', 1); | |
define('DS', DIRECTORY_SEPARATOR); | |
define('JPATH_BASE', dirname(__DIR__)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Joomla.Cli | |
* | |
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
* | |
* Joomla 2.5 example CLI script | |
* Written by: Rene Kreijveld, email [at] renekreijveld.nl | |
* 05-feb-2014 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package Joomla.Cli | |
* | |
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | |
* @license GNU General Public License version 2 or later; see LICENSE.txt | |
* | |
* Joomla 3.2 example CLI script | |
* Written by: Rene Kreijveld, email [at] renekreijveld.nl | |
* 05-feb-2014 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# jfunctions - general bash functions for use in Joomla bash scripts | |
# Supports Joomla versions 2.5 - 3.x | |
# | |
# Copyright 2014 - 2016 Rene Kreijveld - [email protected] | |
# | |
# This program is free software; you may redistribute it and/or modify it. | |
# | |
# Version history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# jrestore - Restore a local site backup | |
# | |
# Copyright 2014 Rene Kreijveld - [email protected] | |
# | |
# This program is free software; you may redistribute it and/or modify it. | |
# General variables | |
VERSION=1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function resizeImage($CurWidth,$CurHeight,$MaxSize,$DestFolder,$SrcImage,$Quality,$ImageType){ | |
if($CurWidth <= 0 || $CurHeight <= 0){ | |
return false; | |
} | |
$ImageScale = min($MaxSize/$CurWidth, $MaxSize/$CurHeight); | |
$NewWidth = ceil($ImageScale*$CurWidth); | |
$NewHeight = ceil($ImageScale*$CurHeight); | |
$NewCanves = imagecreatetruecolor($NewWidth, $NewHeight); | |
if(imagecopyresampled($NewCanves, $SrcImage,0, 0, 0, 0, $NewWidth, $NewHeight, $CurWidth, $CurHeight)){ | |
switch(strtolower($ImageType)){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* A simple function/script for geocoding Address using Google Maps API. | |
* Please check Google Maps API FAQ & Terms for more info. | |
* | |
* @author Abdullah Rubiyath | |
*/ | |
/** | |
* Returns a Lat and Lng from an Address using Google Geocoder API. It does not |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# sitesbackup -- Find Joomla instances and backup them | |
# Supports all Joomla versions | |
# Requires jbackupstore script | |
# | |
# Backups older than 5 days are automatically cleaned | |
# | |
# Copyright 2014 Rene Kreijveld - [email protected] | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# jbackupstore -- Create a full backup of a Joomla website to tar gzip file and store in backup directory | |
# | |
# Copyright 2012 Rene Kreijveld - [email protected] | |
# | |
# 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. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# jfindfiles -- Find used and unused content files in your Joomla website | |
# | |
# This scripts supports Joomla versions 2.5 - 3.x | |
# | |
# Copyright 2014 Rene Kreijveld - [email protected] | |
# | |
# This program is free software; you may redistribute it and/or modify it. | |
# |