1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 03:40:37 +02:00

Magic Shortcodes added. Fix for news 'view' rendering.

This commit is contained in:
Cameron
2019-06-12 20:20:09 -07:00
parent e5061e2c01
commit 37e7a4c996
5 changed files with 79 additions and 54 deletions

View File

@@ -957,6 +957,37 @@ if (!class_exists('e107table', false))
}
function getMagicShortcodes()
{
$ret = array();
// $ret['{---CAPTION1---}'] = varset($this->renders[0]['caption']);
// $ret['{---CAPTION2---}'] = varset($this->renders[1]['caption']);
$types = array('caption') + $this->contentTypes;
$c = 1;
foreach($this->renders as $k => $val)
{
foreach($types as $var)
{
$sc = '{---'.strtoupper($var).$c.'---}';
$ret[$sc] = $val[$var];
}
$c++;
}
return $ret;
}
/**
* Set the style mode for use in tablestyle() method/function
* @param string $style
@@ -1121,11 +1152,11 @@ if (!class_exists('e107table', false))
$options['menuCount'] = $this->eMenuCount;
$options['menuTotal'] = varset($this->eMenuTotal[$this->eMenuArea]);
$options['setStyle'] = $this->eSetStyle;
$options['caption'] = $caption;
$options['caption'] = strip_tags($caption);
$this->renders[] = $options;
//XXX Optional feature may be added if needed - define magic shortcodes inside $thm class. eg. function msc_custom();
if(is_object(vartrue($thm)))
{