I hereby claim:
- I am rdeutz on github.
- I am rdeutz (https://keybase.io/rdeutz) on keybase.
- I have a public key ASCGfR7x0I8e4nLmK6oFgLDB3TdLc98ehwuZnqoXSsp9mgo
To claim this, I am signing this object:
Start the container | |
docker run -it --rm -v $(pwd):/opt -w /opt joomlaprojects/docker-tools bash | |
Any command you execute from now on is runnig in the container | |
git clone --single-branch -b 4.0-dev https://github.com/joomla/joomla-cms.git | |
cd joomla-cms | |
composer install | |
npm i |
<?php | |
// Fetch the current 3.x version from the downloads site API | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_URL, 'https://downloads.joomla.org/api/v1/latest/cms'); | |
$result = curl_exec($ch); | |
curl_close($ch); | |
if ($result === false) | |
{ | |
echo 'Could not fetch version data, please check your connection.' . PHP_EOL; |
/*** BEGIN META { | |
"name" : "Clear build queue", | |
"comment" : "If you accidently trigger a lot of unneeded builds, it is useful to be able to <b>cancel</b> them all", | |
"parameters" : [], | |
"core": "1.300", | |
"authors" : [ | |
{ name : "Niels Harremoes" } | |
] | |
} END META**/ | |
import hudson.model.* |
I hereby claim:
To claim this, I am signing this object:
<?php | |
// ISO-3166-1 | |
$data = array( | |
4 => array('name' => 'Afghanistan','numeric-codes' => 4,'alpha-2-codes' => 'AF','alpha-3-codes' => 'AFG'), | |
248 => array('name' => 'Åland Islands','numeric-codes' => 248,'alpha-2-codes' => 'AX','alpha-3-codes' => 'ALA'), | |
8 => array('name' => 'Albania','numeric-codes' => 8,'alpha-2-codes' => 'AL','alpha-3-codes' => 'ALB'), | |
12 => array('name' => 'Algeria','numeric-codes' => 12,'alpha-2-codes' => 'DZ','alpha-3-codes' => 'DZA'), | |
16 => array('name' => 'American Samoa','numeric-codes' => 16,'alpha-2-codes' => 'AS','alpha-3-codes' => 'ASM'), |
<?php | |
$modlist=array('modpos01','modpos02','modpos03','modpos04','modpos05'); | |
$allMods=count($modlist); | |
$show=array(); | |
$elephantInCairo=0; | |
while(count($show) < 4 && $elephantInCairo < 100) | |
{ | |
$c = rand (0 , $allMods-1); | |
if (!in_array($modlist[$c], $show)) |
protected function logData($data, $type="ERROR") | |
{ | |
jimport('joomla.log.log'); | |
$types = array( | |
'EMERGENCY', | |
'ALERT', | |
'CRITICAL', | |
'ERROR', | |
'WARNING', | |
'NOTICE', |
/** | |
* frontpage check | |
*/ | |
$menu = JFactory::getApplication()->getMenu(); | |
$defaultmenuitems = array($menu->getDefault()->id, $menu->getDefault(JFactory::getLanguage()->getTag())->id); | |
$isFrontpage = in_array($menu->getActive()->id, $defaultmenuitems); |
Manipulation a JForm is easy the best place to add fields is to use the preprocessForm function | |
protected function preprocessForm(JForm $form, $data, $group = 'content') | |
{ | |
// Add some needed hidden fields | |
$fields = array('id','cid'); | |
foreach ($fields AS $field) | |
{ | |
$element = new SimpleXMLElement('<field></field>'); |
// Echo a query | |
echo nl2br(str_replace('#__','jos_',$query)); | |