Revision 1622
Added by darkviper over 13 years ago
| branches/2.8.x/CHANGELOG | ||
|---|---|---|
| 11 | 11 |
! = Update/Change |
| 12 | 12 |
=============================================================================== |
| 13 | 13 |
|
| 14 |
25 Feb-2012 Build 1622 Werner v.d.Decken(DarkViper) |
|
| 15 |
# typofix in Droplet [ShowRandomWysiwyg] |
|
| 14 | 16 |
24 Feb-2012 Build 1621 Werner v.d.Decken(DarkViper) |
| 15 | 17 |
# Droplet [SectionPiocker] fixed |
| 16 | 18 |
+ Added new droplets [ShowWysiwyg] and [ShowRandomWysiwyg] |
| branches/2.8.x/wb/admin/interface/version.php | ||
|---|---|---|
| 51 | 51 |
|
| 52 | 52 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
| 53 | 53 |
if(!defined('VERSION')) define('VERSION', '2.8.3');
|
| 54 |
if(!defined('REVISION')) define('REVISION', '1621');
|
|
| 54 |
if(!defined('REVISION')) define('REVISION', '1622');
|
|
| 55 | 55 |
if(!defined('SP')) define('SP', '');
|
| branches/2.8.x/wb/modules/droplets/example/ShowRandomWysiwyg.php | ||
|---|---|---|
| 3 | 3 |
global $database; |
| 4 | 4 |
$content = ''; |
| 5 | 5 |
if (isset($section)) {
|
| 6 |
if( preg_match('/^[0-9]+(?:\s*\[\,\|\-\;\:\+\#\/]\s*[0-9]+\s*)*$/', $section)) {
|
|
| 6 |
if( preg_match('/^[0-9]+(?:\s*[\,\|\-\;\:\+\#\/]\s*[0-9]+\s*)*$/', $section)) {
|
|
| 7 | 7 |
if (is_readable(WB_PATH.'/modules/wysiwyg/view.php')) {
|
| 8 | 8 |
// if valid arguments given and module wysiwyg is installed |
| 9 |
$iOldSectionId = intval($section_id); // save old SectionId |
|
| 10 | 9 |
// split and sanitize arguments |
| 11 | 10 |
$aSections = preg_split('/[\s\,\|\-\;\:\+\#\/]+/', $section);
|
| 12 |
$section_id = $sections[array_rand($sections)]; // get random element
|
|
| 11 |
$section_id = $aSections[array_rand($aSections)]; // get random element
|
|
| 13 | 12 |
ob_start(); // generate output by wysiwyg module |
| 14 | 13 |
require(WB_PATH.'/modules/wysiwyg/view.php'); |
| 15 | 14 |
$content = ob_get_clean(); |
| 16 |
$section_id = $ioldSectionId; // restore old SectionId |
|
| 17 | 15 |
} |
| 18 | 16 |
} |
| 19 | 17 |
} |
Also available in: Unified diff
typofix in Droplet [ShowRandomWysiwyg]