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
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@renekreijveld.nl | |
# |
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
@echo off | |
for /f "tokens=1-8 delims=.:/-, " %%i in ('echo exit^|cmd /q /k"prompt $D $T"') do ( | |
for /f "tokens=2-4 delims=/-,() skip=1" %%a in ('echo.^|date') do ( | |
set dow=%%i | |
set mm=%%j | |
set dd=%%k | |
set yy=%%l | |
set hh=%%m | |
set min=%%n |
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
@ECHO OFF | |
REM Sitenaam ophalen | |
FOR /F "tokens=4" %%G IN ('FINDSTR /C:"$sitename =" configuration.php') DO ( | |
FOR /F "tokens=1 delims='" %%A IN ('echo %%G') DO ( | |
SET jsitename=%%A | |
) | |
) | |
REM Host ophalen |
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
@ECHO OFF | |
REM Joomla info ophalen | |
call "jinfo.cmd" > nul | |
REM Output data | |
ECHO Sitename = %jsitename% | |
ECHO Host = %jhost% | |
ECHO Database = %jdb% | |
ECHO User = %juser% |
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 | |
# jdbsession -- Repair the session table of a Joomla database table. | |
# | |
# This scripts 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. | |
# |
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 | |
# jdbrepair -- Repair all tables of a joomla database. | |
# | |
# This scripts 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. | |
# |
OlderNewer