Project

General

Profile

Feature #23534 ยป 0015698.diff

Administrator Admin, 2010-09-13 18:11

View differences:

sysext/cms/tslib/class.tslib_content.php (Arbeitskopie)
* Exploding a string by the $char value (if integer its an ASCII value) and returning index $listNum
*
* @param string String to explode
* @param string Index-number. You can place the word "last" in it and it will be substituted with the pointer to the last value. You can use math operators like "+-/*" (passed to calc())
* @param string Index-number. You can place the word "last" in it and it will be substituted with the pointer to the last value or "rand" to return a random one. You can use math operators like "+-/*" (passed to calc())
* @param string Either a string used to explode the content string or an integer value which will then be changed into a character, eg. "10" for a linebreak char.
* @return string
*/
......
$temp = explode($char, $content);
$last = '' . (count($temp) - 1);
$index = $this->calc(str_ireplace('last', $last, $listNum));
$index = $this->calc(str_ireplace('rand', '' . array_rand($temp), $listNum));
return $temp[$index];
}
......
include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/class.tslib_content.php']);
}
?>
?>
    (1-1/1)